BackupGGCode / llvm-py

Python bindings for LLVM
BSD 3-Clause "New" or "Revised" License
0 stars 0 forks source link

Builder.position_at_beginning segfaults when called on empty basic block #10

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. create an empty basic block
2. create a Builder instance
3. call builder.position_at_beginning with the empty block
Or just apply the attached patch to testall.py

What is the expected output? What do you see instead?
Expected: Internal check if block is empty, then noop instead of
positioning before a non existing instruction
I get: segfault

What version of the product are you using? On what operating system?
subversion trunk r44, Ubuntu 8.04

Original issue reported on code.google.com by fnoed...@googlemail.com on 3 Nov 2008 at 1:50

Attachments:

GoogleCodeExporter commented 9 years ago
Fixed in r59, please check.

Original comment by mdevan.f...@gmail.com on 10 Jan 2009 at 11:04