Merged
Conversation
d0a24a8 to
36e5ef8
Compare
26ef371 to
0837c06
Compare
Buristan
requested changes
Aug 20, 2025
Collaborator
Buristan
left a comment
There was a problem hiding this comment.
Hi, Sergey!
Thanks for the patch!
Please consider my comments below.
a59da3c to
ddee305
Compare
Owner
Author
|
Also, updated --- a/tests/lapi/string_buffer_torture_test.lua
+++ b/tests/lapi/string_buffer_torture_test.lua
@@ -74,14 +74,16 @@ local function buffer_putf(self)
self.buf:putf("%s", str)
end
--- Appends the given len number of bytes from the memory pointed
+-- Appends the given `len` number of bytes from the memory pointed
-- to by the FFI cdata object to the buffer. The object needs to
-- be convertible to a (constant) pointer.
-- Usage: buf = buf:putcdata(cdata, len)
local function buffer_putcdata(self)
local n = self.fdp:consume_integer(1, test_lib.MAX_INT)
local cdata = ffi.new("uint8_t", n)
- self.buf:putcdata(cdata, ffi.sizeof(cdata))
+ -- The function may throw an error "cannot convert
+ -- 'unsigned char' to 'const void *'".
+ pcall(self.buf.putcdata, self.buf, cdata, ffi.sizeof(cdata))
end
-- This method allows zero-copy consumption of a string or an FFI |
9c2fbc7 to
863dc3f
Compare
ligurio
added a commit
to ligurio/lunapark-corpus
that referenced
this pull request
Aug 28, 2025
The commit "tests/lapi: add string.buffer tests" [1]. 1. ligurio/lunapark#148 Follows up ligurio/lunapark#148 Related to tarantool/tarantool#11470 Related to tarantool/tarantool#11301
Buristan
approved these changes
Aug 28, 2025
Collaborator
Buristan
left a comment
There was a problem hiding this comment.
Sergey,
Thanks for the fixes!
LGTM, after resolving the discussions above.
The patch add tests for LuaJIT's string buffer library [1]. Note, as it is stated in documentation [1] this serialization format is designed for internal use by LuaJIT applications, and this format is explicitly not intended to be a 'public standard' for structured data interchange across computer languages (like JSON or MessagePack). The purpose of the proposed tests is testing the library because other LuaJIT components relies on it and also the proposed tests indirectly tests FFI library. 1. https://luajit.org/ext_buffer.html
863dc3f to
4198abb
Compare
Lua is not supported by OSS-Fuzz [1]. 1. google/oss-fuzz#13782
a9386f3 to
f7bd674
Compare
ligurio
added a commit
to ligurio/lunapark-corpus
that referenced
this pull request
Sep 11, 2025
The commit "tests/lapi: add string.buffer tests" [1]. 1. ligurio/lunapark#148 Follows up ligurio/lunapark#148 Related to tarantool/tarantool#11470 Related to tarantool/tarantool#11301
ligurio
added a commit
to ligurio/lunapark-corpus
that referenced
this pull request
Sep 11, 2025
The commit "tests/lapi: add string tests" [1]. 1. ligurio/lunapark@0508724 Follows up ligurio/lunapark#124 Follows up ligurio/lunapark#148 Related to tarantool/tarantool#11401 Related to tarantool/tarantool#11301
ligurio
added a commit
to ligurio/lunapark-corpus
that referenced
this pull request
Sep 11, 2025
The commit "tests/lapi: add string tests" [1]. 1. ligurio/lunapark@0508724 Follows up ligurio/lunapark#124 Follows up ligurio/lunapark#148 Related to tarantool/tarantool#11401 Related to tarantool/tarantool#11301
ligurio
added a commit
to ligurio/lunapark-corpus
that referenced
this pull request
Apr 1, 2026
The commit "tests/lapi: add string.buffer tests" [1]. 1. ligurio/lunapark#148 Follows up ligurio/lunapark#148 Related to tarantool/tarantool#11470 Related to tarantool/tarantool#11301
ligurio
added a commit
to ligurio/lunapark-corpus
that referenced
this pull request
Apr 1, 2026
The commit "tests/lapi: add string tests" [1]. 1. ligurio/lunapark@0508724 Follows up ligurio/lunapark#124 Follows up ligurio/lunapark#148 Related to tarantool/tarantool#11401 Related to tarantool/tarantool#11301
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The patch add tests for LuaJIT's string buffer library.
Blocked by ligurio/luzer#62