-
Notifications
You must be signed in to change notification settings - Fork 208
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
ccanlint core dumps if _info example contains a comment #39
Comments
It no longer core dumps, but I don't think it's working right. I think 2512fec broke ccanlint for everything. scameron@sirius ~/github/ccan/ccan $ git log --oneline | head -5 |
smcameron [email protected] writes:
Ah, I use // comments inside Examples, for this reason. The real problem is that it didn't test _info for compilation. Fixed.
Yes, that might be a good addition. I use "ccanlint -t examples_compile Thanks! |
I think I must not have been clear. I think the latest commit -- 2512fec -- broke ccanlint for everything. A few examples:
|
smcameron [email protected] writes:
Sorry, I think "make clean; make tools/ccanlint/ccanlint" will fix it. Yeah, better Makefiles would be nice... Sorry, |
No, already tried that. Also tried with a fresh "git clone...". Still same problem. Here's what I did:
Same problem. |
On Sat, May 07, 2016 at 07:16:10AM -0700, smcameron wrote:
Yeah, seems so. Looks like a missing hunk from the commit to me.
David Gibson | I'll have my music baroque, and my code |
Rusty, I really suspect you haven't committed tools/ccanlint/tests/info_compiles.c, but just have it |
David Gibson [email protected] writes:
Crap, I did a fresh clone, built, and ran ccanlint and it "worked fine". Of course, it was using the ccanlint from the old tree (because it's Sorry for the hassle. I've also removed altstack from "make (fast)check", so Sorry, |
Works now. Thanks. |
This cost me about an hour before I figured out the cause (but not the real solution). I could see this issue turning away contributors, as they might have a ready made example on hand that they slam into their _info file which happens to contain some comments, and then ccanlint inexplicably loses its lunch. So it might be worth making ccanlint at least not core dump, and give a better hint about what might be going on.
How to reproduce the issue:
Example:
A possible solution would be to change the format of _info files to not require the example program to be inside a comment, but rather inside #ifdef CCAN_EXAMPLE_CODE ... #endif or something like that. That would have the added benefit that the example could be more easily extracted via cut and paste or :w, etc. without requiring any editing on the user's part, and the example could actually contain comments.
The text was updated successfully, but these errors were encountered: