Re: Valgrind suppression rules

  • From: Coda Highland <chighland@xxxxxxxxx>
  • To: luajit@xxxxxxxxxxxxx
  • Date: Sat, 25 Aug 2012 17:43:32 -0700

On Sat, Aug 25, 2012 at 5:23 PM, Coda Highland <chighland@xxxxxxxxx> wrote:
> Are there any Valgrind suppression rules I should use when debugging
> memory issues in my application? I'm getting this one a lot and I
> don't know if this is normal or if it's something I need to be
> concerned about:
>
> ==14705== Conditional jump or move depends on uninitialised value(s)
> ==14705==    at 0x472C5E: lj_str_new (in
> /home/interph/interphraser/interphraser-cs/server/server)
> ==14705==    by 0x476F64: lua_pushlstring (in
> /home/interph/interphraser/interphraser-cs/server/server)
> ==14705==    by 0x4846ED: emptybuffer (in
> /home/interph/interphraser/interphraser-cs/server/server)
> ==14705==    by 0x484718: luaL_pushresult (in
> /home/interph/interphraser/interphraser-cs/server/server)
> ==14705==    by 0x4B1E5E: lj_cf_table_concat (in
> /home/interph/interphraser/interphraser-cs/server/server)
> ==14705==    by 0x488102: lj_BC_FUNCC (in
> /home/interph/interphraser/interphraser-cs/server/server)
> ==14705==    by 0x476185: lua_pcall (in
> /home/interph/interphraser/interphraser-cs/server/server)
>
> The ultimate problem is that I'm running into this:
>
> ==14705== Invalid read of size 4
> ==14705==    at 0x4725F0: lj_obj_equal (in
> /home/interph/interphraser/interphraser-cs/server/server)
> ==14705==    by 0x48BA72: lj_tab_get (in
> /home/interph/interphraser/interphraser-cs/server/server)
> ==14705==    by 0x4BA08C: recff_cdata_call (in
> /home/interph/interphraser/interphraser-cs/server/server)
> ==14705==    by 0x49ABD6: lj_ffrecord_func (in
> /home/interph/interphraser/interphraser-cs/server/server)
> ==14705==    by 0x498DA8: lj_record_ins (in
> /home/interph/interphraser/interphraser-cs/server/server)
> ==14705==    by 0x48042D: trace_state (in
> /home/interph/interphraser/interphraser-cs/server/server)
> ==14705==    by 0x488439: lj_vm_cpcall (in
> /home/interph/interphraser/interphraser-cs/server/server)
> ==14705==    by 0x47F7DC: lj_trace_ins (in
> /home/interph/interphraser/interphraser-cs/server/server)
> ==14705==    by 0x474F70: lj_dispatch_call (in
> /home/interph/interphraser/interphraser-cs/server/server)
> ==14705==    by 0x489B39: lj_vm_hotcall (in
> /home/interph/interphraser/interphraser-cs/server/server)
> ==14705==    by 0x476185: lua_pcall (in
> /home/interph/interphraser/interphraser-cs/server/server)
> ==14705==    by 0x4703C2: Report::run() (report.cpp:226)
> ==14705==  Address 0xa8255d174 is not stack'd, malloc'd or (recently) free'd
>
> and I'm trying to debug it; I suspect it's my own error and not a bug
> in LuaJIT (git revision 23abbd9e), but it only happens on this
> particular machine (I'm on Linux 2.6.18 (RHEL5) on x86_64) so I'm not
> quite sure where to start looking.
>
> Thanks,
> /s/ Adam

As an additional bit of information, adding jit.off() made it stop
crashing. If there's additional information I can provide, don't
hesitate to ask.

/s/ Adam

Other related posts: