Fix issue 17075 ctRegex BacktrackingMatcher.prevStack: free(): invali…#5252
Fix issue 17075 ctRegex BacktrackingMatcher.prevStack: free(): invali…#5252dlang-bot merged 2 commits intodlang:stablefrom
Conversation
|
f296ed2 to
74327fd
Compare
| case IR.NeglookbehindEnd: | ||
| case IR.End: | ||
| // cleanup stale stack blocks if any | ||
| while (prevStack()) {} |
There was a problem hiding this comment.
I don't get it - CircleCI keeps naging about this line - space after 'while'. But in the latest commit there IS a space between while and paren.
74327fd to
f9053cb
Compare
|
Overall - automation is pain in the ass when it doesn't work. |
|
Same stable problem will happen here |
f9053cb to
dda9f4c
Compare
|
Ping @JackStouffer This is important bugfix let's not allow it to slip through. |
|
I think it's complaining because it's expecting Maybe the circleCI script should be fixed to allow this if it's an empty block. |
Then it has to be fixed not the code. It makes no sense to put {} on the new line just to appease the script. |
|
I agree. But there's also these errors: |
These existed on the stable branch and should be fixed separately if at all. |
std/regex/internal/backtracking.d
Outdated
| assert(0); | ||
| } | ||
| // cleanup stale stack blocks | ||
| while(prevStack()){} |
There was a problem hiding this comment.
CircleCI clearly complains about this line, guys. Needs a space after while (and one before {}, probably).
There was a problem hiding this comment.
You're right, that's the real cause. Sorry for the noise.
dda9f4c to
d5046e1
Compare
|
You're still missing a space between |
d5046e1 to
d47c885
Compare
|
Btw, what's the feature somebody mentioned where reviewers can edit the PR themselves? That would be very useful here instead of having so many roundtrips back and forth. How does that feature work? |
Aargh! Fixed. |
|
Ah, finally style is passing... |
http://wiki.dlang.org/Guidelines_for_maintainers#write-access-to-prs |
|
But |
This test is needed to ensure that all public unittests in dlang.org really compile and don't show import errors to the user. |
|
Ah, so the problem is missing imports in a unittest block? |
Exactly - the script tries to simulate the execution on dlang.org by extracting all public unittests, putting them into a new file (one for each source file, slashes are replaced with underscores) and then subsequently trying to execute the extracted tests. |
|
Hmm, finally figured out how to push commits to somebody else's PR. That was rather non-obvious! |
|
Woohoo, |
|
Hmm, now it's complaining about code coverage. What's going on? |
|
OK, apparently too much of Ping @DmitryOlshansky (btw, I don't know how things are supposed to work after maintainers push commits to the PR; you may have to do a |
At the moment I am just at my phone, so a couple of general general points:
|
It might just be that the code in question is CTFE-only (DMD doesn't currently track coverage data during CTFE execution, nor folds the data into the runtime stats). It's fine to ignore failures in that case; Codecov is not marked as "required" for this reason. |
I don't buy it. The main reason is I think that coverage is computed by running the tests of the module in isolation. All tests of backtracking are hoisted out to tests.d so any addition of lines will negatively impact coverage in this model. |
I am not sure about the process either, but it's essentially a force-push, so git pulling will set the local branch to the state of the remote branch. |
FYI: The reason for this is that there was some weird, unexplainable behavior of the coverage feature that led to about 2K less covered lines when the test suite was ran with all tests in one go. |
|
OK, in that case, I'm just gonna push the merge button. A bugfix for a serious bug as this one shouldn't be held up by these petty things. |
Backtracking engine memory management was horribly broken in multiple ways.
This fixes the mentioned issue and a couple other subtle bugs.
Finally I can pass the test suite with memory chunk size of 1 state, so things are more robust.