Giter Club home page Giter Club logo

Comments (7)

remicollet avatar remicollet commented on July 19, 2024

Tyring to find how to run 1 test to get the backtrace.???

from handlebars.c.

remicollet avatar remicollet commented on July 19, 2024
(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.

remicollet avatar remicollet commented on July 19, 2024

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.

remicollet avatar remicollet commented on July 19, 2024

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.

jbboehr avatar jbboehr commented on July 19, 2024

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.

jbboehr avatar jbboehr commented on July 19, 2024

Thanks for looking into it, btw.

from handlebars.c.

remicollet avatar remicollet commented on July 19, 2024

I confirm the fix is ok.
Build + test suite are ok now.

from handlebars.c.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.