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

UBSAN note #43

Closed
jeroen opened this issue May 29, 2015 · 4 comments · Fixed by #49
Closed

UBSAN note #43

jeroen opened this issue May 29, 2015 · 4 comments · Fixed by #49

Comments

@jeroen
Copy link
Contributor

jeroen commented May 29, 2015

cmark/chunk.h:69:3: runtime error: null pointer passed as argument 2, which is declared to never be null
@jgm
Copy link
Member

jgm commented May 29, 2015

I added make ubsan to try this myself. But I didn't see
any errors. Can you let me know what input you used to
get this?

+++ Jeroen Ooms [May 29 15 02:58 ]:

cmark/chunk.h:69:3: runtime error: null pointer passed as argument 2, which is d
eclared to never be null


Reply to this email directly or [1]view it on GitHub.

References

  1. UBSAN note #43

@jeroen
Copy link
Contributor Author

jeroen commented May 29, 2015

I think it appears when converting to commonmark. See here for the full log. Basically I took this file and converted it to html, xml, man and commonmark.

@jgm
Copy link
Member

jgm commented May 29, 2015

Strange. On linux I get no ubsan warnings for that file,
converting it to html, xml, man, and commonmark.

+++ Jeroen Ooms [May 29 15 11:02 ]:

See [1]here for the full log. Basically I took [2]this file and
converted it to html, xml, man and commonmark.

@jeroen
Copy link
Contributor Author

jeroen commented May 29, 2015

They are using very recent versions of gcc/clang, might be something new. I think you can fix it by making sure you are not calling memcpy with zero bytes and a null pointer in the source.

@jgm jgm closed this as completed in #49 May 31, 2015
PKRoma pushed a commit to PKRoma/cmark that referenced this issue Aug 19, 2018
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

Successfully merging a pull request may close this issue.

2 participants