lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


> instance, lua were to corrupt data that belongs to glibc? As far as I know,
> valgrind would not catch those cases.

No, but they should still crash (unless memory allocation is different).

> Unlikely, I agree, but the evidence does not rule it out yet.

Granted.

> When we were chasing down the bugs in the dynamic linker in glibc, all of
> these problems were reproducible with Valgrind, and actually confirmed that
> the bug was in  glibc. Something is very strange here. Out of curiosity, what
> are the compiler flags and test scripts that you use to reproduce the bug?

I used just -O2 and not -fPIC (which may well be the problem according to
Daniel Silverstone) when building lua dynamically (otherwise unchanged
sources). I used the test

for line in io.lines() do
  print(line)
end

in /tmp/i, then ran lua /tmp/i < /etc/passwd. The bug was sufficiently
robust that this caused a crash for both Luiz and me despite (presumably)
different contents of /etc/passwd.

-- 
http://www.mupsych.org/~rrt/ | taciturn, n.  a silent pot