Re: loadStringN can write to freed memory, will fail assert in tests
[
Date Prev][
Date Next][
Thread Prev][
Thread Next]
[
Date Index]
[
Thread Index]
- Subject: Re: loadStringN can write to freed memory, will fail assert in tests
- From: Roberto Ierusalimschy <roberto@...>
- Date: 2020年8月17日 13:27:18 -0300
> I am afraid that change does not ensure that there is a GC while reading
> the long string, so it may not trigger the bug. (It didn't when I tried.)
> The following chunk seems more reliable:
>
> ---------------------------
> -- run this chunck under some memory checker
> local function myload (s)
> return load(function ()
> [...]
> ---------------------------
I think this function is already implemented in testes/call.lua under
the name 'read1'.
-- Roberto