Skip to content

PrologEpilogInserter::replaceFrameIndices reads past last instruction in basic block #4218

@llvmbot

Description

@llvmbot
Bugzilla Link 3846
Resolution FIXED
Resolved on Mar 20, 2009 10:13
Version 2.5
OS All
Reporter LLVM Bugzilla Contributor
CC @ggreif

Extended Description

This bug is similar to bug 3842.

In certain cases, the replaceFrameIndices walks off the end of the instruction iterator at line 573 of http://llvm.org/viewvc/llvm-project/llvm/tags/RELEASE_25/lib/CodeGen/PrologEpilogInserter.cpp?annotate=65926, due to an unchecked ++I.

The solution is to check that I is not the end of the block before incrementing. I.e. replace line 573 with:

if (DoIncr && BB->end != I) ++I;

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions