Opened 4 years ago

Closed 4 years ago

#60363 closed defect (fixed)

jq segfaults on regex because of old oniguruma version

Reported by: bgdnlp (Bogdan Luput) Owned by: raimue (Rainer Müller)
Priority: Normal Milestone:
Component: ports Version: 2.6.2
Keywords: Cc:
Port: jq oniguruma5

Description

When matching a REGEX in jq it crashes with a segfault if expressions like ".*" are used on long strings. That's because of a bug in the Oniguruma library it uses, which was fixed.

Here's the jq Github issue: https://github.com/stedolan/jq/issues/1370

Here's the corresponding Oniguruma pull request that fixes the problem: https://github.com/kkos/oniguruma/pull/51

jq version 1.6 downloaded from the jq website works with no issues.

Change History (4)

comment:1 Changed 4 years ago by bgdnlp (Bogdan Luput)

Type: defectupdate

comment:2 Changed 4 years ago by jmroot (Joshua Root)

Owner: set to raimue
Port: oniguruma5 added
Status: newassigned
Type: updatedefect

comment:3 Changed 4 years ago by raimue (Rainer Müller)

Hm, looks like this was never fixed on the oniguruma 5.x branch and only made its way into v6.x tags as indicated by GitHub for the corresponding commit. I guess the best option would be to use the oniguruma6 port. However, this will cause a disruption for users and will not have a straight update path as the ports are conflicting.

PR: https://github.com/macports/macports-ports/pull/7024

Let's see if anyone else can come up with a better idea, otherwise I will just merge this and everyone will have to uninstall oniguruma5 first.

comment:4 Changed 4 years ago by raimue (Rainer Müller)

Resolution: fixed
Status: assignedclosed

In f26b0b6895faf26a3549dc410989352f21c39881/macports-ports (master):

jq: Replace oniguruma5 with oniguruma6

This update will cause a disruption for users and will not have
a straight-forward upgrade path as oniguruma5 and oniguruma6 are
conflicting. As other ports use oniguruma5 as a dependency, I do not
think there will be any better way to handle this.

In case of an error on upgrade, uninstall oniguruma5 first:

sudo port uninstall oniguruma5

Closes: #60363

Note: See TracTickets for help on using tickets.