-
Notifications
You must be signed in to change notification settings - Fork 85
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
Don't self-initialize schema comments #2038
Conversation
Yikes. Sorry about that, any reason why our tests don't catch this?
Not this one. By default the comment is supposed to be empty, but the second constructor is used as a "more complete" one, for copying, AFAICT. |
It was only happening in release mode, I had to compile with the RelWithDebInfo configuration to debug it (which turned a dozen or so crashes into every single database test crashing immediately). So it might vary with the compiler: I think CI is using gcc 11, while I'm building with gcc 13. A quick test in godbolt shows that it produces a segfault on gcc 12+, and succeeds on gcc <11. It also works fine in clang, which is the only one to produce a warning. |
Codecov ReportPatch coverage:
Additional details and impacted files@@ Coverage Diff @@
## master #2038 +/- ##
==========================================
- Coverage 90.14% 90.14% -0.01%
==========================================
Files 934 938 +4
Lines 33365 33364 -1
==========================================
- Hits 30077 30076 -1
Misses 3288 3288
☔ View full report in Codecov by Sentry. |
Yet another reason to use clang 😉 |
Except there are so many warnings in the codebase that you wouldn't notice with clang normally. If we could clean up all the warnings and turn them into errors, then it could have been caught by the clang CI. |
ANTLR4 is particularly loud. I might look into reducing our warnings, ive always liked Werror |
I was getting tons of segfaults on my computer when running tests. It turned out that the new comment field in the TableSchema is being initialized to itself in one of the constructors.
Is the comment supposed to be passed as an argument to this constructor? I just default-initialized it instead, which fixed the crashes.