|
From: Mccall, K. E. (JSC-EG411) <kur...@na...> - 2015-11-09 22:28:07
|
My program is evidently writing into a forbidden area of memory, as it segfaults in the Standard Library std::string code, attempting to access memory below the stack pointer. Memcheck 3.11 isn't finding anything significant, except that it prints these warning messages at the beginning of the run: --27820-- warning: addVar: in range 0x0 .. 0x179 outside all rx mapped areas (this) --27820-- warning: addVar: in range 0x0 .. 0x179 outside all rx mapped areas (__k) --27820-- warning: addVar: in range 0x0 .. 0x167 outside all rx mapped areas (__x) --27820-- warning: addVar: in range 0x0 .. 0x167 outside all rx mapped areas (__y) --27820-- warning: addVar: in range 0x0 .. 0x167 outside all rx mapped areas (__comp) --27820-- warning: addVar: in range 0x0 .. 0x167 outside all rx mapped areas (__j) Do those give any clue as to the source of my error? Also, Memcheck prints out few messages like the following right at the beginning, with no other information. Any ideas on this? --27820-- free(0x0) My O/S is CentOS 6.6. Here are my Memcheck arguments: valgrind --gen-suppressions=all --error-markers=BEGIN_MARK,END_MARK --free-fill=FF --malloc-fill=FF --trace-malloc=yes --trace-children=yes --track-origins=yes --read-var-info=yes --partial-loads-ok=no --log-file=vg2.out --suppressions=./vg2_suppressions.supp <my_program> Thanks for any help. Kurt |
|
From: Philippe W. <phi...@sk...> - 2015-11-14 17:25:08
|
On Mon, 2015-11-09 at 22:28 +0000, Mccall, Kurt E. (JSC-EG411) wrote: > --27820-- warning: addVar: in range 0x0 .. 0x167 outside all rx mapped > areas (__j) > Do those give any clue as to the source of my error? The above messages are produced by the dwarf debug info reader for --read-var-info=yes. To my knowledge, they are harmless (but some var info will not be loaded). > Also, Memcheck prints out few messages like the following right at > the beginning, with no other information. Any ideas on this? > > > --27820-- free(0x0) This is produced due to --trace-malloc=yes. It indicates you are freeing a NULL ptr (which is allowed: this will be a no-op). You might be able to have more info about your problem by debugging using e.g. valgrind + vgdb. Philippe |