Hi! I'm writing here to ask for help for a really weird bug that is happening to me, I don't really understand it and asking if anybody has any clue.
I'm compiling a c++11 program on windows, using x86_64-4.8.2-release-posix-seh-rt_v3-rev3 release. What happens is that: I compile that my program, and run it, and it crashes. The crash is a non-sense, seems some memory corruption issue. The debug log with gdb is the following: H:\Works\Cpp\UsvX\bin\Debug\scada-0.0>gdb DHS.exe GNU gdb (GDB) 7.7 Copyright (C) 2014 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html> This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law. Type "show copying" and "show warranty" for details. This GDB was configured as "x86_64-w64-mingw32". Type "show configuration" for configuration details. For bug reporting instructions, please see: <http://www.gnu.org/software/gdb/bugs/>. Find the GDB manual and other documentation resources online at: <http://www.gnu.org/software/gdb/documentation/>. For help, type "help". Type "apropos word" to search for commands related to "word"... Reading symbols from DHS.exe...done. (gdb) break main Breakpoint 1 at 0x401504: file H:\Works\Cpp\DoorHan\scadone\src\DHS\main.cpp, li ne 45. (gdb) r Starting program: H:\Works\Cpp\UsvX\bin\Debug\scada-0.0\DHS.exe [New Thread 2292.0xa88] warning: Page heap: pid 0x8F4: page heap enabled with flags 0x3. warning: AVRF: DHS.exe: pid 0x8F4: flags 0x80643277: application verifier enable d warning: LuaPriv: Attaching to process... warning: -- LuaPriv initialized-- Breakpoint 1, main (argc=1, argv=0x5266ff0) at H:\Works\Cpp\DoorHan\scadone\src\DHS\main.cpp:45 45 YamlNode settingsYaml("./settings.yaml"); (gdb) c Continuing. Program received signal SIGSEGV, Segmentation fault. 0x00000000778d9af6 in ntdll!RtlLookupFunctionTable () from C:\Windows\system32\ntdll.dll (gdb) If I do a stripped version of the executable, in this way: copy DHS.exe DHS_strip_S.exe strip -S DHS_strip_S.exe this program version works as expected. Infact, GDB log is: H:\Works\Cpp\UsvX\bin\Debug\scada-0.0>gdb DHS_strip_S.exe GNU gdb (GDB) 7.7 Copyright (C) 2014 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html> This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law. Type "show copying" and "show warranty" for details. This GDB was configured as "x86_64-w64-mingw32". Type "show configuration" for configuration details. For bug reporting instructions, please see: <http://www.gnu.org/software/gdb/bugs/>. Find the GDB manual and other documentation resources online at: <http://www.gnu.org/software/gdb/documentation/>. For help, type "help". Type "apropos word" to search for commands related to "word"... Reading symbols from DHS_strip_S.exe...(no debugging symbols found)...done. (gdb) break main Breakpoint 1 at 0x4014f8 (gdb) r Starting program: H:\Works\Cpp\UsvX\bin\Debug\scada-0.0\DHS_strip_S.exe [New Thread 2336.0x7c0] Breakpoint 1, 0x00000000004014f8 in main () (gdb) c Continuing. ~YamlParser() [Inferior 1 (process 2336) exited normally] (gdb) Program does not much, it's one line where an object gets constructed and then destroyed. Another really weird thing about this program is that I made another executable, compiling the same source code and linking with the same library, but in another directory, and that executable just works. Gdb log: H:\Works\Cpp\UsvX\bin\Debug\scada-0.0>gdb bug004.exe GNU gdb (GDB) 7.7 Copyright (C) 2014 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html> This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law. Type "show copying" and "show warranty" for details. This GDB was configured as "x86_64-w64-mingw32". Type "show configuration" for configuration details. For bug reporting instructions, please see: <http://www.gnu.org/software/gdb/bugs/>. Find the GDB manual and other documentation resources online at: <http://www.gnu.org/software/gdb/documentation/>. For help, type "help". Type "apropos word" to search for commands related to "word"... Reading symbols from bug004.exe...done. (gdb) r Starting program: H:\Works\Cpp\UsvX\bin\Debug\scada-0.0\bug004.exe [New Thread 3700.0xeb8] ~YamlParser() [Inferior 1 (process 3700) exited normally] (gdb) I know there is really low information here, so I'm just asking if somebody already seen some weirdness like that to give me some hint... Thanks! Davide ------------------------------------------------------------------------------ Learn Graph Databases - Download FREE O'Reilly Book "Graph Databases" is the definitive new guide to graph databases and their applications. Written by three acclaimed leaders in the field, this first edition is now available. Download your free book today! http://p.sf.net/sfu/NeoTech _______________________________________________ Mingw-w64-public mailing list Mingw-w64-public@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/mingw-w64-public