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

operator overloading seg fault #3867

Closed
jesse99 opened this issue Oct 26, 2012 · 3 comments
Closed

operator overloading seg fault #3867

jesse99 opened this issue Oct 26, 2012 · 3 comments
Labels
A-codegen Area: Code generation A-traits Area: Trait system I-crash Issue: The compiler crashes (SIGSEGV, SIGABRT, etc). Use I-ICE instead when the compiler panics.
Milestone

Comments

@jesse99
Copy link
Contributor

jesse99 commented Oct 26, 2012

Tried to use operator overloading in my rparse library and it worked fine until the end when it began segfaulting. Finally tracked it down to the everything method which looks like this:

fn everything<U: Copy Owned>(space: Parser<U>) -> Parser<T>
{
    space >> self << eot()
}

If my test calls that method it segfaults. If my test manually inlines the body of the method it passes. If you add some logging to the shl method pass1 winds up with a garbage integer value instead of an Xml struct (assuming you use the %? specifier and make check1).

@jesse99
Copy link
Contributor Author

jesse99 commented Oct 26, 2012

To repro the problem do this:

git clone [email protected]:jesse99/rparse.git
cd rparse
git checkout ops
make check1 # should seg fault
uncomment src/tests/test_xml.rs line 170
comment out src/tests/test_xml.rs line 171
make check1 # should pass

@jesse99
Copy link
Contributor Author

jesse99 commented Oct 26, 2012

Note that I can work around this particular crash, but it seems symptomatic of a deeper problem: I tried updating one of my projects which uses rparse and that also started segfaulting.

@pnkfelix
Copy link
Member

�While the bug report is certainly appreciated, it seems like it will take a considerable amount of effort to forward-port the state of the repository referenced in the comment above. Jesse, if you get the chance to forward-port your work to see if this bug persists, that would be great.

In the meantime, I am going to follow @catamorphism's lead from #4260 and close this ticket as unreproducible.

RalfJung pushed a commit to RalfJung/rust that referenced this issue Sep 17, 2024
Renamed variable and fixed comments referring to renamed FileDescriptor

Fixes rust-lang#3808, does not change any functionality
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-codegen Area: Code generation A-traits Area: Trait system I-crash Issue: The compiler crashes (SIGSEGV, SIGABRT, etc). Use I-ICE instead when the compiler panics.
Projects
None yet
Development

No branches or pull requests

2 participants