Bug 2587560 - qepcad-B hangs reading its rc file on aarch64 (char compared to EOF)
Summary: qepcad-B hangs reading its rc file on aarch64 (char compared to EOF)
Keywords:
Status: ASSIGNED
Alias: None
Product: Fedora
Classification: Fedora
Component: qepcad-B
Version: 45
Hardware: aarch64
OS: Linux
unspecified
medium
Target Milestone: ---
Assignee: Jerry James
QA Contact: Fedora Extras Quality Assurance
URL: https://github.com/chriswestbrown/qep...
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2026-11-30 19:23 UTC by Doug Torrance
Modified: 2026-11-30 21:42 UTC (History)
1 user (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed:
Type: ---
Embargoed:


Attachments (Terms of Use)

Description Doug Torrance 2026-11-30 19:23:48 UTC
On aarch64, qepcad loops forever while reading its rc file, then eventually aborts with std::bad_alloc. The input-stream code reads characters into a plain `char` and compares it to EOF. On aarch64, plain char is unsigned, so in.get() returning -1 becomes 255 and never compares equal to EOF.


Reproducible: Always

Steps to Reproduce:
Run qepcad on an aarch64 machine
Actual Results:
qepcad spins reading the rc file until it aborts with std::bad_alloc.

Expected Results:
qepcad reads the rc file and starts normally, as it does on x86_64.

Additional Information:
Debian has carried a fix since 2021: declare these variables as `signed char` in source/db/convenientstreams.h, source/convenientstreams.h, and extensions/rend/rend.h.

Patch: https://salsa.debian.org/math-team/qepcad/-/raw/master/debian/patches/signed-char-eof.patch
Debian bug: https://bugs.debian.org/996561
Upstream PR: https://github.com/chriswestbrown/qepcad/pull/3

Macaulay2 currently has to leave qepcad-B out of its aarch64 Fedora build image because of this:
https://github.com/Macaulay2/M2/pull/4831

Comment 1 Jerry James 2026-11-30 21:42:55 UTC
Thanks for the report and the pointer to the patch, Doug. Much appreciated! I will push builds today with this patch. Those for the stable Fedora releases (44 and 45) will need to go through the usual testing process, which means they should be available early next week.  (Fedora 43 reaches End Of Life in 2 days, so I'm not going to do anything with it.)


Note You need to log in before you can comment on or make changes to this bug.