Re: Valgrind 'invalid read of size 4' with LUAJIT_USE_VALGRIND defined

  • From: Tim Mensch <tim-luajit@xxxxxxxxxxx>
  • To: luajit@xxxxxxxxxxxxx
  • Date: Wed, 20 Mar 2013 10:03:25 -0600

On 3/20/2013 9:40 AM, Mike Pall wrote:
John Craws wrote:
On Tue, Mar 19, 2013 at 5:34 PM, Mike Pall <mike-1303@xxxxxxxxxx> wrote:
John Craws wrote:
I have tried modifying the Makefile to enable LUAJIT_USE_VALGRIND,
Umm, have you read the comment block near that option?

   # Use --suppressions=lj.supp to avoid some false positives.
I have but I forgot to mention it in my original description.
The suppressions file depends on Valgrind's ability to see all
internal symbols.

From his original email:

> the '-g' makes the warnings disappear.

...so I would bet that the "-g" in fact made the suppressions file work. John, if you want to verify that, you should try it WITH -g but WITHOUT the suppression of that particular warning. If it comes back, then it's not that -g is changing the code, but that -g is enabling symbols and therefore properly suppressing the warning.

Tim

Other related posts: