Bug #11551
closed`[BUG] cfp consistency error` for unidentified reasons
Description
The code changes https://github.com/sgrif/rails/commit/ddbed0040f5e99a751b130de8213f7cc7e0d155d cause a segfault when running the test case in activemodel/test/cases/validations/acceptance_validations_test
. The code to reproduce is on that repo on the branch sg-segfault-example. The output from the crash is here: https://gist.github.com/sgrif/8775e4fa6b915868a893
Updated by seantheprogrammer (Sean Griffin) almost 10 years ago
There is a typo in the method_missing
definition which is the cause here. Changing attribute_defintion
to attribute_definition
fixes it, so the bug appears to have something to do with a method_missing
invocation when it's defined this way.
Updated by nobu (Nobuyoshi Nakada) almost 10 years ago
- Subject changed from Segfault for unidentified reasons to `[BUG] cfp consistency error` for unidentified reasons
- Status changed from Open to Feedback
Can't you make short code to reproduce it?
Updated by seantheprogrammer (Sean Griffin) almost 10 years ago
I've tried to create an isolated script to reproduce the problem, but haven't been able to thus far. I'll keep seeing if I can, but at the moment it appears to be a weird interaction between the code linked and the rest of rails.
Updated by seantheprogrammer (Sean Griffin) almost 10 years ago
Aha, I got it. It has to do with minitest. Reproduction script: https://gist.github.com/sgrif/720b7473c5ce9a51d6e2
Updated by nobu (Nobuyoshi Nakada) almost 10 years ago
- Status changed from Feedback to Rejected
It occurred a system stack overflow.
Ruby tries to catch it as possible, but it is very hard (or nearly impossible) to handle it flawlessly, as it can occur in a critical section, other external libraries, and so on.