Bug 2189916

Summary: micropython: FTBFS in Fedora Rawhide: error: storing the address of local variable 'stack_dummy' in 'mp_state_ctx.thread.stack_top' [-Werror=dangling-pointer=]
Product: [Fedora] Fedora Reporter: Miro Hrončok <mhroncok>
Component: micropythonAssignee: Charalampos Stratakis <cstratak>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: rawhideCC: mhroncok, python-packagers-sig, torsava
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
URL: https://koschei.fedoraproject.org/package/micropython
Whiteboard:
Fixed In Version: micropython-1.19.1-6.fc39 micropython-1.19.1-6.fc38 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2023-05-15 08:56:25 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: 2168842    

Description Miro Hrončok 2023-04-26 12:30:44 UTC
Description of problem:
Package micropython fails to build from source in Fedora Rawhide.

gcc -I. -Ibuild -I.. -Wall -Werror -Wextra -Wno-unused-parameter -Wpointer-arith -std=gnu99 -DFFCONF_H=\"lib/oofatfs/ffconf.h\" -Os   -fdata-sections -ffunction-sections -fno-asynchronous-unwind-tables -c -MD -o build/py/pairheap.o ../py/pairheap.c
make: Leaving directory '/builddir/build/BUILD/micropython-1.19.1/mpy-cross'
make: Entering directory '/builddir/build/BUILD/micropython-1.19.1/mpy-cross'
CC ../py/stackctrl.c
gcc -I. -Ibuild -I.. -Wall -Werror -Wextra -Wno-unused-parameter -Wpointer-arith -std=gnu99 -DFFCONF_H=\"lib/oofatfs/ffconf.h\" -Os   -fdata-sections -ffunction-sections -fno-asynchronous-unwind-tables -c -MD -o build/py/stackctrl.o ../py/stackctrl.c
../py/stackctrl.c: In function 'mp_stack_ctrl_init':
../py/stackctrl.c:32:32: error: storing the address of local variable 'stack_dummy' in 'mp_state_ctx.thread.stack_top' [-Werror=dangling-pointer=]
   32 |     MP_STATE_THREAD(stack_top) = (char *)&stack_dummy;
../py/stackctrl.c:31:18: note: 'stack_dummy' declared here
   31 |     volatile int stack_dummy;
      |                  ^~~~~~~~~~~
In file included from ../py/runtime.h:29,
                 from ../py/stackctrl.c:27:
../py/mpstate.h:323:23: note: 'mp_state_ctx' declared here
  323 | extern mp_state_ctx_t mp_state_ctx;
      |                       ^~~~~~~~~~~~
cc1: all warnings being treated as errors

Version-Release number of selected component (if applicable):
1.19.1-5.fc39

Steps to Reproduce:
fedpkg build

Additional info:
This package is tracked by Koschei. See:
https://koschei.fedoraproject.org/package/micropython

Comment 1 Charalampos Stratakis 2023-05-11 00:59:23 UTC
Fix: https://github.com/micropython/micropython/pull/11402

Comment 2 Fedora Update System 2023-05-15 08:55:37 UTC
FEDORA-2023-b67937bc58 has been submitted as an update to Fedora 39. https://bodhi.fedoraproject.org/updates/FEDORA-2023-b67937bc58

Comment 3 Fedora Update System 2023-05-15 08:56:25 UTC
FEDORA-2023-b67937bc58 has been pushed to the Fedora 39 stable repository.
If problem still persists, please make note of it in this bug report.

Comment 4 Fedora Update System 2023-05-24 20:43:34 UTC
FEDORA-2023-c5007e398e has been submitted as an update to Fedora 38. https://bodhi.fedoraproject.org/updates/FEDORA-2023-c5007e398e

Comment 5 Fedora Update System 2023-05-25 01:58:20 UTC
FEDORA-2023-c5007e398e has been pushed to the Fedora 38 testing repository.
Soon you'll be able to install the update with the following command:
`sudo dnf upgrade --enablerepo=updates-testing --refresh --advisory=FEDORA-2023-c5007e398e`
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2023-c5007e398e

See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates.

Comment 6 Fedora Update System 2023-06-03 02:44:03 UTC
FEDORA-2023-c5007e398e has been pushed to the Fedora 38 stable repository.
If problem still persists, please make note of it in this bug report.