~sircmpwn/hare-users

3 2

regex module bug

Devank Karkihalli <devank4000@gmail.com>
Details
Message ID
<yj3edlqospvwagxplsxr2ckwp4kjnr6sjnrlbrliqmvr73u6qc@ev57ucfd3s73>
DKIM signature
pass
Download raw message
Hare fails with a runtime error when provided with the following regular expression:

```hare
use regex;

export fn main() void = {
	const re = regex::compile(`a|(b)`)!;
	const results = regex::findall(&re, "a");
};
```

Abort: regex/regex.ha:593:31: Found a groupend token ")" without having previously seen a groupstart token "(". Please report this as a bug
regex/regex.ha:593:174 regex::run_thread+0xaa3 [0x8033ebc]

regex/regex.ha:753:64 regex::search+0x5ac [0x80317cf]

regex/regex.ha:842:44 regex::findall+0x1d7 [0x8030e3f]

main+0x13a [0x8039562]
rt/+linux/start.ha:13:13 rt::start_ha+0xe [0x8003da6]

rt/+linux/platformstart-libc.ha:8:17 rt::start_linux+0x3a [0x8003f8e]
Details
Message ID
<127ae26e-5dc4-4acb-8c77-5d9d813caf51@app.fastmail.com>
In-Reply-To
<yj3edlqospvwagxplsxr2ckwp4kjnr6sjnrlbrliqmvr73u6qc@ev57ucfd3s73> (view parent)
DKIM signature
pass
Download raw message
Thanks! There's already a patch that fixes this. I'm just waiting for an update from Sebastian (cc'd).
Details
Message ID
<362306e5-2a89-4074-b28f-caed1a700394@app.fastmail.com>
In-Reply-To
<127ae26e-5dc4-4acb-8c77-5d9d813caf51@app.fastmail.com> (view parent)
DKIM signature
pass
Download raw message
This bug has now been fixed. For more details, see: https://lists.sr.ht/~sircmpwn/hare-dev/%3C0d1adb8a-1842-4364-881e-d7163d919d0b@app.fastmail.com%3E
Devank Karkihalli <devank4000@gmail.com>
Details
Message ID
<ymlwi4pektcoire5wiyceaop26tazksirstdpwhznu35o2m3e3@qtklnxbtvpl7>
In-Reply-To
<127ae26e-5dc4-4acb-8c77-5d9d813caf51@app.fastmail.com> (view parent)
DKIM signature
pass
Download raw message
Thanks for the fix! Great writeup as well.
Reply to thread Export thread (mbox)