Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Segfault in test case with LuaJIT #19

Open
JesseTG opened this issue May 9, 2014 · 2 comments
Open

Segfault in test case with LuaJIT #19

JesseTG opened this issue May 9, 2014 · 2 comments

Comments

@JesseTG
Copy link

JesseTG commented May 9, 2014

First order of business, I had to change the name of the directory of the test files from tests, because CMake tries to create a binary called tests. Anyway...

I'm using gcc 4.8.2 for both the test cases and LuaJIT on Ubuntu 13.10 64-bit, and I'm using the latest Git build of LuaJIT. Here's the output log...

jesse@jesse-ubuntu:~/Desktop/Code/Source/luawrapper$ ./tests
[==========] Running 67 tests from 9 test cases.
[----------] Global test environment set-up.
[----------] 7 tests from BasicReadWrite
[ RUN      ] BasicReadWrite.Integers
[       OK ] BasicReadWrite.Integers (0 ms)
[ RUN      ] BasicReadWrite.Doubles
[       OK ] BasicReadWrite.Doubles (0 ms)
[ RUN      ] BasicReadWrite.Booleans
[       OK ] BasicReadWrite.Booleans (0 ms)
[ RUN      ] BasicReadWrite.Strings
[       OK ] BasicReadWrite.Strings (0 ms)
[ RUN      ] BasicReadWrite.Enums
[       OK ] BasicReadWrite.Enums (0 ms)
[ RUN      ] BasicReadWrite.Conversions
[       OK ] BasicReadWrite.Conversions (0 ms)
[ RUN      ] BasicReadWrite.TypeError
[       OK ] BasicReadWrite.TypeError (1 ms)
[----------] 7 tests from BasicReadWrite (1 ms total)

[----------] 14 tests from AdvancedReadWrite
[ RUN      ] AdvancedReadWrite.WritingVariant
[       OK ] AdvancedReadWrite.WritingVariant (0 ms)
[ RUN      ] AdvancedReadWrite.ReadingVariant
[       OK ] AdvancedReadWrite.ReadingVariant (0 ms)
[ RUN      ] AdvancedReadWrite.VariantError
[       OK ] AdvancedReadWrite.VariantError (0 ms)
[ RUN      ] AdvancedReadWrite.ReadingOptional
[       OK ] AdvancedReadWrite.ReadingOptional (0 ms)
[ RUN      ] AdvancedReadWrite.EmptyArray
[       OK ] AdvancedReadWrite.EmptyArray (0 ms)
[ RUN      ] AdvancedReadWrite.ReadInsideArrays
[       OK ] AdvancedReadWrite.ReadInsideArrays (0 ms)
[ RUN      ] AdvancedReadWrite.WriteVariableInsideArrays
[       OK ] AdvancedReadWrite.WriteVariableInsideArrays (0 ms)
[ RUN      ] AdvancedReadWrite.WriteFunctionInsideArrays
[       OK ] AdvancedReadWrite.WriteFunctionInsideArrays (0 ms)
[ RUN      ] AdvancedReadWrite.WritingVectors
[       OK ] AdvancedReadWrite.WritingVectors (0 ms)
[ RUN      ] AdvancedReadWrite.VectorOfPairs
[       OK ] AdvancedReadWrite.VectorOfPairs (0 ms)
[ RUN      ] AdvancedReadWrite.Maps
[       OK ] AdvancedReadWrite.Maps (0 ms)
[ RUN      ] AdvancedReadWrite.UnorderedMaps
[       OK ] AdvancedReadWrite.UnorderedMaps (0 ms)
[ RUN      ] AdvancedReadWrite.WritingOptionals
[       OK ] AdvancedReadWrite.WritingOptionals (0 ms)
[ RUN      ] AdvancedReadWrite.AdvancedExample
[       OK ] AdvancedReadWrite.AdvancedExample (0 ms)
[----------] 14 tests from AdvancedReadWrite (1 ms total)

[----------] 4 tests from Execution
[ RUN      ] Execution.BasicExecution
[       OK ] Execution.BasicExecution (1 ms)
[ RUN      ] Execution.Errors
[       OK ] Execution.Errors (0 ms)
[ RUN      ] Execution.ReturningValues
[       OK ] Execution.ReturningValues (0 ms)
[ RUN      ] Execution.ReturningMultipleValues
[       OK ] Execution.ReturningMultipleValues (0 ms)
[----------] 4 tests from Execution (1 ms total)

[----------] 13 tests from FunctionsWrite
[ RUN      ] FunctionsWrite.NativeFunctions
[       OK ] FunctionsWrite.NativeFunctions (0 ms)
[ RUN      ] FunctionsWrite.ConstRefParameters
[       OK ] FunctionsWrite.ConstRefParameters (0 ms)
[ RUN      ] FunctionsWrite.VariantParameters
[       OK ] FunctionsWrite.VariantParameters (0 ms)
[ RUN      ] FunctionsWrite.FunctionObjects
[       OK ] FunctionsWrite.FunctionObjects (1 ms)
[ RUN      ] FunctionsWrite.FunctionObjectsConst
[       OK ] FunctionsWrite.FunctionObjectsConst (0 ms)
[ RUN      ] FunctionsWrite.FunctionObjectsAutodetect
[       OK ] FunctionsWrite.FunctionObjectsAutodetect (0 ms)
[ RUN      ] FunctionsWrite.Lambdas
[       OK ] FunctionsWrite.Lambdas (0 ms)
[ RUN      ] FunctionsWrite.DestructorCalled
[       OK ] FunctionsWrite.DestructorCalled (0 ms)
[ RUN      ] FunctionsWrite.ReturningMultipleValues
[       OK ] FunctionsWrite.ReturningMultipleValues (0 ms)
[ RUN      ] FunctionsWrite.PolymorphicFunctions
[       OK ] FunctionsWrite.PolymorphicFunctions (0 ms)
[ RUN      ] FunctionsWrite.VariadicFunctions
[       OK ] FunctionsWrite.VariadicFunctions (0 ms)
[ RUN      ] FunctionsWrite.AccessLuaFromWithinCallback
[       OK ] FunctionsWrite.AccessLuaFromWithinCallback (1 ms)
[ RUN      ] FunctionsWrite.ExecuteLuaFromWithinCallback
[       OK ] FunctionsWrite.ExecuteLuaFromWithinCallback (0 ms)
[----------] 13 tests from FunctionsWrite (2 ms total)

[----------] 5 tests from FunctionsRead
[ RUN      ] FunctionsRead.NativeFunctions
[       OK ] FunctionsRead.NativeFunctions (0 ms)
[ RUN      ] FunctionsRead.Lambdas
[       OK ] FunctionsRead.Lambdas (0 ms)
[ RUN      ] FunctionsRead.LuaFunctions
[       OK ] FunctionsRead.LuaFunctions (0 ms)
[ RUN      ] FunctionsRead.LuaFunctionsCleanup
[       OK ] FunctionsRead.LuaFunctionsCleanup (0 ms)
[ RUN      ] FunctionsRead.CallLuaFunctionFromWithinCallback
[       OK ] FunctionsRead.CallLuaFunctionFromWithinCallback (0 ms)
[----------] 5 tests from FunctionsRead (0 ms total)

[----------] 17 tests from CustomTypes
[ RUN      ] CustomTypes.ReadWrite
[       OK ] CustomTypes.ReadWrite (0 ms)
[ RUN      ] CustomTypes.ReadReference
[       OK ] CustomTypes.ReadReference (0 ms)
[ RUN      ] CustomTypes.MemberFunctions
[       OK ] CustomTypes.MemberFunctions (1 ms)
[ RUN      ] CustomTypes.ConstMemberFunctionsWithRawPointers
[       OK ] CustomTypes.ConstMemberFunctionsWithRawPointers (0 ms)
[ RUN      ] CustomTypes.ConstMemberFunctionsWithSharedPointers
[       OK ] CustomTypes.ConstMemberFunctionsWithSharedPointers (0 ms)
[ RUN      ] CustomTypes.ConstVolatileMemberFunctions
[       OK ] CustomTypes.ConstVolatileMemberFunctions (0 ms)
[ RUN      ] CustomTypes.MemberFunctionsReturnedObjects
[       OK ] CustomTypes.MemberFunctionsReturnedObjects (1 ms)
[ RUN      ] CustomTypes.MembersPlain
[       OK ] CustomTypes.MembersPlain (0 ms)
[ RUN      ] CustomTypes.MembersPointers
Segmentation fault (core dumped)

Using stock Lua 5.2 works fine.

@tomaka
Copy link
Owner

tomaka commented May 9, 2014

I know there is a segfault: https://travis-ci.org/Tomaka17/luawrapper/jobs/23737530
It's probably a bug in LuaJIT, not from the compiler.

@JesseTG
Copy link
Author

JesseTG commented May 9, 2014

Oh, uh, I see. I need to learn to check Travis more often--maybe even use it myself, too.

Anyway, what part of the test does the segfault come from, and where in your library is it triggered? Maybe I can file a bug report.

Tomaka17 [email protected] wrote:

I know there is a segfault: https://travis-ci.org/Tomaka17/luawrapper/jobs/23737530
It's probably a bug in LuaJIT, not from the compiler.


Reply to this email directly or view it on GitHub:
#19 (comment)

Habbie added a commit to PowerDNS/luawrapper that referenced this issue Mar 24, 2017
Allow embedded NULs in strings received from Lua
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants