App-level clone emulation for microblaze is broken

Bug #1066909 reported by Bugdal on 2012-10-15
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
QEMU
Undecided
Unassigned

Bug Description

When CLONE_THREAD is used, the new process starts with the program counter pointing to the system call instruction, rather than the instruction immediately following it. This causes an infinite cascade (linear growth, not exponential) of thread creation, which quickly crashes when the threads start running and they're all using the same stack.

I'm using qemu 1.1.2 packaged with Debian, but I'm not aware of any fixes since then that would address the problem.

I can provide a test program if needed; a short C program using syscall() directly or an even-shorter asm program can demonstrate the issue without need for debugging around pthread library routines.

Bugdal (bugdal) wrote :

Here is a minimal test case showing the problem.

Bugdal (bugdal) wrote :

I accidentally posted the patch, which is here, on the wrong bug report (1068900 instead of here). Apologies. For reference here is the patch; it was committed and fixes this issue:

https://lists.eait.uq.edu.au/pipermail/microblaze-linux/2012-October/005760.html

Issue # 1068900, where I mistakenly posted the patch, is unrelated and not fixed; it should be reopened and this issue (1066909) should be marked fixed.

Aurelien Jarno (aurel32) on 2012-10-21
Changed in qemu:
status: New → Fix Committed
Thomas Huth (th-huth) on 2017-01-19
Changed in qemu:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers