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

runtime error: null pointer passed as argument 2, which is declared to never be null #161

Open
geeknik opened this issue Nov 5, 2017 · 0 comments

Comments

@geeknik
Copy link

geeknik commented Nov 5, 2017

echo "=" | ./sundown triggers this undefined behavior with the latest commit when compiled with -fsanitize=undefined.

src/buffer.c:162:32: runtime error: null pointer passed as argument 2, which is declared to never be null
/usr/include/string.h:43:28: note: nonnull attribute specified here
    #0 0x51e8af in bufput /root/sundown/src/buffer.c:162:2
    #1 0x529ff6 in rndr_header /root/sundown/html/html.c:228:12
    #2 0x4f8139 in parse_paragraph /root/sundown/src/markdown.c:1532:4
    #3 0x4f8139 in parse_block /root/sundown/src/markdown.c:2243
    #4 0x4f01b5 in sd_markdown_render /root/sundown/src/markdown.c:2517:3
    #5 0x4e95a4 in main /root/sundown/examples/sundown.c:67:2
    #6 0x7f6d58a183f0 in __libc_start_main /build/glibc-mXZSwJ/glibc-2.24/csu/../csu/libc-start.c:291
    #7 0x419c49 in _start (/root/sundown/sundown+0x419c49)

SUMMARY: UndefinedBehaviorSanitizer: undefined-behavior src/buffer.c:162:32
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

1 participant