On Wed, 8 Aug 2012, Frederic Koehler wrote:

> Definitely nobody should use mkstemp anyway, but it's worth noting why the
> segfault happens, because it's tricky: the code calls basename but forgets
> to include the right header file -- this being C, the compiler just assumes
> its return type is int. However int is on x64 a 32 bit integer, so the
> pointer gets trashed (with a cltq instruction that gcc inserts to "extend"
> int's sign bit).
>
> These implicit definitions are probably the main issue with 64-bit right
> now (guessing). They can be caught by -Wall though. My next email will
> include a patch for some of these fixes, enough to get into a (severely
> broken) CDE instance.
>

There are a lot of these types of issues... Might not be a bad idea
someday to enable gcc's 'error out on missing prototypes' feature and
get these all fixed.  Would be painful, but neccessary.

[...]

-- 
Jon Trulson

"If the Martian rope-a-dope don't get him, he'll get himself, he'll
  come in too fast and punch himself out."
              - one of my brothers, referring to the Curiosity landing.

------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
cdesktopenv-devel mailing list
cdesktopenv-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/cdesktopenv-devel

Reply via email to