On Tue, 2013-03-26 at 14:30 +0100, Jonatan Wallmander wrote:
> Feature-request:
>    Add backtrace to output for these warnings:
>      "Warning: set address range perms: large range
>      [0x4c339040, 0x206094130) (undefined)"
Probably not difficult to implement, however, see below ...

> 
> 
> Explanation:
> 
> This was a large allocation which ate up all my memory when debugging 
> with valgrind making it hard for me to find where it happened.
> 
> The reason was an undefined integer in a class (uninitialized memory).
However, the root cause is that Valgrind should report an error when
malloc is called with a undefined size argument.

> 
> Valgrind only gives this one line warning (which is good), but
> it would also be nice if it would give a backtrace for this...
> 
> Might have helped me to track down this bug sooner :)
The 'large range' message was produced thanks to some luck.
The best would be to file a bug in bugzilla, for the false negative
caused by code such as:

   {
       size_t undef;
       char *p = malloc (undef);
   }


Thanks

Philippe


------------------------------------------------------------------------------
Own the Future-Intel® Level Up Game Demo Contest 2013
Rise to greatness in Intel's independent game demo contest.
Compete for recognition, cash, and the chance to get your game 
on Steam. $5K grand prize plus 10 genre and skill prizes. 
Submit your demo by 6/6/13. http://p.sf.net/sfu/intel_levelupd2d
_______________________________________________
Valgrind-users mailing list
Valgrind-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/valgrind-users

Reply via email to