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

pass_comments misinterpreted URL in a string-literal as a label+ comment #216

Open
erichkeane opened this issue Jun 1, 2020 · 3 comments

Comments

@erichkeane
Copy link

So I found this problem trying to minimize something that included libstdc++.

The original code was:

static_assert(sizeof (uintmax_t) == sizeof (unsigned long long),
"This library calls __builtin_clzll on uintmax_t, which "
"is unsafe on your platform. Please complain to "
"http://gcc.gnu.org/bugzilla/");

the pass replaced the last line there with:
"http:

(note no closing string either!).

The result is it spent all weekend with no ability to clean up anything.

@regehr
Copy link
Member

regehr commented Jun 1, 2020

Hi Erich, I don't understand why this made it take all weekend, can you explain more?

But anyway, the model here is that C-Reduce can try anything at all, and your interestingness test should be robust with respect to this.

@erichkeane
Copy link
Author

I don't particularly know how creduce works, but I would presume because it resulted in no other passes being able to make any progress, since no change it made could actually pass the script.

I let it run over the weekend, and it removed no other code, and I had to kill it. It never ended. "top" showed the clang instances coming and going, but no additional output happened. I saw this:

===< pass_unifdef :: 0 >===
===< pass_comments :: 0 >===
(0.0 %, 7376320 bytes)
===< pass_ifs :: 0 >===
===< pass_includes :: 0 >===
===< pass_line_markers :: 0 >===
===< pass_blank :: 0 >===
===< pass_clang_binsrch :: replace-function-def-with-decl >===
===< pass_clang_binsrch :: remove-unused-function >===
===< pass_lines :: 0 >===

@erichkeane
Copy link
Author

As determined in the second bug report (#217), the 'hanging' behavior that made it take all weekend was a result of my script doing the file name with the full path (since I mis-interpreted the initial interestingness test error message).

So, this sentence: "The result is it spent all weekend with no ability to clean up anything." in my initial bug report was a different issue.

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