test failure - invalid conversion on armhf

Bug #1918456 reported by Dan Bungert
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
iniparser (Ubuntu)
Fix Released
Undecided
Unassigned

Bug Description

The following armhf test failure has been observed:
1) Test_iniparser_getlongint: test_iniparser.c:385: expected <-1> but was <2147483647>

Some of the warnings may also be relevant:
test_iniparser.c:353:9: warning: integer constant is too large for ‘long’ type [-Wlong-long]
  353 | { 0x7FFFFFFFFFFFFFFF, "0x7FFFFFFFFFFFFFFF" },
      | ^
test_iniparser.c:353:11: warning: overflow in conversion from ‘long long int’ to ‘long int’ changes value from ‘9223372036854775807’ to ‘-1’ [-Woverflow]
  353 | { 0x7FFFFFFFFFFFFFFF, "0x7FFFFFFFFFFFFFFF" },
      | ^~~~~~~~~~~~~~~~~~
test_iniparser.c:354:9: warning: integer constant is too large for ‘long’ type [-Wlong-long]
  354 | { -0x7FFFFFFFFFFFFFFF, "-0x7FFFFFFFFFFFFFFF" },
      | ^
... [ several more like this follow ]

https://launchpadlibrarian.net/527109834/buildlog_ubuntu-hirsute-armhf.iniparser_4.1-4ubuntu1_BUILDING.txt.gz

Dan Bungert (dbungert)
Changed in iniparser (Ubuntu):
assignee: nobody → Dan Bungert (dbungert)
tags: added: fr-1199
Dan Bungert (dbungert)
Changed in iniparser (Ubuntu):
status: New → In Progress
Dan Bungert (dbungert)
tags: added: ftbfs
Revision history for this message
Dan Bungert (dbungert) wrote :

Patch attached - fixes test by using LONG_MAX/MIN instead of hardcoded values that assume long int == int64_t.

Changed in iniparser (Ubuntu):
status: In Progress → Confirmed
assignee: Dan Bungert (dbungert) → nobody
Revision history for this message
Christian Ehrhardt  (paelzer) wrote :

Hi Dan,
I was coming by the same issue today when parsing excuses and was glad you already did all of the work :-) Let me add an update-excuse tag to have others find it even faster ... :-)

tags: added: update-excuse
Revision history for this message
Christian Ehrhardt  (paelzer) wrote :

I like the fix and that you already started upstreaming the change.
Not finding a new issue, but knowing about the old one I have sponsored your change (with -v vs 4.1-4). Also this is a pure bug-fix so we don't need FFe considerations and it is also important as it (the ubuntu1 upload) fixes further requirements picked up on the MIR review.
=> https://launchpad.net/ubuntu/+source/iniparser/4.1-4ubuntu2

I hope that helps to get this moving forward.

Changed in iniparser (Ubuntu):
status: Confirmed → Fix Committed
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package iniparser - 4.1-4ubuntu2

---------------
iniparser (4.1-4ubuntu2) hirsute; urgency=medium

  * Genericize long int tests to accomodate where sizeof(long int) != 8
    (LP: #1918456)

iniparser (4.1-4ubuntu1) hirsute; urgency=medium

  * Change tests so that a test failure will stop the build (LP: #1915866)
  * Improvements to build steps such that objects from test get cleaned up
  * Incorporate upstream commit 2412f165bcfde4ad8e3426fd59f2a920492b8c19 from
    PR #104 to address likely 1 byte stack buffer overflow
    (thanks Edik Ponomarenko)

 -- Dan Bungert <email address hidden> Tue, 16 Mar 2021 11:42:53 -0600

Changed in iniparser (Ubuntu):
status: Fix Committed → Fix Released
Revision history for this message
Dan Bungert (dbungert) wrote :

Thanks for the sponsorship Christian!

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

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