f



Purify problem or compiler problem?

Hi,

I am using sun's CC (c++ compiler) to compile the follow code:

#define __REENTRANT
#include <stdio.h>
#include <pthread.h>

void *one(void *dummy);

void two(void);
void output(void);

int main (int argc, char **argv)
{
        pthread_t tid;
        pthread_create( &tid, NULL, one, NULL );
        pthread_join(tid,NULL);
}

void *one(void *dummy)
{
        output();
        two();
        return NULL;
}

void two(void)
{
        output();
}

void output(void)
{
        //char string[16468]; //This one purify likes
        //char string[16469]={0}; //This and greater makes purify spit
BSW's
        char string[16469]; //This and greater makes purify spit a
IPW/R's
        string[0]='\0';
}

This is purify's output:

IPW: Invalid pointer write
      This is occurring while in thread 7:
            void output()  [testmain3.o]
            void two()     [testmain3.o]
            void*one(void*) [testmain3.o]
            _thread_start  [libthread.so.1]
      Writing 1 byte to 0x7e5fbbef on the stack of thread 7.
      Address 0x7e5fbbef is    16473 bytes below frame pointer in
function void output().
     
 Thread Summary : 7 threads in existence
         Thread 0 [main thread]
         Stack Limit : (0xff3f0000 0xffbf0000), size = 0x800000
         Thread 1
         Stack Limit : (0x7ef10000 0x7f010000), size = 0x100000
         Stack Use : (0x7f00fa30 0x7f00fd54), size = 0x324
         Thread 2
         Stack Limit : (0x7e652000 0x7e656000), size = 0x4000
         Stack Use : (0x7e655978 0x7e655d54), size = 0x3dc
         Thread 3
         Stack Limit : (0x7f902b64 0x7f91e3f8), size = 0x1b894
         Stack Use : (0x7f9076d0 0x7f9078f4), size = 0x224
         Thread 4
         Stack Limit : (0x7ee0e000 0x7ef0e000), size = 0x100000
         Stack Use : (0x7ef0db30 0x7ef0dd54), size = 0x224
         Thread 6
         Stack Limit : (0x7e612000 0x7e616000), size = 0x4000
         Stack Use : (0x7e615b28 0x7e615d54), size = 0x22c
         Thread 8
         Stack Limit : (0x7e632000 0x7e634000), size = 0x2000
         Stack Use : (0x7e633b28 0x7e633d54), size = 0x22c

This is with CC. With gcc or g++ it does not have this problem. cc has
the problem too but with a larger number in the array.

Is it the compiler/linker bug or it purify making things up?

If it is the compiler I assume I am screwing up memory badly.

Matt
0
matt13 (6)
2/6/2004 12:28:41 PM
comp.software-eng 4494 articles. 1 followers. editor (304) is leader. Post Follow

1 Replies
599 Views

Similar Articles

[PageSpeed] 45

The problem is with the pthread library - you are probably blowing the 
thread stack. You can test this by changing the stacksize (you'll have 
to use pthread_attr to do that).

As for gcc - I think the reason that gcc lets it work is that it is not 
allocating that array at all. Try making the array string a volatile 
array, and see whether it starts blowing up. Alternatively, you might 
want to compile using gcc -O0 and see whether it blows up on you.


0
ctips (287)
2/6/2004 1:20:05 PM
Reply:

Similar Artilces:

Problems problems....
I've got Fujitsu MAN3184MP and Adaptec 29160 scsi card. Sometimes i have this message "A disk read error occured" , sometimes even bios does not recognize it, sometimes it does but the boot sequence does not start it seems that motherboard bios has problems with it ( so it seems to me, i could be wrong about that assumption) . Then i reset and it all works perfectly. I've noticed a speed degradation in Win XP lately. I'm angry :)) I have LVD/SE terminator, and i think 68pin cable ( not sure about that ). Hope i gave you enough info to try and help. Thanx! -- ----------------------------------- Makni #### iz adrese Seems obvious that the drive is going belly up. You could download the manufacture's utility disk and confirm it. I think time would more wisely be spent backing up your data before you can't read it at all. DaveL "biBU" <idolovcak####@inet.hr> wrote in message news:cuslus$ljq$1@fegnews.vip.hr... > I've got Fujitsu MAN3184MP and Adaptec 29160 scsi card. > > Sometimes i have this message "A disk read error occured" , sometimes even > bios does not recognize it, sometimes it does but the boot sequence does > not start it seems that motherboard bios has problems with it ( so it > seems to me, i could be wrong about that assumption) . Then i reset and it > all works perfectly. I've noticed a speed degradation in Win XP lately. > I'm angry :)) > > ...

Re: How many files can you have in a VMS directory without performance problems? performance problems? performance problems? problems? performance problems? performance problems? problems? perfo #2
On 8/17/05, Mark Berryman <mark@theberrymans.com> wrote: > Steven M. Schweda wrote: > > First, does anyone know why Info-VAX goes nuts on subjects from time > > to time? (Or is the trouble elsewhere?) >=20 > Elsewhere. Info-VAX does not rewrite the subject. >=20 > Mark Berryman > Info-VAX admin >=20 I thought it was reacting to poster sanity bugchecks. : ^ ) WWWebb --=20 NOTE: This email address is only used for noncommerical VMS-related correspondence. All unsolicited commercial email will be deemed to be a request for services pursuant to the terms and conditions located at http://bellsouthpwp.net/w/e/webbww/ ...

CUPS problem? or network problem? or printer problem?
Trying to configure CUPS to print to an HP LaserJet 5si over the network. Here is the relevant error_log stuff: I [17/Nov/2003:14:19:03 -0500] Job 14 queued on 'ptr' by 'wm'. I [17/Nov/2003:14:19:03 -0500] Started filter /usr/lib/cups/filter/texttops (PID 12120) for job 14. I [17/Nov/2003:14:19:03 -0500] Started filter /usr/lib/cups/filter/pstops (PID 1 2121) for job 14. I [17/Nov/2003:14:19:03 -0500] Started filter /usr/lib/cups/filter/pstoraster (P ID 12122) for job 14. I [17/Nov/2003:14:19:03 -0500] Started filter /usr/lib/cups/filter/rastertoprint er (PID 1...

Is this a BIOS problem, a kernel problem or a user problem :-)
Hi all, I have a Dual Core P4, which dmesg reports as (CPU0 and) CPU1: Intel(R) Pentium(R) 5 CPU 2.66GHz stepping 07 Unfortunately, it is also reporting CPU: Hyper-Threading is disabled I went through the BIOS (AMI dated 2005) and saw no option to enable HT. uname -a reports Linux hwa3 2.6.17-10-generic #2 SMP Fri Oct 13 18:45:35 UTC 2006 i686 GNU/Linux so clearly the BIOS and the kernel see the processor as dual core. Is there a utility to do this (enable hyperthreading)? Am I going to have to recompile the kernel? Is there a set of Intel dual core CPU's which does not have H...

1] Problems with compiler 2] Problems with Rhide
Dear Group - Thank you for the help with the environment variable. I forgot to set the variable. I added SET DJGPP=c:\D\DJGPP\DJGPP.ENV, and everything works. However... I respectfully request your advice on the following: 1] I am using my wife's Windows 2000 computer, but booting off a drive that has DOS 7.1 loaded. I am not running a DOS shell off Windows 2000. I wrote the following trivial program, to test if my installation of DJGPP would work with DOS 7.1 #include <stdio.h> int main() { printf("hello world"); } I receive the following message on an at...

debugger problem and other problem
Hi all! I gave it another try to upgarde from 1.0.1 to 1.2.1 from CVS (Rev. 6469). My system: Linux Debian Lenny, kernel 2.6.24. Problems: 1. the classical debugger doesn't show the code. First I thought it could be a color problem, but it isn't. Changing the color doesn't help. You can find a screenshot at http://www.apw-wiegand.de/apwlin/debugger.png. As you can see the debugger finds the code file and shows the line number where it actually is, but doesn't show the code. In 1.0.1 the debugger was functioning. 2. I read several times in the newsgroup that others have the...

Problem with problem section
Hi, I have defined as follows: ------------------------------------------------------------------- \newtheorem{problem}{Problem}[section] --------------------------------------------------------------------------- and I use as: ----------------------------------------------------- \begin{problem} \label{ch6:p2} {\bf {Understanding {\bf XXX} assignment}} Convert the code in problem \ref{ch6:p1} to {\bf XXX} assignment. Fill the table \ref{ch6:p1t}, along with the comments. \end{problem} ------------------------------------------------------------------- What I want is all my figures and table before I start the next problem. With my definitions all my tables and figures goes to some other pages, before next problem section starts. How can I fix this? I don't have this problem in section, subsection and subsubsection. Please help On Nov 16, 1:57=A0pm, Sant <santhosh_h...@yahoo.com> wrote: > Hi, > > I have defined as follows: > ------------------------------------------------------------------- > \newtheorem{problem}{Problem}[section] > -------------------------------------------------------------------------= -- > > and I use as: > > ----------------------------------------------------- > \begin{problem} > \label{ch6:p2} > > {\bf {Understanding {\bf XXX} assignment}} > > Convert the code in problem \ref{ch6:p1} to {\bf XXX} assignment. > Fill the table \ref{ch6:p1t}, along with the comments. > \end{probl...

Re: 1] Problems with compiler 2] Problems with Rhide
--Boundary_(ID_wp3TQEeaer1xycxmVFlYVA) Content-type: text/plain; charset=us-ascii; format=flowed Content-transfer-encoding: 7BIT At 10:56 AM 8/31/2007, you wrote: > > I receive the following message on an attempted compile: Can't > > create d/djgpp/bin/tt.o Permission denied (EACCES) > >Does that directory exist? Is it writable? Thank you. >Does that directory exist? Yes Is it writable? Yes Ethan --Boundary_(ID_wp3TQEeaer1xycxmVFlYVA) Content-type: text/html; charset=us-ascii Content-transfer-encoding: 7BIT <html> <body> At 10:56 AM 8/31/2007...

Hardware Problem / Software Problem -- Strange Artifacts on Screen
I'm running Tiger (10.4.2) on a 17" Al PowerBook. Frequently, but not always, and for reasons undetermined, bright green artifacts will appear on the screen. These artifacts seem to be related to certain areas of the image being displayed. I'm curious as to whether others have experienced them and, if so, was it determined whether they were hardware or software related. There are a couple screenshots for viewing at my dot mac public folder which can be found by using the Finder's Go menu to reach the public folder at my account, taliesinsoft. -- James L. Ryan -- Talie...

Windows 7 and Eudora 7.1: problems, problems and problems.
Hi, 3 days ago I have replaced Win XP with Windows 7 and since first day I have problem with Eudora 7.1. My problems are when Eudora downloads emails. I have 6 account, Eudora downloads 3 accunts regularly, then gets stuck on 3� account for 1 minute or more and then it goes again regularly. Therefore I have deleted the 3� account then I have done the download. Eudora downloads 3 account regularly again then it gets stuck again. Always the same problem. Then ..... I have unistalled Eudora and deleted every trace on registry then I have installed it again but now I have the same problems. Perhaps have I to replace Eudora 7 with Eudora 8? I want to cry!!!! Help me please. Thanks a lot. PS. I have replaced beacause it is important for me new mailboxes with old mailboxes and I replaced Eudora.ini. Perhaps is it my problem? AroundTheWorld <AroundTheWorld@DELETEinterfree.it> wrote in news:s4usj5p0otqo5hlr30rsbnibj2t0uh3od1@4ax.com: > Hi, 3 days ago I have replaced Win XP with Windows 7 and since first > day I have problem with Eudora 7.1. > My problems are when Eudora downloads emails. > I have 6 account, Eudora downloads 3 accunts regularly, then gets > stuck on 3� account for 1 minute or more and then it goes again > regularly. > Therefore I have deleted the 3� account then I have done the download. > Eudora downloads 3 account regularly again then it gets stuck again. > Always the same problem. > Then ..... I h...

problem compiling c (pro*c) program
HPUX 11iv2 (11.23) HP Itanium2 8 Gig RAM Oracle9i (9.2.0.6.0) I got this error below that I have not been able to solve. Can someone help? I am not a really a programmer .. more like a dba. $ Make_idbicms ld: Can't find library or mismatched ABI for -llibclntsh.so Fatal error. collect2: ld returned 1 exit status $ more Make_idbicms gcc -DPRINT -DLOG idba1Mainsend.c idba1ReadTransmit.c idba1AssembleMsg.c idba1UtilMQ.c idba1LogError.c idba1ReadConfig.c idba1UpdateReceive.c idba1DecodeMsg.c -ansi -I../INCLUDE -I/u01/app/oracle/9.2.0/precomp/public -L/opt/mqm/lib -lmqic - ...

need to compute this problem having problems with how to start this problem help need urgently
Let   U[0; 2theta] be a uniform random variable from the interval [0; 2theta] and let A  Exp(1) be exponentially distributed with mean 1. Assume  and A independent. Compute the mean mX(t) =E[X(t)] and autocorrelation RX(s; t) = E[X(s)X(t)] of the phase-shifted sinusoid.X(t) = A*  cos(t +theta ): State also if X(t) is Wide Sense Stationary (WSS). plot 10 realisations of X(t) plotR(s-t,0)as a function of s-t "pramod kumar" <pramod.kilu@gmail.com> wrote in message <jpapso$44b$1@newscl01ah.mathworks.com>... > Let   U[0; 2theta] be a uniform random variable from the interval [0; 2theta] and let A  Exp(1) be exponentially distributed with mean 1. Assume  and A independent. Compute the mean mX(t) =E[X(t)] and autocorrelation RX(s; t) = E[X(s)X(t)] of the phase-shifted sinusoid.X(t) = A*  cos(t +theta ): > State also if X(t) is Wide Sense Stationary (WSS). > plot 10 realisations of X(t) > plotR(s-t,0)as a function of s-t So what have you tried? If you have not tried anything, this is a suggestion that you were not paying attention in class. Make an effort. John "pramod kumar" <pramod.kilu@gmail.com> wrote in message <jpapso$44b$1@newscl01ah.mathworks.com>... > Let   U[0; 2theta] be a uniform random variable from the interval [0; 2theta] and let A  Exp(1) be exponentially distributed with mean 1. Assume  and A independent. Compute the mean mX(t) =E[X(t)] and autocorrelation RX(s; t) = E[X(s)X(t)]...

yahoo.com.au mail problems problems problems
Hello, in the last month I encountered big problems to read mail from yahoo.com.au server. There is no chance to connect to e-mail /www based server. Having logged to www.yahoo.com.au mail window doesn't open waiting for an image from au.adserver.yahoo.com server is that server dead, making reading mail completely impossible ? Ping says, that server is unreachable. What can I do to make things better as in previous months ? Ple ...

Problem to compile with g77 a program which was normally compiled with Absoft compiler
Hello, I get the following error messages when I try to compile a program with g77 somefile.f:(.text+0x93): undefined reference to `for_open' somefile.f:(.text+0xf4): undefined reference to `for_write_seq_fmt' somefile.f:(.text+0x128): undefined reference to `for_write_seq_fmt_xmit' somefile.f:(.text+0x454): undefined reference to `for_read_seq' Could you help me to fix this? I have posted more details about my actions on http://stackoverflow.com/questions/3365742/f77-problem-to-compile-with-g77-a-program-which-was-normally-compiled-with-absof Thank you On 30/07/2010 10:2...

Compilation problem
Hi I developed an application in Red Hat Linux. It was working fine there. When I am porting to HP-UX I am getting compilation error. The error is given below. cc: "/usr/include/sys/dir.h", line 74: error 1000: Unexpected symbol: "ino32_t". cc: "/usr/include/sys/dir.h", line 75: error 1000: Unexpected symbol: "d_reclen". cc: "/usr/include/sys/dir.h", line 75: warning 557: Missing declaration specifiers, "int" assumed. cc: "/usr/include/sys/dir.h", line 76: error 1000: Unexpected symbol: "d_namlen". cc: "/usr/...

Decision Problem and Optimization Problem
Two questions occurred to me when I studied materials related to Church-Turing thesis. A book say ALL problems are classfied into decision problems or optimization problems. Is it right? If so, how can we prove it? And an optimization problem can be solved by binary searching between a lower bound and a upper bound, if we can solve the corresponding decision problem. But is it ALWAYS possible to know the boundaries? Thanks. Deokhwan Kim wrote: > Two questions occurred to me when I studied materials related to > Church-Turing thesis. > > A book say ALL problems are classfied in...

Scanner problem or InDesign problem?
Hello: I should be asking this in some sort of scanner newsgroup, I guess, but you people are the pros, so here goes. I just bought an Epson Perfection 2400 Photo scanner, for use on a Mac running OSX. Not the highest-end scanner, but not a bad machine, according to many of the reviews. Certainly good enough to scan line art. So I scan some line art, saving it as a Mac TIFF with LZW compression. When I put the scan into InDesign, along with the line art are regularly spaced little kind of dotted lines, some sort of artifacts, extending from the right side of the image. What? They appear both on screen, and even worse, they print as well (PS laser printer and inkjet). I open it in Photoshop, zoom way in, and there are no pixels there. So I scan it as an uncompressed TIFF, and these little thingies go away. Tried scanning at different resolutions, same results. Same results if I save as PC TIFF. Nada problema when I place the same file in PageMaker or Quark Xpress. However, I do not wish to use either of these programs. My old el-cheapo Agfa SnapScan scanner works with no problems under these conditions, and InDesign likes its scans. I can take the new scanner back, which is what I will probably do, unless someone has a suggestion of how to solve the problem. I could just leave everything as uncompressed TIFFs, but they are quite a bit larger, and even in the era of monster hard drives, when I have 200+ of these for a project, they do add up. Anyone else experienced an...

software problem
i think i have got a software problem here. the program always stops when I scroll the scroll bar in the command window with a message of ‘program terminated by user...'. i do nothing but scroll the bar while the program is still running and want to check the message or results.I don't know what's the problem. i once got a message saying something was wrong of a java program but I didn't read it seriously so i have no idea what to do to fix that. Could anybody help?thanks a lot! On Wednesday, September 5, 2012 9:20:08 AM UTC+8, Ashley wrote: > i think i have got a software problem here.=20 >=20 > the program always stops when I scroll the scroll bar in the command win= dow with a message of =91program terminated by user...'. >=20 > i do nothing but scroll the bar while the program is still running and wa= nt to check the message or results.I don't know what's the problem. >=20 > i once got a message saying something was wrong of a java program but I d= idn't read it seriously so i have no idea what to do to fix that. >=20 > Could anybody help?thanks a lot! you are probably right that this is a software problem. i faced similar pro= blems when i tried the matlab editor while executing a code. i do not see t= his problem in latest matlab versions though (i use v2012). - Indraneel "Ashley " <lifei5189@gmail.com> wrote in message news:k269c7$mak$1@newscl01ah.mathwork...

Problem with Purify
Hey guyes I am getting problem with purify. I am using g++ compiler on Solaris 5.10 and linking it with purify. Whenever I compiled program with purify option I get CORE DUMP error with message that terminate() was called recursively by getprotobyname() function. Without purify program compiles without error. Please help me to solve problem. Teddy wrote: > Hey guyes I am getting problem with purify. I am using g++ compiler on > Solaris 5.10 and linking it with purify. > Whenever I compiled program with purify option I get CORE DUMP error > with message that terminate() was called...

Compilation problem
Acorn C++ 3.21. Trying to build an app that I've had no problem with before. The source file throwing up the error hasn't been modified for nearly a year and the app has been built a number of times since then. I'm getting a throwback window full of "Junk at end of # line - ignored" errors. The source file is c++.WindowManager and the start of the scrap file referred to in the throwback window is as follows: # 1 "WindowManager" /* << AT&T USL C++ Language System <3.0> 09/15/91: Acorn 0.07 (19 May 2010) >> */ /* < WindowManager > */ # 1 "WindowManager" char *__vec_new (); # 1 "WindowManager" char __vec_delete (); typedef int (*__vptp)(); struct __mptr {short d; short i; __vptp f; }; # 1 "WindowManager" # 40 "C:h.string" typedef unsigned int size_t ; and so on. You can see the # lines that are being flagged as errors. What on earth can be causing this? I've never seen this before and as I said, the app has been successfully built since any of the source files were last modified. Where do I start looking for the cause? Alan -- RISC OS - you know it makes cents Alan Wrigley <spamhater@keepyourfilthyspamtoyourself.co.uk> wrote: > and so on. You can see the # lines that are being flagged as errors. > > What on earth can be causing this? I've never seen this before and as I > said, the app has been succ...

Cable problem or card problem
hi i have a tekram scsi card, i have connected my hd on her 68-Pin Wide SCSI Internal that work fine. this week i received a adaptect 39160. i have connected my hd with the same cable of my other scsi card, under linux i get some message: Dec 12 16:11:15 linux kernel: SCSI error : <1 0 0 0> return code = 0x6000000 Dec 12 16:11:15 linux kernel: end_request: I/O error, dev sda, sector 19847 Dec 12 16:11:15 linux kernel: Incorrect number of segments after building list Dec 12 16:11:15 linux kernel: counted 9, received 3 Dec 12 16:11:15 linux kernel: req nr_sec 1016, cur_nr_sec 8 Dec 12 1...

Web resources about - Purify problem or compiler problem? - comp.software-eng

Compiler - Wikipedia, the free encyclopedia
... , or external linking . The most common reason for wanting to transform source code is to create an executable program. The name "compiler" ...

Compiler - Wikipedia, the free encyclopedia
"Compile" and "compiling" redirect here. For the software company, see Compile (publisher) . For other uses, see Compilation . This article has ...

Facebook Open-Sources HipHop PHP Compiler Software
Earlier this morning, Facebook officially made their new PHP “compiler,” called HipHop, available as open source software. In the blog post by ...

Mobile C ( Offline Compiler ) on the App Store
Read reviews, compare customer ratings, see screenshots, and learn more about Mobile C ( Offline Compiler ). Download Mobile C ( Offline Compiler ...

Art in the Age of Matter Compilers
jurvetson posted a photo: Sheba may be the harbinger of art in the digital age — a mathematical sculptor with digital matter. She manipulates ...

Interpreters and Compilers (Bits and Bytes, Episode 6) - YouTube
This animation explains the difference between interpreters and compilers. It is from Episode 6 of the classic 1983 television series, Bits and ...

Typesafe cofounder forking Scala compiler
The main contributor to the Scala compiler, Paul Phillips, has announced on GitHub that he is forking the compiler to “fix some of the innumerable ...

Does Apple's new developer agreement ban Adobe's Flash-to-iPhone compiler?
Given that any kind of formal truce between Apple and Adobe was essentially blown out of the water by Steve Job's very public slating of Flash ...

Xcode 5.0 released with iOS 7 SDK, 64-bit app compiler
... has just pushed out Xcode 5.0 to the Mac App Store. The free app includes the SDKs for iOS 7 and Mountain Lion as well as the 64-bit app compiler: ...

NVIDIA and Continuum Analytics Announce NumbaPro, A Python CUDA Compiler
... are announcing that they are bringing Python support to CUDA. Specifically, Continuum Analytics’ will be introducing a new Python CUDA compiler, ...

Resources last updated: 3/20/2016 1:49:25 PM