From: Jonas P. <jon...@un...> - 2016-11-23 15:19:19
|
I changed the 512 to PATH_MAX in Launcher.h and it works! Btw, my export of X10_HOSTFILE is only 30 charactes long. Thanks, Jonas Am 23.11.2016 um 15:32 schrieb David P Grove: > Jonas Posner <jon...@un...> wrote on 11/23/2016 04:20:51 AM: >> >> ==19578== Process terminating with default action of signal 6 (SIGABRT) >> ==19578== at 0x508C428: raise (raise.c:54) >> ==19578== by 0x508E029: abort (abort.c:89) >> ==19578== by 0x50CE7E9: __libc_message (libc_fatal.c:175) >> ==19578== by 0x516F56B: __fortify_fail (fortify_fail.c:37) >> ==19578== by 0x516D56F: __chk_fail (chk_fail.c:28) >> ==19578== by 0x516DAF3: __realpath_chk (realpath_chk.c:29) >> ==19578== by 0x402601: realpath (stdlib.h:45) >> ==19578== by 0x402601: Launcher::initialize(int, char**) >> (Launcher_Init.cc:184) >> ==19578== by 0x40295D: Launcher::Setup(int, char**) > (Launcher_Init.cc:62) >> ==19578== by 0x401D10: main (main.cc:56) >> >> >> When I unset X10_HOSTFILE, "X10Launcher Hello" has no buffer overflow. >> > > Thanks, that helps. > > In Launcher.h line 122 defines a fixed-size buffer that is passed into > realpath: > > char _hostfname[512]; /* host file name */ > > My guess is that the expansion of symbolic links in the value you are > using for X10_HOSTFILE causes it to exceed the buffer length. There are > two possible fixes: > (1) change the 512 to PATH_MAX in Launcher.h > (2) change to dynamic allocation of the buffer for _hostfname by > changing the declaration to be a char*, setting it to NULL in the init > routine, passing NULL as the second argument to realpath and storing the > returned non-NULL results in _hostfname. > > Would you mind trying to see if this fixes the problem? > > thanks, > > --dave > > > > ------------------------------------------------------------------------------ > > > > _______________________________________________ > X10-users mailing list > X10...@li... > https://lists.sourceforge.net/lists/listinfo/x10-users > -- Jonas Posner Universitaet Kassel Fachbereich 16 Elektrotechnik/Informatik Fachgebiet Programmiersprachen/-methodik Wilhelmshoeher Allee 71-73 34121 Kassel, Germany Phone: +49 (0)561 804-6498 Fax: +49 (0)561 804-6219 mailto: jon...@un... www.uni-kassel.de |