From mboxrd@z Thu Jan 1 00:00:00 1970 Message-ID: <518BD9CF.1000800@xenomai.org> Date: Thu, 09 May 2013 19:15:59 +0200 From: Gilles Chanteperdrix MIME-Version: 1.0 References: <518BB895.3050208@xenomai.org> <518BBFDC.7060102@xenomai.org> <518BC2C3.3080004@xenomai.org> <518BC59F.60208@xenomai.org> <518BCB6B.5070908@xenomai.org> <518BCD6C.8060501@xenomai.org> <518BD2BF.3040801@xenomai.org> In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Subject: Re: [Xenomai] [Posix] I/O multiplexing with select List-Id: Discussions about the Xenomai project List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: alex alex Cc: Xenomai On 05/09/2013 06:56 PM, alex alex wrote: > vmlinux file > -------------- next part -------------- > A non-text attachment was scrubbed... > Name: vmlinux > Type: application/octet-stream > Size: 11189780 bytes > Desc: not available > URL: > _______________________________________________ > Xenomai mailing list > Xenomai@xenomai.org > http://www.xenomai.org/mailman/listinfo/xenomai > Please try the following patch: diff --git a/ksrc/skins/posix/syscall.c b/ksrc/skins/posix/syscall.c index 49ed764..8ffd1ad 100644 --- a/ksrc/skins/posix/syscall.c +++ b/ksrc/skins/posix/syscall.c @@ -437,8 +437,10 @@ static int __pthread_set_name_np(struct pt_regs *regs) k_tid = __pthread_find(&hkey); if (k_tid) { p = xnthread_user_task(&k_tid->threadbase); - strncpy(p->comm, name, sizeof(p->comm)); - p->comm[sizeof(p->comm) - 1] = '\0'; + if (p) { + strncpy(p->comm, name, sizeof(p->comm)); + p->comm[sizeof(p->comm) - 1] = '\0'; + } } return -pthread_set_name_np(k_tid, name); -- Gilles.