Menu

#1306 Wrong alignment check in chThdCreateI()

21.11.6
open
None
NIL
Low
21.11.5
True
13 hours ago
13 hours ago
No

chThdCreateI() validates tdp->wbase alignment twice but does not validate
tdp->wend, which is passed to PORT_SETUP_CONTEXT() as the initial thread stack
top. On ports requiring stricter stack alignment, a hand-written thread
descriptor with a misaligned wend can start a thread with an invalid initial
stack top. Replace the duplicate wbase stack-alignment check with a wend
check, matching the RT thread creation validation.

Discussion


Log in to post a comment.

MongoDB Logo MongoDB