This is the mail archive of the glibc-bugs@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug nptl/16549] pthread_cond_wait and pthread_cond_timedwait do not suspend the calling thread


https://sourceware.org/bugzilla/show_bug.cgi?id=16549

--- Comment #17 from vinxxe at gmail dot com ---
(In reply to Andreas Schwab from comment #16)
> 6.3.2.3#7

from the paragraph you mention

-----------------------
If the resulting pointer is not correctly aligned for the referenced type, the
behavior is undefined
-----------------------

the problem is: imagine I have to pack my types to save some memory
(unfortunately in embedded software this is often the case) and I do not know
that the correct alignment of a pthread_cond_t variable is 4 so I, *** by
mistake ***, place a pthread_cond_t variable at a wrong address (considering
its correct alignment)
what is my chance to catch the bug? 
where is written that a pthread_cond_t variable must be 4 byte aligned?

I'm just talking about this, a way to avoid or to earlier detect such kind of
errors

-- 
You are receiving this mail because:
You are on the CC list for the bug.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]