Skip to content

Inliner optimizatin deletes Functions even if there are pointers to them in the stub->function map #3038

@nunoplopes

Description

@nunoplopes
Bugzilla Link 2666
Resolution INVALID
Resolved on Aug 11, 2008 18:16
Version trunk
OS All
Attachments test case

Extended Description

The inliner optimization deletes internal functions that were inlined. The problem is that the JIT engine may still have references to such functions, in particular there might be some code in memory that references such functions (via stubs).
This bug is easy to trigger. I'll attach a simple test case.

The zip file contains the following:

  • module.c/bc - a module with 2 little functions to be loaded at runtime.
    you may need to regenerate the .bc file with e.g. clang. I've compiled it in a
    linux/x86 machine
  • jitbug.cpp - the test case itself. comment line 49 (i.e. disable the inliner) to make the test pass.
  • compile.sh - a one-linner to compile the jitbug.cpp file

to run the test, just type ./test.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugzillaIssues migrated from bugzillainvalidResolved as invalid, i.e. not a bugmcjit

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions