Bug 261554 - textproc/mgdiff: crash when aiming to open a file
Summary: textproc/mgdiff: crash when aiming to open a file
Status: Open
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Only Me
Assignee: Cy Schubert
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2022-01-29 13:39 UTC by Graham Perrin
Modified: 2024-03-09 01:44 UTC (History)
4 users (show)

See Also:
bugzilla: maintainer-feedback? (portmaster)


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Graham Perrin freebsd_committer freebsd_triage 2022-01-29 13:39:02 UTC
File menu, Open...

Segmentation fault (core dumped)
Comment 1 Fernando Apesteguía freebsd_committer freebsd_triage 2022-03-08 16:43:10 UTC
It looks to me like a crash in devel/libgnuregex.

In regex_internal.c:re_string_reconstruct pstr->trans is at a memory address which is not accessible. This crashes later in regex_internal.c:re_string_translate_buffer

I'm afraid I'm not familiar with the library as to pin-point where the problem is.

Adding kevans@ to see if he can shed some light here.
Comment 2 Cy Schubert freebsd_committer freebsd_triage 2023-10-04 03:33:39 UTC
(In reply to Fernando Apesteguía from comment #1)

libgnuregex is the victim. mgdiff fails to open a dialog box for file selection, subsequently passing a probable null pointer to libgnuregex. At least this is the going hypothesis. It works if you pass filenames on the command line. Without looking at the source, it's likely a mgdiff bug.
Comment 3 Fernando Apesteguía freebsd_committer freebsd_triage 2023-10-04 10:51:45 UTC
(In reply to Cy Schubert from comment #2)
Yes, agree.

It fails in files.c open_both_files in the call to XmCreateFileSelectionBox.
I tried to dig deeper but I don't know what the problem is (parent widget seems ok, arguments seem ok too).

I would mark this as BROKEN. It is archeology-ware.
Comment 4 Cy Schubert freebsd_committer freebsd_triage 2023-10-04 13:17:38 UTC
BROKEN is for failing to build. IGNORE is for broken during runtime.

I would not characterize the inability to select from a list broken when there are other means to enter filenames, such as by command line.

I will just add it to my list of things to look at, as the port is certainly salvageable. It will fit in nicely on a CDE or Motif desktop.
Comment 5 Cy Schubert freebsd_committer freebsd_triage 2023-10-04 14:30:43 UTC
I'll try to find the time to cobble a patch by the end of the year. It'll just be a simple matter of building motif, libgnuregex and this port with debugging symbols on my sandbox machine. This should tell us a lot more. Probably sometime in December.
Comment 6 Chris Hutchinson 2024-03-09 01:36:42 UTC
*really* sorry. I only just noticed this.
I'll dig into this and see what I can discover. Is it still
a problem for you, Graham?

In any case. Thanks for the report!

--Chris
Comment 7 Chris Hutchinson 2024-03-09 01:44:24 UTC
Yep! File open...  dumps core. :/
I'll see if I can get to it this weekend.

--Chris