Skip to content

Large stack displacements can sometimes take the stack out of bounds #279

@davidchisnall

Description

@davidchisnall

Compiling this function, the stack allocation for buf is done as:

800087b2: 6505          lui a0, 0x1 
800087b4: 22a1055b      ct.cincoffset   a0, sp, a0
800087b8: 8585155b      ct.cincoffset   a0, a0, -0x7a8

The first ct.cincoffset (which, unrelated, should be called cincaddr) takes sp out of bounds. The second brings it in, but by then the tag is cleared.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions