Wind River Support Network


LIN5-9439 : wrlinux-4.3 qemu-kvm: When CLONE_THREAD is used, qemu crashes on an infinite cascade of stack

Created: Mar 10, 2013    Updated: Dec 19, 2017
Resolved Date: Jan 21, 2014
Previous ID: LIN4-20005
Found In Version: 5.0
Fix Version:
Severity: Severe
Applicable for: Wind River Linux 5
Component/s: Userspace


Problem 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.

Steps to Reproduce

1 build a x86_64 project with qemu-kvm
2 deploy it on target
3 run following test case will crash qemu:
.global main
	ori r5, r0, 0x7d8f00
	addi r6, r1, -32760
	ori r7, r6, 0
	ori r8, r6, 0
	ori r9, r6, 0
	ori r12, r0, 120
	brki r14, 8
	ori r12, r0, 1
	brki r14, 8

Other Downloads

Live chat