Script-Fu re-match crashes when called with 3 arguments
GIMP version: 2.10.8
Operating System: Windows 7
Package: official installer
Description of the bug
I noticed one of my scripts is crashing on GIMP 2.10 even though it worked fine in 2.8. Eventually I managed to find the cause of the crash, which is a little-known regular expression feature of Script-Fu. The function re-match crashes when called with 3 arguments, and there is no match.
Reproduction
Is the bug reproducible? Always
Reproduction steps:
- Open Script-Fu console
- Paste the following code: (re-match "a" "b" (make-vector 1))
Note: Third argument must be present otherwise it doesn't crash. The first two arguments must be such that re-match returns #f on them, otherwise it doesn't crash
Expected result:
#f is returned.
Actual result:
GIMP appears to hang and "script-fu.exe has stopped working" error window appears.
Additional information
Problem signature:
Problem Event Name: APPCRASH
Application Name: script-fu.exe
Application Version: 2.10.8.0
Application Timestamp: 00000000
Fault Module Name: libglib-2.0-0.dll
Fault Module Version: 2.58.1.0
Fault Module Timestamp: 00000000
Exception Code: c0000005
Exception Offset: 0000000000065990
OS Version: 6.1.7601.2.1.0.256.1
Locale ID: 1049
Additional Information 1: 20d4
Additional Information 2: 20d411b654a4ad4fcecce04c1b13c1c7
Additional Information 3: 998c
Additional Information 4: 998c86f8584f7d6d11c770a34d0f873f