-
-
Notifications
You must be signed in to change notification settings - Fork 5.5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix PCRE2 error constants and gracefully handle disabled JIT
When the JIT is disabled, the PCRE.jit_compile function would throw to complain. That's not particularly nice, since we don't check before whether the JIT is enabled. Instead, return a boolean to indicate whether the jit was enabled (other errors still throw at jit compile time). While I was at it, I noticed that we no longer have the ERROR_ flags in pcre_h.jl (I'm sure we once did, because there's other parts of this file that use them, in particular the error path in PCRE.info). Adjust the regex to also capture those error falgs, which are specified as e.g.: ``` ``` Finally, add a test for the error path in PCRE.info to make sure it throws an ErrorException, not an UndefVarError.
- Loading branch information
Showing
3 changed files
with
11 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
c9e5a6a
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Executing the daily benchmark build, I will reply here when finished:
@nanosoldier
runbenchmarks(ALL, isdaily = true)
c9e5a6a
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@Keno can you explain to me why you added the
% UInt32
to theseccall
's? They seem to be causing problems, because PCRE's error codes are negative. The error I get isInexactError(:check_top_bit, UInt32, 0xffffffd0)
, which is kind of confusing to me since I would think that that value should be representable as aUInt32
.c9e5a6a
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hmm? The point of the
% UInt32
is to do the truncation without the conversion check:Are you sure you didn't accidentally have an old version of the Makefile that used the
UInt32()
form which would throw that error?c9e5a6a
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think you must be right, although I don't know why I would have had that old version. /shrug