LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 06-18-2014, 04:22 PM   #1
jyunker
Member
 
Registered: Aug 2009
Posts: 167

Rep: Reputation: 0
pointer aliasing checking for


Is there any software tool, commercial or free that will detect pointer aliasing. I know what it is, but I believe that it is awfully hard to detect by inspecting the c source code.

It just seems that any effort to find pointer aliasing by inspection is bound to fail. A software program should be the way to go. But which software program?

Most parallell compilers, for example, warn against inspecting the c source code for data races. The chances are high that you will miss some of them. They usually include a software tool or option that will detect data races.

I am also aware that there are different types of aliasing so maybe there is software that can detect one type and not another.

Any help appreciated.

thanks in advance.


Respectfully,


jyunker
 
Old 06-18-2014, 09:05 PM   #2
jpollard
Senior Member
 
Registered: Dec 2012
Location: Washington DC area
Distribution: Fedora, CentOS, Slackware
Posts: 4,599

Rep: Reputation: 1241Reputation: 1241Reputation: 1241Reputation: 1241Reputation: 1241Reputation: 1241Reputation: 1241Reputation: 1241Reputation: 1241
It really depends on the language.

In C it is not possible to detect all of the alising - since some places STILL use ints/longs for pointers.

Then there is the issue of "void *" which deliberately aliases.

Then there are the union structs - which also can have aliasing...
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
pointer to pointer segmentation fault Guilherme Programming 7 06-28-2009 10:47 AM
gcc 4.0.0 warning: dereferencing type-punned pointer will break strict-aliasing rules stephenwalter Programming 4 06-10-2009 05:06 AM
returning data to main() via a pointer to a pointer. slzckboy Programming 3 05-30-2005 02:20 PM
checking pointer is non-null causes segmentation fault in c++ markhod Programming 10 01-11-2005 12:28 PM
hot to set value of pointer to pointer to a structure in C alix123 Programming 2 11-17-2004 07:40 AM


All times are GMT -5. The time now is 06:12 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration