unittest failure on armhf and glibc 2.37

Bug #2008108 reported by Dan Bungert
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
glibc (Ubuntu)
Invalid
Undecided
Unassigned
notcurses (Ubuntu)
Fix Released
Undecided
Dan Bungert

Bug Description

notcurses autopkgtest will fail on the unittest stage when triggered with glibc 2.37.

Sample log:
https://autopkgtest.ubuntu.com/results/autopkgtest-lunar/lunar/armhf/n/notcurses/20230216_230901_2c553@/log.gz

Dan Bungert (dbungert)
Changed in notcurses (Ubuntu):
assignee: nobody → Dan Bungert (dbungert)
status: New → In Progress
Revision history for this message
Dan Bungert (dbungert) wrote :

https://github.com/dankamongmen/notcurses/pull/2707 sent upstream (hi nick :)

This was an interesting one to debug. The tests are (indirectly) using snprintf, and don't seem close to consuming the buffer size, but are sending a too-large size for the size_t value in snprintf, and that triggers truncation of the printed value somehow. Worse, the truncation behavior isn't consistent. See attached reproducer which shows the weird truncation behavior.

Changed in notcurses (Ubuntu):
status: In Progress → Fix Committed
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package notcurses - 3.0.7+dfsg.1-1ubuntu3

---------------
notcurses (3.0.7+dfsg.1-1ubuntu3) lunar; urgency=medium

  * Fix metrics test where a call to snprintf() had size > bufsize.
    (LP: #2008108)

 -- Dan Bungert <email address hidden> Wed, 22 Feb 2023 20:14:38 -0700

Changed in notcurses (Ubuntu):
status: Fix Committed → Fix Released
Revision history for this message
Simon Chopin (schopin) wrote :

Marking as Invalid for glibc since it's technically a user UB (granted, a weird one :) )

Changed in glibc (Ubuntu):
status: New → Invalid
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Bug attachments

Remote bug watches

Bug watches keep track of this bug in other bug trackers.