Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9213679
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 18, 20262026-06-18T01:48:18+00:00 2026-06-18T01:48:18+00:00

I used LLVM already existent passes with no problems till I tried to use

  • 0

I used LLVM already existent passes with no problems till I tried to use MemDepPrinter.cpp : http://llvm.org/doxygen/MemDepPrinter_8cpp_source.html . I got the following segfault:

llvm[0]: Compiling MyMemDepPrinter.cpp for Release+Asserts build (PIC)
llvm[0]: Linking Release+Asserts Loadable Module MyMemDepPrinter.so
WARNING: You're attempting to print out a bitcode file.
This is inadvisable as it may cause display problems. If
you REALLY want to taste LLVM bitcode first-hand, you
can force output with the `-f' option.

0  opt       0x08eaf9a8
1  opt       0x08eaff24
2            0xb7753400 __kernel_sigreturn + 0
3  opt       0x08c00c19 llvm::MemoryDependenceAnalysis::getNonLocalPointerDepFromBB(llvm::PHITransAddr const&, llvm::AliasAnalysis::Location const&, bool, llvm::BasicBlock*, llvm::SmallVectorImpl<llvm::NonLocalDepResult>&, llvm::DenseMap<llvm::BasicBlock*, llvm::Value*, llvm::DenseMapInfo<llvm::BasicBlock*> >&, bool) + 3673
4  opt       0x08c019aa llvm::MemoryDependenceAnalysis::getNonLocalPointerDependency(llvm::AliasAnalysis::Location const&, bool, llvm::BasicBlock*, llvm::SmallVectorImpl<llvm::NonLocalDepResult>&) + 266
5  opt       0x08bf1bed
6  opt       0x08e3415c llvm::FPPassManager::runOnFunction(llvm::Function&) + 636
7  opt       0x08e341c8 llvm::FPPassManager::runOnModule(llvm::Module&) + 56
8  opt       0x08e33de4 llvm::MPPassManager::runOnModule(llvm::Module&) + 692
9  opt       0x08e37270 llvm::PassManagerImpl::run(llvm::Module&) + 240
10 opt       0x08e37386 llvm::PassManager::run(llvm::Module&) + 38
11 opt       0x081a290f main + 6095
12 libc.so.6 0xb74604d3 __libc_start_main + 243
13 opt       0x081b8509
Stack dump:
0.  Program arguments: //home/alex/llvm/Release+Asserts/bin/opt -load //home/alex/llvm/Release+Asserts/lib/MyMemDepPrinter.so -memdep -print-memdeps //home/alex/llvm/tools/clang/woRKSPACE/Test.bc 
1.  Running pass 'Function Pass Manager' on module '//home/alex/llvm/tools/clang/woRKSPACE/Test.bc'.
2.  Running pass 'Print MemDeps of function' on function '@_Z9deadcode1i'
./run.sh: line 14:  3326 Segmentation fault      (core dumped) //home/alex/llvm/Release+Asserts/bin/opt -load //home/alex/llvm/Release+Asserts/lib/MyMemDepPrinter.so -print-memdeps //home/alex/llvm/tools/clang/woRKSPACE/Test.bc

When I am running it in GDB mode, I get:

Program received signal SIGSEGV, Segmentation fault.
0x08c00c19 in llvm::MemoryDependenceAnalysis::getNonLocalPointerDepFromBB(llvm::PHITransAddr const&, llvm::AliasAnalysis::Location const&, bool, llvm::BasicBlock*, llvm::SmallVectorImpl<llvm::NonLocalDepResult>&, llvm::DenseMap<llvm::BasicBlock*, llvm::Value*, llvm::DenseMapInfo<llvm::BasicBlock*> >&, bool) ()
(gdb) x/i $pc
=> 0x8c00c19 <_ZN4llvm24MemoryDependenceAnalysis27getNonLocalPointerDepFromBBERKNS_12PHITransAddrERKNS_13AliasAnalysis8LocationEbPNS_10BasicBlockERNS_15SmallVectorImplINS_17NonLocalDepResultEEERNS_8DenseMapIS9_PNS_5ValueENS_12DenseMapInfoIS9_EEEEb+3673>:  mov    0x10(%eax),%eax

As an update, the line problem is :

MDA.getNonLocalPointerDependency(Loc, true, LI->getParent(), NLDI);

and not the 4 arguments are the problem. All of them are defined and I can use them. I don’t have the segfault if I eliminate the line.

I think the problem is defined in a comment :

FIXME: Handle atomic/volatile loads.

Please tell me how can I solve the problem (maybe put a condition to avoid atomic/volatile loads) or if the pass works fine for you and if so, how you use it.

Thank you !

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-18T01:48:19+00:00Added an answer on June 18, 2026 at 1:48 am

    I saw another more recent posts, so i think i is better to try the manual dependencies. It is not the first time then there are errors in open source code. I tried to run the pass and I have the same problem. The same problem with getNonLocalPointerDependency method appears also for the other instruction types, like store, not only in the place mentioned by you.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I used to use OpenC++ ( http://opencxx.sourceforge.net/opencxx/html/overview.html ) to perform code generation like: Source:
Used http://www.ilbcfreeware.org/software.html - I only get static from the files that ilbc_test.exe creates. Does
Used code I found on SO to use the COM based Acrobat Reader to
According to LLVM's Getting Started (Windows) site : ... Clang can be used to
In my app i used Compiler for C/C++/Objective-C is Apple LLVM compiler 4.1 for
I tried to write an operator that can be used both as a prefix
Used this http://code.google.com/webtoolkit/doc/latest/DevGuideRequestFactory.html tutorial to understand the basic concepts, but having problems running my
LLVM has phi instruction with quite weird explanation: The 'phi' instruction is used to
I just read about the LLVM project and that it could be used to
brew install couchdb fails with: ==> Downloading http://www.apache.org/dyn/closer.cgi?path=couchdb/1.1.1/apache-couchdb-1.1.1.tar.gz File already downloaded in /Users/fairview/Library/Caches/Homebrew ==>

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.