https://bugs.kde.org/show_bug.cgi?id=376956
Bug ID: 376956 Summary: Memcheck crashes on access(NULL, F_OK) done by Free Pascal application Product: valgrind Version: 3.13 SVN Platform: Other OS: Linux Status: UNCONFIRMED Severity: normal Priority: NOR Component: memcheck Assignee: jsew...@acm.org Reporter: daniel...@gmx.net Target Milestone: --- Trying to run the current git version of UltraStar Deluxe compiled with Free Pascal 3.0.0 in Valgrind's Memcheck almost immediately leads to the following crash: ==29223== Memcheck, a memory error detector ==29223== Copyright (C) 2002-2015, and GNU GPL'd, by Julian Seward et al. ==29223== Using Valgrind-3.13.0.SVN and LibVEX; rerun with -h for copyright info ==29223== Command: ./game/ultrastardx ==29223== --29223-- VALGRIND INTERNAL ERROR: Valgrind received a signal 11 (SIGSEGV) - exiting --29223-- si_code=1; Faulting address: 0x0; sp: 0x62fede04 valgrind: the 'impossible' happened: Killed by fatal signal host stacktrace: ==29223== at 0x380128A3: mc_is_defined_asciiz (mc_main.c:4235) ==29223== by 0x380128A3: check_mem_is_defined_asciiz (mc_main.c:4313) sched status: running_tid=1 Thread 1: status = VgTs_Runnable (lwpid 29223) ==29223== at 0x804D668: SYSTEM_$$_FPSYSCALL$LONGINT$LONGINT$LONGINT$$LONGINT (in /home/daniel/USDX/game/ultrastardx) ==29223== by 0x804DBBD: SYSTEM_$$_FPACCESS$PCHAR$LONGINT$$LONGINT (in /home/daniel/USDX/game/ultrastardx) ==29223== by 0x8181621: SYSUTILS_$$_FILEEXISTS$RAWBYTESTRING$$BOOLEAN (in /home/daniel/USDX/game/ultrastardx) ==29223== by 0x81AE517: INIFILES$_$TINIFILE_$__$$_CREATE$ANSISTRING$BOOLEAN$$TINIFILE (in /home/daniel/USDX/game/ultrastardx) ==29223== by 0x81AF98A: INIFILES$_$TMEMINIFILE_$__$$_CREATE$ANSISTRING$BOOLEAN$$TMEMINIFILE (in /home/daniel/USDX/game/ultrastardx) The crash happens when mc_is_defined_asciiz looks at the first byte of the pathname argument of the access syscall. For some reason the Free Pascal system library wants to call access with NULL, but that should not make Memcheck crash. The question is why get_vabits2(NULL) returns VA_BITS2_DEFINED. It does not crash on a C application that only does the access(NULL, F_OK) call. -- You are receiving this mail because: You are watching all bug changes.