Note: This is a public test instance of Red Hat Bugzilla. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback at bugzilla.redhat.com.

Bug 1316206

Summary: erl_interface: regression in erl_decode for LLONG_MIN longlong value
Product: [Fedora] Fedora Reporter: Pino Toscano <ptoscano>
Component: erlangAssignee: Peter Lemenkov <lemenkov>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: rawhideCC: erlang, jeckersb, lemenkov, ptoscano, rhbugs, rjones, s
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: erlang-18.3.4-1.fc24 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2016-06-23 17:54:50 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 910269    
Attachments:
Description Flags
simple reproducer none

Description Pino Toscano 2016-03-09 16:55:36 UTC
Created attachment 1134565 [details]
simple reproducer

Description of problem:
In libguestfs we have erlang bindings using OTP, and one of the tests involves passing limit values and checking that they are read as expected in the C API.

It seems erl_decode fails to decode -9223372036854775808 (which is LLONG_MIN) as ERL_LONGLONG value, giving a ERL_INTEGER with value -1.

The attached test case contains the dump of a message (the libguestfs add_drive_scratch call) whose second item in the tuple is a longlong.

Version-Release number of selected component (if applicable):
erlang-erl_interface-18.2.4-2.fc25.x86_64

How reproducible:
100% with the attached test case.

Steps to Reproduce:
1. build the testcase
2. run it

Actual results:
- f23:
TYPE is 137
TYPE is 17
- f24/rawhide:
TYPE is 137
TYPE is 1

17 = ERL_LONGLONG
1 = ERL_INTEGER

Expected results:
Same decoding result in f24/rawhide (i.e. as ERL_LONGLONG).

Comment 1 Fedora Update System 2016-06-13 15:30:52 UTC
erlang-18.3.3-2.fc24 has been submitted as an update to Fedora 24. https://bodhi.fedoraproject.org/updates/FEDORA-2016-9ded469f1b

Comment 2 Peter Lemenkov 2016-06-13 15:32:41 UTC
Sorry for the delay. Could you please test the latest build and report if it works for you?

Comment 3 Richard W.M. Jones 2016-06-13 17:33:02 UTC
Yes it seems to be fixed.  I tested
erlang-18.3.3-2.fc25.x86_64

Comment 4 Fedora Update System 2016-06-14 03:58:11 UTC
erlang-18.3.3-2.fc24 has been pushed to the Fedora 24 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2016-9ded469f1b

Comment 5 Pino Toscano 2016-06-15 08:50:28 UTC
(In reply to Peter Lemenkov from comment #2)
> Sorry for the delay. Could you please test the latest build and report if it
> works for you?

Tested the latest version, erlang-erl_interface-18.3.3-2.fc25.x86_64, from rawhide, and indeed it works now.

Thanks!

Comment 6 Fedora Update System 2016-06-15 09:44:10 UTC
erlang-18.3.4-1.fc24 has been submitted as an update to Fedora 24. https://bodhi.fedoraproject.org/updates/FEDORA-2016-70995ddd01

Comment 7 Fedora Update System 2016-06-15 16:56:04 UTC
erlang-18.3.4-1.fc24 has been pushed to the Fedora 24 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2016-70995ddd01

Comment 8 Fedora Update System 2016-06-23 17:54:46 UTC
erlang-18.3.4-1.fc24 has been pushed to the Fedora 24 stable repository. If problems still persist, please make note of it in this bug report.