Comments (7)
Tyring to find how to run 1 test to get the backtrace.???
from handlebars.c.
(gdb) bt
#0 test_ast_to_string_on_handlebars_spec (_i=436) at test_spec_handlebars.c:275
#1 0x00007fe4e7cf5755 in srunner_run_tagged () from /lib64/libcheck.so.0
#2 0x000055fd3c015f2d in main (argc=<optimized out>, argv=<optimized out>) at test_spec_handlebars.c:630
from handlebars.c.
A simple build works, so can be related to some security enhancement build options:
-O2 -g -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -fexceptions -fstack-protector-strong -grecord-gcc-switches -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -pthread -c handlebars_ast_helpers.c -fPIC -DPIC
And seems to have lot of bad buid warnings: [-Wint-conversion], [-Wdiscarded-qualifiers], [-Wnonnull], [-Wformat-truncation=], [-Wimplicit-function-declaration], [-Wincompatible-pointer-types]...
from handlebars.c.
Found the culprit
Default RPM link options use -specs=/usr/lib/rpm/redhat/redhat-hardened-ld
$ cat /usr/lib/rpm/redhat/redhat-hardened-ld
*self_spec:
+ %{!static:%{!shared:%{!r:-pie}}}
Removing this _hardened_ldflags allow test suite to pass... but still something wrong somewhere
from handlebars.c.
Heh, well I figured out what it was, probably:
diff --git a/tests/test_spec_handlebars.c b/tests/test_spec_handlebars.c
index 058310b..5a75bfd 100644
--- a/tests/test_spec_handlebars.c
+++ b/tests/test_spec_handlebars.c
@@ -38,6 +38,7 @@
#include "handlebars.h"
#include "handlebars_memory.h"
+#include "handlebars_ast_printer.h"
#include "handlebars_compiler.h"
#include "handlebars_helpers.h"
#include "handlebars_opcode_serializer.h"
from handlebars.c.
Thanks for looking into it, btw.
from handlebars.c.
I confirm the fix is ok.
Build + test suite are ok now.
from handlebars.c.
Related Issues (20)
- Multi-line comment issue HOT 1
- Input buffer overflow
- Emulated length property
- Mustache-style lambdas HOT 2
- Question: Documentation / this HOT 4
- Add github pages with existing documentation
- AlpineLinux apk Package HOT 36
- check minimal version HOT 6
- Segmentation fault using lookup with non-string key parameter
- test_spec_handlebars_parser 62 segfaults on ppc64le (Alpine Linux) HOT 4
- test_cache.c:LMDB Cache (Reset):test_lmdb_cache_reset failed (Alpine Linux) HOT 5
- Handlebars decorators and inline partial support
- windows support HOT 2
- Support partials with the executable
- Build failure with [-Werror=format-security] HOT 4
- handlebars_value_init_json_string_length
- does not compile with configure --disable-refcounting
- partials from json context
- Create shared library HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from handlebars.c.