<HTML><BODY><div>Hi!</div><div>Thanks for the comments, here is the new commit message:</div><div><div>==========================================================</div><div>test: adapt tests checking loading bytecode files</div><div> </div><div>Loading bytecode with an extra header (BOM or "#") is disabled</div><div>for security reasons since LuaJIT-2.0.0-beta10.<br>For more information see comment for `lj_lex_setup()` in <src/lj_lex.c>.</div><div>Also see commit 53a285c0c3544ff5dea7c67b741c3c2d06d22b47 ('Disable</div><div>loading bytecode with an extra header (BOM or #!).').</div><div>Tests are adapted to LuaJIT behavior.</div><div> </div><div>Part of tarantool/tarantool#5870<br>==========================================================</div></div><div> </div><div>CI: <a href="https://github.com/tarantool/tarantool/tree/fckxorg/gh-5691-adapt-bytecode-PUC-Rio">https://github.com/tarantool/tarantool/tree/fckxorg/gh-5691-adapt-bytecode-PUC-Rio</a></div><div> </div><div>Best regards,</div><div>Maxim Kokryashkin</div><div> </div><blockquote style="border-left:1px solid #0857A6; margin:10px; padding:0 0 0 10px;">Понедельник, 11 октября 2021, 17:26 +03:00 от Sergey Kaplun <skaplun@tarantool.org>:<br> <div id=""><div class="js-helper js-readmsg-msg"><div><div id="style_16339624170984960054_BODY">Hi, Maxim!<br><br>Thanks for the patch!<br><br>LGTM, except a few comments below.<br><br>On 24.09.21, Maxim Kokryashkin wrote:<br>> Loading bytecode with an extra header (BOM or "#") is disabled<br>> for security reasons since LuaJIT-2.0.0-beta10.<br>> For more information see comment for `lj_lex_setup()` in <src/lj_lex.c>.<br>> Also see commit 53a285c ('Disable<br><br>Nit: It is better to use the full commit hash here to avoid clashing.<br><br>> loading bytecode with an extra header (BOM or #!).').<br>> Tests are adapted to LuaJIT behavior.<br>><br>> Closes tarantool/tarantool#5691<br>> Part of tarantool/tarantool#5845<br>> Part of tarantool/tarantool#4473<br><br>Looks like it should be 5870 instead. 5873 is a unbrella for all tests<br>activities.<br><br>> ---<br><br>Also, please attach tarantool branch with CI to check it is OK.<br><br>> Issue: <a href="https://github.com/tarantool/tarantool/issues/5691" target="_blank">https://github.com/tarantool/tarantool/issues/5691</a><br>> Branch: <a href="https://github.com/tarantool/luajit/tree/fckxorg/gh-5691-adapt-bytecode-PUC-Rio" target="_blank">https://github.com/tarantool/luajit/tree/fckxorg/gh-5691-adapt-bytecode-PUC-Rio</a><br>><br>> test/PUC-Rio-Lua-5.1-tests/main.lua | 16 +++++-----------<br>> 1 file changed, 5 insertions(+), 11 deletions(-)<br>><br>> diff --git a/test/PUC-Rio-Lua-5.1-tests/main.lua b/test/PUC-Rio-Lua-5.1-tests/main.lua<br>> index 07facc4c..c62950c8 100644<br>> --- a/test/PUC-Rio-Lua-5.1-tests/main.lua<br>> +++ b/test/PUC-Rio-Lua-5.1-tests/main.lua<br>> @@ -172,23 +172,17 @@ prepfile(s)<br>> prepfile[[#comment in 1st line without \n at the end]]<br>> RUN("lua %s", prog)<br>><br>> --- FIXME: Loading bytecode with an extra header (BOM or "#")<br>> +-- Loading bytecode with an extra header (BOM or "#")<br>> -- is disabled for security reasons since LuaJIT-2.0.0-beta10.<br>> -- For more information see comment for `lj_lex_setup()`<br>> -- in <src/lj_lex.c>.<br>> -- Also see commit 53a285c0c3544ff5dea7c67b741c3c2d06d22b47<br>> -- (Disable loading bytecode with an extra header (BOM or #!).).<br>> -- See also <a href="https://github.com/tarantool/tarantool/issues/5691" target="_blank">https://github.com/tarantool/tarantool/issues/5691</a>.<br>> --- The test is disabled for LuaJIT.<br>> -prepfile("#comment with a binary file\n"..string.dump(loadstring("print(1)")))<br>> --- RUN("lua %s > %s", prog, out)<br>> --- checkout("1\n")<br>> -<br>> -prepfile("#comment with a binary file\r\n"..string.dump(loadstring("print(1)")))<br>> --- FIXME: Behavior is different for LuaJIT. See the comment above.<br>> --- The test is disabled for LuaJIT.<br>> --- RUN("lua %s > %s", prog, out)<br>> --- checkout("1\n")<br>> +-- The test is adapted to LuaJIT behavior.<br>> +prepfile(string.dump(loadstring("print(1)")))<br>> +RUN("lua %s > %s", prog, out)<br>> +checkout("1\n")<br><br>May be it is better to test `NoRun()` for 1 binary file with a comment at the<br>first string and `Run()` for another binary file without the comment.<br><br>><br>> -- close Lua with an open file<br>> prepfile(string.format([[io.output(%q); io.write('alo')]], out))<br>> --<br>> 2.33.0<br>><br><br>--<br>Best regards,<br>Sergey Kaplun</div></div></div></div></blockquote><div> </div></BODY></HTML>