Re: gc bug in 2.0.4?

  • From: Andrea Guerra <andrea.guerra.mail@xxxxxxxxx>
  • To: luajit@xxxxxxxxxxxxx
  • Date: Wed, 16 Nov 2016 13:24:20 +0100

On Tue, Nov 15, 2016 at 12:47 PM, Javier Guerra Giraldez
<javier@xxxxxxxxxxx> wrote:

Just because the initializer doesn't raise an error immediately, it
doesn't mean everything is OK.  Many memory corruption bugs only
surface long, after, when some other part of the code is traversing
inner structures (like on garbage collection).

Thank you, that's explain the error.
I'm still wondering why the initializer doesn't rise an error.
Substituing VLA initialization with a fixed size ( i.e:  local z =
ffi.new("float[".. counter .."]", t)) rises an excpetion when counter
< #t.
Is the initializer different in the VLA case?


Thanks,
Andrea

Other related posts: