#22 execlp call in ParserTreeWalker.cpp is not 64bit-clean

open
nobody
None
5
2008-03-15
2008-03-15
No

Since execlp doesn't have a full prototype, the compiler assumes that the final 0 argument is an int, and only pushes 4 bytes of zeros onto the stack, instead of the required 8 bytes on x86_64 machines, causing the exec to fail with an EFAULT because the additional 4 bytes are garbage. It needs to be cast explicitly to a pointer.

(Note that, on my machine, the problem is only reproducible if the patch from http://sourceforge.net/tracker/index.php?func=detail&aid=1895608&group_id=66144&atid=513479 is applied /and/ the grcompiler binary is prelinked, but this is purely by luck, not because prelink or the patch is faulty.)

Discussion

  • David Leverton

    David Leverton - 2008-03-15

    Logged In: YES
    user_id=2011415
    Originator: YES

    File Added: grcompiler-r829-64bit.patch

     

Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks