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

0.7.0 SIGSEGV #14

Closed
ilovezfs opened this issue Jul 3, 2017 · 5 comments
Closed

0.7.0 SIGSEGV #14

ilovezfs opened this issue Jul 3, 2017 · 5 comments

Comments

@ilovezfs
Copy link

ilovezfs commented Jul 3, 2017

This bug is caused by fd65dd8 and goes away if I revert that commit.

Running
gh-md-toc ../README.md crashes.

iMac-TMP:github-markdown-toc.go joe$ /usr/local/Cellar/github-markdown-toc/HEAD-3959e2c/bin/gh-md-toc  ../README.md

Table of Contents
=================

panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x0 pc=0x12ba246]

goroutine 1 [running]:
main.(*GHToc).Print(0x0)
	/private/tmp/github-markdown-toc-20170703-12178-5ub0au/src/github.com/ekalinin/github-markdown-toc.go/main.go:28 +0x26
main.main()
	/private/tmp/github-markdown-toc-20170703-12178-5ub0au/src/github.com/ekalinin/github-markdown-toc.go/main.go:265 +0xa9a
(lldb) r ../README.md
Process 12715 launched: '/usr/local/Cellar/github-markdown-toc/HEAD-3959e2c/bin/gh-md-toc' (x86_64)

Table of Contents
=================

Process 12715 stopped
* thread #1: tid = 0xae9b72, 0x00000000012ba246 gh-md-toc`main.(toc=(len <parent is NULL>, cap <parent is NULL>)).Print + 38 at main.go:28, stop reason = EXC_BAD_ACCESS (code=1, address=0x0)
    frame #0: 0x00000000012ba246 gh-md-toc`main.(toc=(len <parent is NULL>, cap <parent is NULL>)).Print + 38 at main.go:28
(lldb) bt
* thread #1: tid = 0xae9b72, 0x00000000012ba246 gh-md-toc`main.(toc=(len <parent is NULL>, cap <parent is NULL>)).Print + 38 at main.go:28, stop reason = EXC_BAD_ACCESS (code=1, address=0x0)
  * frame #0: 0x00000000012ba246 gh-md-toc`main.(toc=(len <parent is NULL>, cap <parent is NULL>)).Print + 38 at main.go:28
    frame #1: 0x00000000012bc1ea gh-md-toc`main.main + 2714 at main.go:265
    frame #2: 0x000000000102bb8a gh-md-toc`runtime.main + 522 at proc.go:185
    frame #3: 0x0000000001054ee1 gh-md-toc`runtime.goexit + 1 at asm_amd64.s:2197
    frame #4: 0x00000000012bc1ea gh-md-toc`main.main + 2714 at main.go:265
    frame #5: 0x000000000102bb8a gh-md-toc`runtime.main + 522 at proc.go:185
    frame #6: 0x0000000001054ee1 gh-md-toc`runtime.goexit + 1 at asm_amd64.s:2197
    frame #7: 0x000000000102bb8a gh-md-toc`runtime.main + 522 at proc.go:185
    frame #8: 0x0000000001054ee1 gh-md-toc`runtime.goexit + 1 at asm_amd64.s:2197
    frame #9: 0x0000000001054ee1 gh-md-toc`runtime.goexit + 1 at asm_amd64.s:2197
(lldb) 
@ekalinin
Copy link
Owner

ekalinin commented Jul 3, 2017

Hey,

Thanks for report. Would you be able to show me that ../README.md?

@ilovezfs
Copy link
Author

ilovezfs commented Jul 3, 2017

There is no such file :)

@ilovezfs
Copy link
Author

ilovezfs commented Jul 3, 2017

@ekalinin
Copy link
Owner

ekalinin commented Jul 3, 2017

Ok, got it. Thanks.

@ilovezfs
Copy link
Author

ilovezfs commented Jul 4, 2017

@ekalinin Thanks! Homebrew/homebrew-core#15273.

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

2 participants