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:29:43 PM
comp.software.testing 5261 articles. 1 followers. debbymelton (5) is leader. Post Follow

1 Replies
625 Views

Similar Articles

[PageSpeed] 16

Hello Matthew!

06 Feb 04 12:29, Matthew wrote to All:

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

 M> #define __REENTRANT
 M> #include <stdio.h>
 M> #include <pthread.h>
 etc, etc

You will be better off placing the details of this problem in one of the 
'C++' usegroups.

Vince


0
2/6/2004 10:52:47 PM
Reply:

Similar Artilces:

problems problems problems
(The short(?) summary) I've got an Access MDB file and a DAO connect with it.. Problem 1 of 2 The below gives me a runtime error 91 Object variable or With block variable not set. I've got the db stuff after the form.show (to make sure all the objects on the form are loaded before attempting to utilize/manipulate them) But it doesn't like it when I use the data object in the form load anyway for some reason.. pffft. Private Sub Form_Load() frmTest1Project.Show datGallery.Recordset.MoveLast datGallery.Recordset.MoveFirst Call LockTextBoxes(frmTest1Project, "TextBox") End Sub Problem 2 of 2 In the data object properties, I have set BOFAction = 0 - Move First EOFAction = 0 - Move Last Yet still, If I go beyond the last record, or before the first record, I get one blank record, and then an error when moving yet one more time in the beyond or before direction. Runtime error 3021 No current record found Why aren't my BOF/EOF actions kicking in? Any assistance would be appreciated :) :) :) Tony! I think that I had a problem like this once I think it was that you needed to moe to the last record then check against EOF/BOF and if true move first/last I think thats how I fixed it sorry if I'm way off base "Tony" <none@none.com> wrote in message news:flhogvkg46rj97c1bsqq0bp4dl5jpkt1sj@4ax.com... > (The short(?) summary) > > I've got an Access ...

Purify problem or compiler problem? #2
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 ...

Problem with a problem
Hello, take a grammar G with alphabet {0,1} such that (the word problem for) the language L_G={w in (0+1)*|w\in L(G)} is very complex, say in PSPACE or some higher complexity class. Now consider an "easy" problem EASY like: "Is an element of L_G in L_G?". Well, this seems to be fairly easy because the answer is "yes" in any case. Hence the problem should be of small complexity. But if one models such a decision problem one has to construct a language L with alphabet A such that the word problem for L reflects exactly the decision problem which one is interested...

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
First, does anyone know why Info-VAX goes nuts on subjects from time to time? (Or is the trouble elsewhere?) From: JF Mezei <jfmezei.spamnot@teksavvy.com> > DELETE Z*.*;* > DELETE Y*.*;* > ... > DELETE A*.*;* > > (followed by the numbers). This scheme may be a bit obsolete. See: http://h71000.www7.hp.com/doc/731FINAL/4506/4506pro_014.html#index_x_890 I quote: [...] 5.2.3.1.2 Extended Character Set In addition, OpenVMS V7.2 on Alpha systems and ODS-5 disks includes support for the use of file names, and subdirectory and root subdirectory names, tha...

compiling BTG-0.9.5... linking problems... or problems whith my compiling-skill
Hi I've tried to compile btg-0.9.5 [http://btg.berlios.de/] under Madriva 2007.1 Spring (kernel 2.6.17-14), but it couldn't link some library... i readed config.log and i found a lot of errors like that: /usr/local/include/libtorrent/socket.hpp:48:27: error: asio/ip/tcp.hpp: No such file or directory or /usr/local/include/libtorrent/socket.hpp:83: error: 'asio' has not been declared But /usr/local/include/libtorrent/asio (and other subdirectories) exist! i've comiled also Libtorrent, then, to make the btg config script find the library, i've exported the enviro...

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 t...

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...

Strange error! Compiler problem? Or code problem?!!!!!!!
Greetings. The following code does not compile and I can't see why! I'm using C++Builder v6.0 (build 10.160). <code> #include <vector> class test { bool Fixed( unsigned int I ) const; bool& Fixed( unsigned int I ); private: std::vector<bool> pFixed; }; bool test::Fixed( unsigned int I ) const { return pFixed[I]; } bool& test::Fixed( unsigned int I ) { return pFixed[I]; // error: [C++ Error] test.cpp(21): E2357 Reference initialized with 'bool', needs lvalue of type 'bool' } </code> If the bool's are replace wit...

Software-testing jobs, software testing trainings, All about software testing and software testing tools
Get all the information on free software testing certifications, software testing jobs available in the market, get to know about automated software testing and the basic software testing tools, also find for your self the suitable software testing trainings.Software testing is a successful profession, see details on http://software-testing.certification-tips.com/ ...

Software-testing jobs, software testing trainings, All about software testing and software testing tools
Get all the information on free software testing certifications, software testing jobs available in the market, get to know about automated software testing and the basic software testing tools, also find for your self the suitable software testing trainings.Software testing is a successful profession, see details on http://software-testing.certification-tips.com/ Really bad web site. It just a bunch of ads and a little copyrighted information taken from other sites. quratulainz@yahoo.com wrote: > Get all the information on free software testing certifications, > software testing jobs available in the market, get to know about > automated software testing and the basic software testing tools, also > find for your self the suitable software testing trainings.Software > testing is a successful profession, > see details on http://software-testing.certification-tips.com/ > I have a different openion for this site. Software testing manual and automated both have its own marits and demarits. You are covering only the automated testing. It would be nice if you add some thing about manual testing as well. Your website design is simple and for learners its good. quratulainz@yahoo.com wrote: > Get all the information on free software testing certifications, > software testing jobs available in the market, get to know about > automated software testing and the basic software testing tools, also > find for your self the suitable software testi...

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 a minimazition problem.
Hello, I have a problem with a minimazition problem: Let my aim is to find x and a where f(x,a) is minimized with the constraint g(x,a)=0. Here "a" is parameter. It is known that for some values of x and a, function g does not have real roots of x. In matlab, I use fmincon function to solve this minimazition problem with "interior-point" algorithm. However, even in situations where g doesnt have real x roots , somehow Fmincon finds solution. I want to determine which solutions have real roots which are not. How can I do that? To which criterian do I have to...

A simple problem, but a problem ...
Hello, can anyone solve the following problem ? It looks quite simple to me, but I can't get it right. The advice suggests the following: mr(yes). mr(no). mrs(yes). mrs(no). marcel(yes). marcel(no). jacqu(yes). jacqu(no). grandpa(yes). grandpa(no). but how can I use this to solve the problem ? thanx a lot Maxx Problem: If Mr. Johnson goes, his wife goes too. At least one of the children, Marcel or Jacqueline, goes too. If Marcel goes, grandpa goes too. If Mrs. Johnson goes, grandpa stays at home. If Jacqueline goes, Mr. Johnson and Marcel go too. Write a prolog program, which det...

software Problem with Visioneer scanner masquerading as hardware problem
I am having some problems with my Visioneer 8900 scanner. It was working fine and automatically but not auto-cropping properly so I changed some settings in CONFIGURE to let me crop whatever I was scanning myself. Immediately I did this, it started reporting that the lock underneath the scanner was locked (which obviously it isn't) and I must unlock it Now neither the software nor the hardware will work. When I press SCAN or PREVIEW, it starts to move the light and then reports the lock. Has anyone come across this problem before Please? Visioneer doesn't have any te...

Lan problems problems
Hi can anyone please offer a suggestion to a LAN Problem i have. Recently my server computer on a 3 access point lan network has been dropping out after about 10 minutes. if i disconnect the power from the ethernet switch/hub and reconnect after 5 minutes, then it works again for a short time. there is no disconnection from the other servers. I have,..... 1.reformatted and rebuilt windows xp pro. 2.tested the switch/hub on another computer, seems ok 3. tested the lan cables. 4. tested the lan access points. yet still i have the trouble. any suggestions would be welcomed. D.Thomas Di...

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 t...

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

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 ...

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 ...

Apple seeds devs with Safari 5.2 for Lion, Xcode 4.4 with new LLVM compiler
... to the general public this summer. Among the new features: According to Apple, Xcode 4.4 includes an editor for Collada 3D files, compiler support ...

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, ...

IntelliJ Releases IDEA 12, Brings Improved UI, New Compiler Mode, Android UI Designer, And More
I'm not going to pretend to be a developer here, and I'll openly admit that the bulk of what IDEA 12 does is over my head. However, I do understand ...

Resources last updated: 3/7/2016 10:34:00 AM