Search the web
Sign In
New User? Sign Up
mpatrol · mpatrol library discussion group
? Already a member? Sign in to Yahoo!

Yahoo! Groups Tips

Did you know...
Hear how Yahoo! Groups has changed the lives of others. Take me there.

Best of Y! Groups

   Check them out and nominate your group.
Having problems with message search? Fill out this form to ensure your group is one of the first to be migrated to the new message search system.

Messages

  Messages Help
Advanced
Messages 1139 - 1168 of 1198   Newest  |  < Newer  |  Older >  |  Oldest
Messages: Show Message Summaries   (Group by Topic) Sort by Date v  
#1168 From: Daniel Jacobowitz <drow@...>
Date: Fri Nov 14, 2008 1:13 pm
Subject: Re: mpatrol 64 bit issue ....
falsedrow
Offline Offline
Send Email Send Email
 
On Fri, Nov 14, 2008 at 11:40:45AM -0000, Graeme Roy wrote:
> Hi,
>
> Yes, it sounds like there's been no support added for stack tracebacks on
> 64-bit x86.  The 32-bit x86 code will not work, as you have found out and I
> haven't written support for 64-bit x86 as I don't have access to it.
>
> If anyone has written the extra source code for getting stack tracebacks to
> work for mpatrol on that architecture could they post it here?  It should
> only be a few lines of diffs anyway, compared to what I'd expect support for
> Itanium to be.

I don't have such code, but what I'd recommend is using either
libunwind or just libgcc; x86_64 is special in that the platform ABI
requires presence of .eh_frame unwind tables, so that compilers have
more freedom in stack layout than they do on x86.

--
Daniel Jacobowitz
CodeSourcery

#1167 From: "Graeme Roy" <graeme_roy@...>
Date: Fri Nov 14, 2008 11:40 am
Subject: RE: mpatrol 64 bit issue ....
graemeroy
Offline Offline
Send Email Send Email
 
Hi,
 
Yes, it sounds like there's been no support added for stack tracebacks on 64-bit x86.  The 32-bit x86 code will not work, as you have found out and I haven't written support for 64-bit x86 as I don't have access to it.
 
If anyone has written the extra source code for getting stack tracebacks to work for mpatrol on that architecture could they post it here?  It should only be a few lines of diffs anyway, compared to what I'd expect support for Itanium to be.
 
Thanks,
 
Graeme.


From: mpatrol@yahoogroups.com [mailto:mpatrol@yahoogroups.com] On Behalf Of Sagar
Sent: 11 November 2008 11:11
To: mpatrol@yahoogroups.com
Subject: [mpatrol] mpatrol 64 bit issue ....

Hello Graeme,

Thanks for the update ,, we took the target.h file and places where
the ARCH and ENVIRON variables were defined .. we did a undef and
redefined them to ARCH_IX86 and ENVIRON_64…

CPUs in the box are AMD opteron 275…

Now we are getting a core for mpatrol …

When we did the analysis on the core then I am getting
#0 0x0000002a9567cab4 in __mp_getframe () from /src/lib64/libmpatrol.so

What could be wrong …

....-----------------

Glad to hear it's working OK for you, at least on one of your machines.

For SuSE Enterprise 64-bit, I assume that it's running on Intel Core 2 Duo
and is therefore x86-64 (and not Itanium). mpatrol has been ported to
64-bit architectures before (MIPS and SPARC for example) but I don't know if
anything's been done by anyone to port it to 64-bit x86 (i.e. running in a
64-bit environment and not just under a 32-bit OS). For example, the stack
reading code will most likely be different which is probably why you're not
getting any location information for the allocations.

Has anyone here run mpatrol on a 64-bit x86 architecture and got stack
tracebacks to work? I imagine there won't be too many changes to make (just
ensure that ARCH = ARCH_IX86 and ENVIRON = ENVIRON_64 when building mpatrol)
- just look for ENVIRON_64 in the mpatrol source code to see where I did the
changes for MIPS and SPARC. I don't have access to a 64-bit OS at the
moment so I can't really help much.


#1166 From: Sagar <sagarseth@...>
Date: Tue Nov 11, 2008 11:10 am
Subject: mpatrol 64 bit issue ....
sagarindelhi
Online Now Online Now
Send Email Send Email
 
Hello Graeme,

Thanks for the update ,, we took the target.h file and places where
the ARCH and ENVIRON variables were defined .. we did a undef and
redefined them to ARCH_IX86 and ENVIRON_64…

CPUs in the box are AMD opteron 275…


Now we are getting a core for mpatrol …

When we did the analysis on the core then I am getting
#0 0x0000002a9567cab4 in __mp_getframe () from /src/lib64/libmpatrol.so

What could be wrong …

....-----------------



Glad to hear it's working OK for you, at least on one of your machines.

For SuSE Enterprise 64-bit, I assume that it's running on Intel Core 2 Duo
and is therefore x86-64 (and not Itanium).  mpatrol has been ported to
64-bit architectures before (MIPS and SPARC for example) but I don't know if
anything's been done by anyone to port it to 64-bit x86 (i.e. running in a
64-bit environment and not just under a 32-bit OS).  For example, the stack
reading code will most likely be different which is probably why you're not
getting any location information for the allocations.

Has anyone here run mpatrol on a 64-bit x86 architecture and got stack
tracebacks to work?  I imagine there won't be too many changes to make (just
ensure that ARCH = ARCH_IX86 and ENVIRON = ENVIRON_64 when building mpatrol)
- just look for ENVIRON_64 in the mpatrol source code to see where I did the
changes for MIPS and SPARC.  I don't have access to a 64-bit OS at the
moment so I can't really help much.

#1165 From: "Graeme Roy" <graeme_roy@...>
Date: Mon Oct 27, 2008 11:31 am
Subject: RE: interesting result : need help
graemeroy
Offline Offline
Send Email Send Email
 
Hi,
 
Glad to hear it's working OK for you, at least on one of your machines.
 
For SuSE Enterprise 64-bit, I assume that it's running on Intel Core 2 Duo and is therefore x86-64 (and not Itanium).  mpatrol has been ported to 64-bit architectures before (MIPS and SPARC for example) but I don't know if anything's been done by anyone to port it to 64-bit x86 (i.e. running in a 64-bit environment and not just under a 32-bit OS).  For example, the stack reading code will most likely be different which is probably why you're not getting any location information for the allocations.
 
Has anyone here run mpatrol on a 64-bit x86 architecture and got stack tracebacks to work?  I imagine there won't be too many changes to make (just ensure that ARCH = ARCH_IX86 and ENVIRON = ENVIRON_64 when building mpatrol) - just look for ENVIRON_64 in the mpatrol source code to see where I did the changes for MIPS and SPARC.  I don't have access to a 64-bit OS at the moment so I can't really help much.
 
Graeme.
 

From: mpatrol@yahoogroups.com [mailto:mpatrol@yahoogroups.com] On Behalf Of Sagar
Sent: 24 October 2008 08:47
To: mpatrol@yahoogroups.com
Subject: [mpatrol] interesting result : need help

Well i think at the 1st time there was some problem with my c++ setup
.. not really a mpatrol issue.....

well now a interesting report ...

On System1 ( SuSe enterprise ) 32 bit machine .
I can log the every alloc and free with proper address and proper size
and leak table is wonderful...

but on a different machine SuSe enterprise 64 bit

i can log only alloc and free with proper size only ,,, there is no
information regarding the address of location from where this malloc
is done .. and as a result there is no leak table in the end ....

what could be wrong in my case .. please guide ....


#1164 From: "vincent.torri" <vtorri@...>
Date: Mon Oct 27, 2008 11:20 am
Subject: Re: interesting result : need help
vincent.torri
Offline Offline
Send Email Send Email
 
--- In mpatrol@yahoogroups.com, Sagar <sagarseth@...> wrote:
>
> Well i think at the 1st time there was some problem with my c++ setup
> .. not really a mpatrol issue.....
>
> well now a interesting report ..
>
> On System1 ( SuSe enterprise ) 32 bit machine .
> I can log the every alloc and free with proper address and proper size
> and leak table is wonderful...
>
> but on a different machine SuSe enterprise 64 bit
>
> i can log only alloc and free with proper size only ,,, there is no
> information regarding the address of location from where this malloc
> is done .. and as a result there is no leak table in the end ....
>
> what could be wrong in my case .. please guide ...

I'm checking the compilation of mpatrol with my 64bits ubuntu and I
have problems. So maybe the problem is that you use a 64 bits kernel..

Right now, it's compiling but not linking. If I make good progress,
i'll inform the group

#1163 From: Sagar <sagarseth@...>
Date: Fri Oct 24, 2008 7:46 am
Subject: interesting result : need help
sagarindelhi
Online Now Online Now
Send Email Send Email
 
Well i think at the 1st time there was some problem with my c++ setup
.. not really a mpatrol issue.....

well now a interesting report ..

On System1 ( SuSe enterprise ) 32 bit machine .
I can log the every alloc and free with proper address and proper size
and leak table is wonderful...

but on a different machine SuSe enterprise 64 bit

i can log only alloc and free with proper size only ,,, there is no
information regarding the address of location from where this malloc
is done .. and as a result there is no leak table in the end ....

what could be wrong in my case .. please guide ...

#1162 From: "Graeme Roy" <graeme_roy@...>
Date: Thu Oct 23, 2008 8:53 am
Subject: RE: Re: question and remark about target.h
graemeroy
Offline Offline
Send Email Send Email
 
Hi,
 
Sounds like mpatrol is not being notified of the program's exit.  What sort of changes did you make to mpatrol to get it to work on SuSE?
 
There's a whole bunch of code starting at around line 113 in mpatrol/src/inter.c that handles mpatrol initialisation and termination.  It could be that the strategy used for Linux doesn't necessarily apply to SuSE linux.  For example, mpatrol can make use of the ..init and .fini sections to initialise/terminate, or can use C++ global constructors/destructors or just simply atexit().
 
It sounds like it might be an issue like this because the first problem you were having was to do with the mpatrol library not being initialised properly.
 
Graeme.


From: mpatrol@yahoogroups.com [mailto:mpatrol@yahoogroups.com] On Behalf Of Sagar
Sent: 23 October 2008 09:35
To: mpatrol@yahoogroups.com
Subject: Re: [mpatrol] Re: question and remark about target.h

Hi,

I don't get anything like that ... even tried the ls command for the
testing ,.,, just a log file with alloc and free information...

also there is no trace file ...

What could be wrong ..

Sagar

On 10/23/08, Graeme Roy <graeme_roy@yahoo.co.uk> wrote:
> Hi,
>
> Do you get any summary in the mpatrol log file when running it? For
> example, I get at the very end of the file:
>
> ....
> total heap usage: 1900544 bytes
> total compared: 0 bytes
> total located: 0 bytes
> total copied: 4804 bytes
> total set: 272868 bytes
> total warnings: 0
> total errors: 0
>
> top 2 unfreed memory entries in leak table:
>
> bytes count location
> -------- ------ --------
> 60 1 ___w32_sharedptr_initialize
> 8 1 _main
> 68 2 total
>
> Of course, that's running on Windows under MingGW but I was wondering if you
> get any of the summary of total heap usage, etc. If not then something is
> definitely wrong.
>
> Graeme.
>
>
> _____
>
> From: mpatrol@yahoogroups.com [mailto:mpatrol@yahoogroups.com] On Behalf Of
> Sagar
> Sent: 22 October 2008 13:08
> To: mpatrol@yahoogroups.com
> Subject: Re: [mpatrol] Re: question and remark about target.h
>
>
>
> Hi ...
>
> one more trouble ... after a lot of effort i am able to run the mpatrol
> .... but , ,, now
>
> sseth:~/code/test> cat helloworld.cpp
> #include<stdio.h>
>
> #include<iostream.h>
>
> int main()
> {
> printf("hello world \n");
> char *p = (char *)malloc(8);
> return 1;
>
> }
>
> doesn't gives me leak table .. i am using the leak table option
>
> mpatrol --dynamic --leak-table --log-all --log-file log.log ./helloworld
>
> please guide .....
>
> On 10/19/08, vincent.torri <vtorri@univ- <mailto:vtorri%40univ-evry.fr>
> evry.fr> wrote:
>> --- In mpatrol@yahoogroups <mailto:mpatrol%40yahoogroups.com> .com, Sagar
> <sagarseth@...> wrote:
>>>
>>> Hi ,,
>>>
>>> check if u have binutilties package on the box .. if not then u can
>> download
>>> the rpm or can download the source and build it ..
>>
>> ha, indeed, bfd.h is included in the dev package of binutils
>>
>> thanks
>>
>>
>>
>
> --
> Thanks and Regards
> Sagar
>
>
>
>

--
Thanks and Regards
Sagar


#1161 From: Sagar <sagarseth@...>
Date: Thu Oct 23, 2008 8:34 am
Subject: Re: Re: question and remark about target.h
sagarindelhi
Online Now Online Now
Send Email Send Email
 
Hi,

I don't get anything like that ... even tried the ls command for the
testing ,.,, just a log file with alloc and free information...

also there is no trace file ...

What could be wrong ..

Sagar

On 10/23/08, Graeme Roy <graeme_roy@...> wrote:
> Hi,
>
> Do you get any summary in the mpatrol log file when running it?  For
> example, I get at the very end of the file:
>
> ....
> total heap usage:  1900544 bytes
> total compared:    0 bytes
> total located:     0 bytes
> total copied:      4804 bytes
> total set:         272868 bytes
> total warnings:    0
> total errors:      0
>
> top 2 unfreed memory entries in leak table:
>
>        bytes   count  location
>     --------  ------  --------
>           60       1  ___w32_sharedptr_initialize
>            8       1  _main
>           68       2  total
>
> Of course, that's running on Windows under MingGW but I was wondering if you
> get any of the summary of total heap usage, etc.  If not then something is
> definitely wrong.
>
> Graeme.
>
>
>   _____
>
> From: mpatrol@yahoogroups.com [mailto:mpatrol@yahoogroups.com] On Behalf Of
> Sagar
> Sent: 22 October 2008 13:08
> To: mpatrol@yahoogroups.com
> Subject: Re: [mpatrol] Re: question and remark about target.h
>
>
>
> Hi ...
>
> one more trouble .. after a lot of effort i am able to run the mpatrol
> .... but , ,, now
>
> sseth:~/code/test> cat helloworld.cpp
> #include<stdio.h>
>
> #include<iostream.h>
>
> int main()
> {
> printf("hello world \n");
> char *p = (char *)malloc(8);
> return 1;
>
> }
>
> doesn't gives me leak table .. i am using the leak table option
>
> mpatrol --dynamic --leak-table --log-all --log-file log.log ./helloworld
>
> please guide ....
>
> On 10/19/08, vincent.torri <vtorri@univ- <mailto:vtorri%40univ-evry.fr>
> evry.fr> wrote:
>> --- In mpatrol@yahoogroups <mailto:mpatrol%40yahoogroups.com> .com, Sagar
> <sagarseth@...> wrote:
>>>
>>> Hi ,,
>>>
>>> check if u have binutilties package on the box .. if not then u can
>> download
>>> the rpm or can download the source and build it ..
>>
>> ha, indeed, bfd.h is included in the dev package of binutils
>>
>> thanks
>>
>>
>>
>
> --
> Thanks and Regards
> Sagar
>
>
>
>


--
Thanks and Regards
Sagar

#1160 From: "Graeme Roy" <graeme_roy@...>
Date: Thu Oct 23, 2008 8:31 am
Subject: RE: Re: question and remark about target.h
graemeroy
Offline Offline
Send Email Send Email
 
Hi,
 
Do you get any summary in the mpatrol log file when running it?  For example, I get at the very end of the file:
 
...
total heap usage:  1900544 bytes
total compared:    0 bytes
total located:     0 bytes
total copied:      4804 bytes
total set:         272868 bytes
total warnings:    0
total errors:      0
 
top 2 unfreed memory entries in leak table:
 
       bytes   count  location
    --------  ------  --------
          60       1  ___w32_sharedptr_initialize
           8       1  _main
          68       2  total
Of course, that's running on Windows under MingGW but I was wondering if you get any of the summary of total heap usage, etc.  If not then something is definitely wrong.
 
Graeme.

 

From: mpatrol@yahoogroups.com [mailto:mpatrol@yahoogroups.com] On Behalf Of Sagar
Sent: 22 October 2008 13:08
To: mpatrol@yahoogroups.com
Subject: Re: [mpatrol] Re: question and remark about target.h

Hi ...

one more trouble .. after a lot of effort i am able to run the mpatrol
... but , ,, now

sseth:~/code/test> cat helloworld.cpp
#include<stdio.h>

#include<iostream.h>

int main()
{
printf("hello world \n");
char *p = (char *)malloc(8);
return 1;

}

doesn't gives me leak table .. i am using the leak table option

mpatrol --dynamic --leak-table --log-all --log-file log.log ./helloworld

please guide ....

On 10/19/08, vincent.torri <vtorri@univ-evry.fr> wrote:
> --- In mpatrol@yahoogroups.com, Sagar <sagarseth@...> wrote:
>>
>> Hi ,,
>>
>> check if u have binutilties package on the box .. if not then u can
> download
>> the rpm or can download the source and build it ..
>
> ha, indeed, bfd.h is included in the dev package of binutils
>
> thanks
>
>
>

--
Thanks and Regards
Sagar


#1159 From: Sagar <sagarseth@...>
Date: Wed Oct 22, 2008 12:07 pm
Subject: Re: Re: question and remark about target.h
sagarindelhi
Online Now Online Now
Send Email Send Email
 
Hi ...

one more trouble .. after a lot of effort i am able to run the mpatrol
... but , ,, now

sseth:~/code/test> cat helloworld.cpp
#include<stdio.h>

#include<iostream.h>

int main()
{
     printf("hello world \n");
     char *p = (char *)malloc(8);
     return 1;

}

doesn't gives me leak table .. i am using the leak table option

mpatrol --dynamic --leak-table  --log-all --log-file log.log  ./helloworld

please guide ....

On 10/19/08, vincent.torri <vtorri@...> wrote:
> --- In mpatrol@yahoogroups.com, Sagar <sagarseth@...> wrote:
>>
>> Hi ,,
>>
>> check if u have binutilties package on the box .. if not then u can
> download
>> the rpm or can download the source and build it ..
>
> ha, indeed, bfd.h is included in the dev package of binutils
>
> thanks
>
>
>


--
Thanks and Regards
Sagar

#1158 From: "Graeme Roy" <graeme_roy@...>
Date: Mon Oct 20, 2008 8:35 am
Subject: RE: switching from cvs to svn on Sourceforge ?
graemeroy
Offline Offline
Send Email Send Email
 

Hi Marty,

 

Yes, I made a release a few months back (1.5.0) which is currently only available on SourceForge.  But I agree with you in that I should update the mpatrol home page to reflect that.  I’ll do that today.

 

If anyone knows of the problem Marty is having building on Ubuntu 7.10 could you let me know and I’ll incorporate the fix into the code.

 

Thanks,

 

Graeme.

 


From: mpatrol@yahoogroups.com [mailto:mpatrol@yahoogroups.com] On Behalf Of Marty Leisner
Sent: 16 October 2008 05:56
To: mpatrol@yahoogroups.com; Graeme Roy
Cc: leisner@...
Subject: Re: [mpatrol] switching from cvs to svn on Sourceforge ?

 

"Graeme Roy" <graeme_roy@yahoo.co.uk> writes on Mon, 13 Oct 2008 09:29:03 +010
0
> ------=_NextPart_000_0069_01C92D16.2237C320
> Content-Type: text/plain;
> charset="us-ascii"
> Content-Transfer-Encoding: 7bit
>
> Hi,
>
>
>
> Just to let everyone know that mpatrol on SourceForge now uses
Subversion
> rather than CVS. I've disabled access to the CVS repository, although I
> think it will still work if you have mpatrol already checked out under
CVS.
>
>
>
> Graeme.
>
>


I wasn't aware there was a new release...I got 1.4.8 a while ago
and tried to build it (unsucessfully) on ubuntu 7.10 --
Why don't you make a new 1.5.0 release?
(or maybe its somewhere hidden?)

marty


#1157 From: "vincent.torri" <vtorri@...>
Date: Sun Oct 19, 2008 8:01 am
Subject: Re: question and remark about target.h
vincent.torri
Offline Offline
Send Email Send Email
 
--- In mpatrol@yahoogroups.com, Sagar <sagarseth@...> wrote:
>
> Hi ,,
>
> check if u have binutilties package on the box .. if not then u can
download
> the rpm or can download the source and build it ..

ha, indeed, bfd.h is included in the dev package of binutils

thanks

#1156 From: Sagar <sagarseth@...>
Date: Sun Oct 19, 2008 7:47 am
Subject: Re: question and remark about target.h
sagarindelhi
Online Now Online Now
Send Email Send Email
 
Hi ,,
 
check if u have binutilties package on the box .. if not then u can download the rpm or can download the source and build it ..
 
i hope this will help u ..
 
Sagar

On Sun, Oct 19, 2008 at 8:37 AM, Vincent Torri <vtorri@...> wrote:


Hey !

First, a remark: i think that a define must be added for ARCH, to support
core2 duo or amd64. If I'm not mistaken, the arch is x86_64, though I
don't know what to check in order to correctly define ARCH.

Now, a question. I have a core2 duo, linux, so SYSTEM is defined to
SYSTEM_LINUX. Hence, FORMAT is defined to FORMAT_BFD. Hence, in symbol.c,
bfd.h is included. But I don't have that file. Do you know what is wrong ?

thank you

Vincent




--
Thanks and Regards
Sagar


#1155 From: Vincent Torri <vtorri@...>
Date: Sun Oct 19, 2008 6:37 am
Subject: question and remark about target.h
vincent.torri
Offline Offline
Send Email Send Email
 
Hey !

First, a remark: i think that a define must be added for ARCH, to support
core2 duo or amd64. If I'm not mistaken, the arch is x86_64, though I
don't know what to check in order to correctly define ARCH.

Now, a question. I have a core2 duo, linux, so SYSTEM is defined to
SYSTEM_LINUX. Hence, FORMAT is defined to FORMAT_BFD. Hence, in symbol.c,
bfd.h is included. But I don't have that file. Do you know what is wrong ?

thank you

Vincent

#1154 From: "Marty Leisner" <leisner@...>
Date: Thu Oct 16, 2008 4:55 am
Subject: Re: switching from cvs to svn on Sourceforge ?
martyleisner
Online Now Online Now
Send Email Send Email
 
"Graeme Roy" <graeme_roy@...> writes  on Mon, 13 Oct 2008 09:29:03 +010
0
      > ------=_NextPart_000_0069_01C92D16.2237C320
      > Content-Type: text/plain;
      >  charset="us-ascii"
      > Content-Transfer-Encoding: 7bit
      >
      > Hi,
      >
      >
      >
      > Just to let everyone know that mpatrol on SourceForge now uses
Subversion
      > rather than CVS.  I've disabled access to the CVS repository, although I
      > think it will still work if you have mpatrol already checked out under
CVS.
      >
      >
      >
      > Graeme.
      >
      >


I wasn't aware there was a new release...I got 1.4.8 a while ago
and tried to build it (unsucessfully) on ubuntu 7.10 --
Why don't you make a new 1.5.0 release?
(or maybe its somewhere hidden?)

marty

#1153 From: "Graeme Roy" <graeme_roy@...>
Date: Mon Oct 13, 2008 8:29 am
Subject: RE: switching from cvs to svn on Sourceforge ?
graemeroy
Offline Offline
Send Email Send Email
 

Hi,

 

Just to let everyone know that mpatrol on SourceForge now uses Subversion rather than CVS.  I’ve disabled access to the CVS repository, although I think it will still work if you have mpatrol already checked out under CVS.

 

Graeme.

 

 


From: mpatrol@yahoogroups.com [mailto:mpatrol@yahoogroups.com] On Behalf Of Graeme Roy
Sent: 08 October 2008 09:13
To: mpatrol@yahoogroups.com
Subject: RE: [mpatrol] switching from cvs to svn on Sourceforge ?

 

Hi Vincent,

 

Yes, I would.  I take it the existing revisions, tags and log messages will be preserved in the changeover?

 

We can take this thread off-group if you like and try to figure out the steps involved.

 

Thanks,


Graeme.

 


From: mpatrol@yahoogroups.com [mailto:mpatrol@yahoogroups.com] On Behalf Of vincent.torri
Sent: 07 October 2008 16:21
To: mpatrol@yahoogroups.com
Subject: [mpatrol] switching from cvs to svn on Sourceforge ?

 


Hey Graeme

So would you be interested to switch mpatrol to svn on Sourceforge ?

Vincent


#1152 From: "Graeme Roy" <graeme_roy@...>
Date: Wed Oct 8, 2008 8:54 am
Subject: RE: Even hello world gives ILLMEM
graemeroy
Offline Offline
Send Email Send Email
 

Hi,

 

I originally thought it might be a problem with initialisation of C++ programs and was going to suggest that you recompiled your test as a C program, but then you mentioned that you’d recompiled ls and had the same issue.  I really don’t know what could be causing this.  Does anyone else use mpatrol 1.4.8/1.5.0 on SuSE Linux, and are there any problems with it?

 

Graeme.

 


From: mpatrol@yahoogroups.com [mailto:mpatrol@yahoogroups.com] On Behalf Of Sagar
Sent: 07 October 2008 17:07
To: mpatrol@yahoogroups.com; graeme_roy@...
Subject: Re: [mpatrol] Even hello world gives ILLMEM

 

very strange ..

i tried just /bin/ls command instead of my helloworld and it worked
very fine .. very nice log file with very good leak table ...

then i got the code of ls command
compiled it ..
tested it
but when i tried it with mpatrol then it gave me same error as it did
for the helloworld

same issues with 1.5 ...

On 10/7/08, Sagar <sagarseth@gmail.com> wrote:
> Please have look at ..
>
> prmap501:~/code # ldd h2
> linux-gate.so.1 => (0xffffe000)
> libstdc++.so.6 => /usr/lib/libstdc++.so.6 (0xb7e0f000)
> libm.so.6 => /lib/libm.so.6 (0xb7dea000)
> libgcc_s.so.1 => /lib/libgcc_s.so.1 (0xb7ddf000)
> libc.so.6 => /lib/libc.so.6 (0xb7cbf000)
> /lib/ld-linux.so.2 (0xb7f02000)
>
> i hope it helps ...
>
>
> On 10/7/08, Sagar <sagarseth@gmail.com> wrote:
>> version mpatrol 1.4.8
>> os SUSE enterprise edition / same result on open suse 10.3
>>
>> processor one is p4 and otherone is core2duo
>>
>> also i hope this textshot helps u to help me ..
>>
>> prmap501:~/code # g++ helloworld.cpp -o h2
>> prmap501:~/code # ./h2
>> hello world
>> prmap501:~/code # ls
>> h2 helloworld.cpp
>> prmap501:~/code # cat helloworld.cpp
>> #include<stdio.h>
>> #include<iostream.h>
>>
>> int main()
>> {
>> printf("hello world\n");
>> return(0);
>> }

>>
>> prmap501:~/code # mpatrol --dynamic --leak-table --check-all
>> --check-fork --edit --list --log-all --log-file log_mpatrol.log --prof
>> --show-all --trace --trace-file trace_mpatrol.trace /root/code/h2
>> prmap501:~/code # ls
>> h2 helloworld.cpp log_mpatrol.log
>> prmap501:~/code # cat log_mpatrol.log
>> @(#) mpatrol 1.4.8 (02/01/08)
>> Copyright (C) 1997-2002 Graeme S. Roy
>>
>> This is free software, and you are welcome to redistribute it under
>> certain
>> conditions; see the GNU Library General Public License for details.
>>
>> For the latest mpatrol release and documentation,
>> visit http://www.cbmamiga.demon.co.uk/mpatrol.
>>
>> operating system: UNIX
>> system variant: Linux
>> processor architecture: Intel 80x86
>> processor word size: 32-bit
>> object file format: BFD
>> dynamic linker type: SVR4
>>
>> WARNING: [FRENUL]: free: attempt to free a NULL pointer
>>
>> Log file generated on Tue Oct 7 16:56:22 2008
>>
>> system page size: 4096 bytes
>> default alignment: 4 bytes
>> overflow size: 0 bytes
>> overflow byte: 0xAA
>> allocation byte: 0xFF
>> free byte: 0x55
>> allocation stop: 0
>> reallocation stop: 0
>> free stop: 0
>> unfreed abort: 0
>> small boundary: 32 bytes
>> medium boundary: 256 bytes
>> large boundary: 2048 bytes
>> lower check range: 0
>> upper check range: 0
>> check frequency: 1
>> failure frequency: 0
>> failure seed: 1223391382
>> prologue function: <unset>
>> epilogue function: <unset>
>> handler function: <unset>
>> log file: log_mpatrol.log
>> profiling file: mpatrol.1627.out
>> tracing file: trace_mpatrol.trace
>> program filename: /root/code/h2
>> symbols read: 0
>> autosave count: 0
>> freed queue size: 0
>> allocation count: 24
>> allocation peak: 20 (51461 bytes)
>> allocation limit: 0 bytes
>> allocated blocks: 19 (48913 bytes)
>> marked blocks: 0 (0 bytes)
>> freed blocks: 0 (0 bytes)
>> free blocks: 7 (8431 bytes)
>> internal blocks: 6 (98304 bytes)
>> total heap usage: 155648 bytes
>> total compared: 0 bytes
>> total located: 0 bytes
>> total copied: 2720 bytes
>> total set: 38824 bytes
>> total warnings: 1
>> total errors: 0
>>
>> ERROR: [ILLMEM]: illegal memory access at address 0x0000011D
>> 0x0000011D not in heap
>>
>> call stack
>> 0xB7EC9CAC ???
>> 0xB7ED3F4A ???
>> 0xB7EC101D ???
>> 0xB7F09763 ???
>> 0xB7F09873 ???
>> 0xB7EFC87F ???
>>
>>
>>
>> On 10/7/08, Graeme Roy <graeme_roy@yahoo.co.uk> wrote:
>>> You haven't given much information. What operating system and processor
>>> are
>>> you using and what version of mpatrol are you using?
>>>
>>>
>>>
>>> If you link helloworld with the mpatrol library rather than using the
>>> -dynamic option to the mpatrol command does it work? Post your hello
>>> world
>>> program as well if you want.
>>>
>>>
>>>
>>> Graeme.
>>>
>>>
>>>
>>> _____
>>>
>>> From: mpatrol@yahoogroups.com [mailto:mpatrol@yahoogroups.com] On Behalf
>>> Of
>>> Sagar Seth
>>> Sent: 07 October 2008 12:24
>>> To: mpatrol@yahoogroups.com
>>> Subject: [mpatrol] Even hello world gives ILLMEM
>>>
>>>
>>>
>>> Hello Everyone,
>>>
>>> I dont have much experience with mpatrol ..
>>>
>>> i tried to run a very simple hello world program
>>>
>>> with one single printf (hello world)
>>>
>>> and this gives me ILLMEM error at very base address 0X0000011D
>>>
>>> i used mpatrol --dynamic --log-all ./helloworld
>>>
>>> ../helloworld is fine ..
>>>
>>> can someone help me .. , i guess i am missing very basic ...
>>>
>>>
>>>
>>>
>>
>>
>> --
>> Thanks and Regards
>> Sagar
>>
>
>
> --
> Thanks and Regards
> Sagar
>

--
Thanks and Regards
Sagar


#1151 From: "Graeme Roy" <graeme_roy@...>
Date: Wed Oct 8, 2008 8:13 am
Subject: RE: switching from cvs to svn on Sourceforge ?
graemeroy
Offline Offline
Send Email Send Email
 

Hi Vincent,

 

Yes, I would.  I take it the existing revisions, tags and log messages will be preserved in the changeover?

 

We can take this thread off-group if you like and try to figure out the steps involved.

 

Thanks,


Graeme.

 


From: mpatrol@yahoogroups.com [mailto:mpatrol@yahoogroups.com] On Behalf Of vincent.torri
Sent: 07 October 2008 16:21
To: mpatrol@yahoogroups.com
Subject: [mpatrol] switching from cvs to svn on Sourceforge ?

 


Hey Graeme

So would you be interested to switch mpatrol to svn on Sourceforge ?

Vincent


#1150 From: "Sujin Philip" <sujin.phil@...>
Date: Wed Oct 8, 2008 7:01 am
Subject: Re: OFLOWWATCH on arm architecture
sp1982us
Online Now Online Now
Send Email Send Email
 
Thanks for your reply,

Sujin

On Tue, Oct 7, 2008 at 1:20 AM, Graeme Roy <graeme_roy@...> wrote:

Hi,

 

I didn't do anything other than preliminary support for the ARM architecture so unless someone's ported support for watchpoint debugging for mpatrol on ARM I don't think OFLOWWATCH will work.  You need to see if MP_WATCH_SUPPORT is being defined when the mpatrol source code is being built, and also look at __mp_memwatch() in memory.c to see if support for ARM has been added – there is already support for IRIX and Solaris there.

 

Also, you seem to have libmpatrol and libmpalloc linked in to the same process – you really shouldn't as you won't know which version of malloc() is being called; the debug version or the release version.  That could be another reason why you're not getting an error.

 

Graeme.

 


From: mpatrol@yahoogroups.com [mailto:mpatrol@yahoogroups.com] On Behalf Of sp1982us
Sent: 06 October 2008 18:10
To: mpatrol@yahoogroups.com
Subject: [mpatrol] OFLOWWATCH on arm architecture

 

Hi ,
I am a recent adoptee of mpatrol. I am unable to use the watch point
debugging flags on the arm architecture.

I compile using
arm_v5t_le-g++ (GCC) 3.4.3 (MontaVista 3.4.3-25.0.30.0501131
2005-07-23). Can somebody help me out or tell me if im doin something
wrong here ?

i use the following mpatrol options.

export MPATROL_OPTIONS='OFLOWBYTE=0x00 OFLOWSIZE=8 OFLOWWATCH USEDEBUG
CHECK=1-99/1 PAGEALLOC=UPPER NOFREE=2 PROGFILE="/usr/bin/test1"'

i am expecting to see the following output.(This is when i run it on
the x86)
ERROR: [RNGOVF]: memcpy: range [0x0956BFFC,0x0956C001] overflows
[0x0956A000,0x0956CFFF]
0x0956BFFC (4 bytes) {malloc:117:0} [int
main()|samples/source/test1.cpp|41]
0x08049885 main+65 at
/opt/devroot/mpatrol/samples/source/test1.cpp:41
0xB7D653F0 ???
0x080497C1 _start+33

However i only see the following

@(#) mpatrol 1.4.8 (02/01/08)
Copyright (C) 1997-2002 Graeme S. Roy

This is free software, and you are welcome to redistribute it under
certain
conditions; see the GNU Library General Public License for details.

For the latest mpatrol release and documentation,
visit http://www.cbmamiga.demon.co.uk/mpatrol.

operating system: UNIX
system variant: Linux
processor architecture: Unknown
processor word size: 32-bit
object file format: BFD
dynamic linker type: SVR4

Log file generated on Mon Oct 6 16:34:23 2008

read 337 symbols from /usr/lib/libmpatrol.so
read 80 symbols from /usr/lib/libmpalloc.so
read 0 symbols from /usr/lib/libbfd-2.15.94.so
read 4007 symbols from /lib/tls/libc.so.6
read 0 symbols from /usr/lib/libstdc++.so.6
read 24 symbols from /lib/tls/libdl.so.2
read 410 symbols from /lib/tls/libpthread.so.0
read 88 symbols from /lib/tls/librt.so.1
read 807 symbols from /lib/tls/libm.so.6
read 211 symbols from /lib/libgcc_s.so.1
read 251 symbols from /lib/ld-linux.so.3
read 17 symbols from /usr/bin/test1

This is my test program

#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#include "mpatrol.h"
#include "mpatrol/heapdiff.h"
class doublefree{

public:
doublefree()
{

create_error();
}

void printline()
{

printf("\n Memory test program \n");
}
void
readinputline()
{

//scanf("%c",ist);

scanf("%d",df);
}

private:
void
create_error()
{
df =
(int*) malloc(sizeof (int));
//ist
= (char*) malloc(sizeof (char));
}

public:
int *df;
//char *ist;
};

int main(void)
{
printf("\n\tCheck fence memory\n");
//char *str = new char[4];
char *str = (char*) malloc(4);
strcpy(str,"error");
free(str);
return 0;
}



#1149 From: Sagar <sagarseth@...>
Date: Tue Oct 7, 2008 3:09 pm
Subject: Re: Even hello world gives ILLMEM
sagarindelhi
Online Now Online Now
Send Email Send Email
 
Please have look at ..

prmap501:~/code # ldd h2
         linux-gate.so.1 =>  (0xffffe000)
         libstdc++.so.6 => /usr/lib/libstdc++.so.6 (0xb7e0f000)
         libm.so.6 => /lib/libm.so.6 (0xb7dea000)
         libgcc_s.so.1 => /lib/libgcc_s.so.1 (0xb7ddf000)
         libc.so.6 => /lib/libc.so.6 (0xb7cbf000)
         /lib/ld-linux.so.2 (0xb7f02000)

i hope it helps ...


On 10/7/08, Sagar <sagarseth@...> wrote:
> version mpatrol 1.4.8
> os SUSE enterprise edition / same result on open suse 10.3
>
> processor one is p4 and otherone is core2duo
>
> also i hope this textshot helps u to help me ..
>
> prmap501:~/code # g++ helloworld.cpp -o h2
> prmap501:~/code # ./h2
> hello world
> prmap501:~/code # ls
> h2  helloworld.cpp
> prmap501:~/code # cat helloworld.cpp
> #include<stdio.h>
> #include<iostream.h>
>
> int main()
> {
>      printf("hello world\n");
>      return(0);
> }
>
> prmap501:~/code # mpatrol --dynamic --leak-table --check-all
> --check-fork --edit --list --log-all --log-file log_mpatrol.log --prof
> --show-all --trace --trace-file trace_mpatrol.trace  /root/code/h2
> prmap501:~/code # ls
> h2  helloworld.cpp  log_mpatrol.log
> prmap501:~/code # cat log_mpatrol.log
> @(#) mpatrol 1.4.8 (02/01/08)
> Copyright (C) 1997-2002 Graeme S. Roy
>
> This is free software, and you are welcome to redistribute it under certain
> conditions; see the GNU Library General Public License for details.
>
> For the latest mpatrol release and documentation,
> visit http://www.cbmamiga.demon.co.uk/mpatrol.
>
> operating system:       UNIX
> system variant:         Linux
> processor architecture: Intel 80x86
> processor word size:    32-bit
> object file format:     BFD
> dynamic linker type:    SVR4
>
> WARNING: [FRENUL]: free: attempt to free a NULL pointer
>
> Log file generated on Tue Oct  7 16:56:22 2008
>
> system page size:  4096 bytes
> default alignment: 4 bytes
> overflow size:     0 bytes
> overflow byte:     0xAA
> allocation byte:   0xFF
> free byte:         0x55
> allocation stop:   0
> reallocation stop: 0
> free stop:         0
> unfreed abort:     0
> small boundary:    32 bytes
> medium boundary:   256 bytes
> large boundary:    2048 bytes
> lower check range: 0
> upper check range: 0
> check frequency:   1
> failure frequency: 0
> failure seed:      1223391382
> prologue function: <unset>
> epilogue function: <unset>
> handler function:  <unset>
> log file:          log_mpatrol.log
> profiling file:    mpatrol.1627.out
> tracing file:      trace_mpatrol.trace
> program filename:  /root/code/h2
> symbols read:      0
> autosave count:    0
> freed queue size:  0
> allocation count:  24
> allocation peak:   20 (51461 bytes)
> allocation limit:  0 bytes
> allocated blocks:  19 (48913 bytes)
> marked blocks:     0 (0 bytes)
> freed blocks:      0 (0 bytes)
> free blocks:       7 (8431 bytes)
> internal blocks:   6 (98304 bytes)
> total heap usage:  155648 bytes
> total compared:    0 bytes
> total located:     0 bytes
> total copied:      2720 bytes
> total set:         38824 bytes
> total warnings:    1
> total errors:      0
>
> ERROR: [ILLMEM]: illegal memory access at address 0x0000011D
>     0x0000011D not in heap
>
>     call stack
>         0xB7EC9CAC ???
>         0xB7ED3F4A ???
>         0xB7EC101D ???
>         0xB7F09763 ???
>         0xB7F09873 ???
>         0xB7EFC87F ???
>
>
>
> On 10/7/08, Graeme Roy <graeme_roy@...> wrote:
>> You haven't given much information.  What operating system and processor
>> are
>> you using and what version of mpatrol are you using?
>>
>>
>>
>> If you link helloworld with the mpatrol library rather than using the
>> -dynamic option to the mpatrol command does it work?  Post your hello
>> world
>> program as well if you want.
>>
>>
>>
>> Graeme.
>>
>>
>>
>>   _____
>>
>> From: mpatrol@yahoogroups.com [mailto:mpatrol@yahoogroups.com] On Behalf
>> Of
>> Sagar Seth
>> Sent: 07 October 2008 12:24
>> To: mpatrol@yahoogroups.com
>> Subject: [mpatrol] Even hello world gives ILLMEM
>>
>>
>>
>> Hello Everyone,
>>
>> I dont have much experience with mpatrol ..
>>
>> i tried to run a very simple hello world program
>>
>> with one single printf (hello world)
>>
>> and this gives me ILLMEM error at very base address 0X0000011D
>>
>> i used mpatrol --dynamic --log-all ./helloworld
>>
>> ../helloworld is fine ..
>>
>> can someone help me .. , i guess i am missing very basic ..
>>
>>
>>
>>
>
>
> --
> Thanks and Regards
> Sagar
>


--
Thanks and Regards
Sagar

#1148 From: Sagar <sagarseth@...>
Date: Tue Oct 7, 2008 4:07 pm
Subject: Re: Even hello world gives ILLMEM
sagarindelhi
Online Now Online Now
Send Email Send Email
 
very strange ..

i tried just /bin/ls command instead of my helloworld and it worked
very fine .. very nice log file with very good leak table ...


then i got the code of ls command
compiled it ..
tested it
but when i tried it with mpatrol then it gave me same error as it did
for the helloworld

same issues with 1.5 ...

On 10/7/08, Sagar <sagarseth@...> wrote:
> Please have look at ..
>
> prmap501:~/code # ldd h2
>         linux-gate.so.1 =>  (0xffffe000)
>         libstdc++.so.6 => /usr/lib/libstdc++.so.6 (0xb7e0f000)
>         libm.so.6 => /lib/libm.so.6 (0xb7dea000)
>         libgcc_s.so.1 => /lib/libgcc_s.so.1 (0xb7ddf000)
>         libc.so.6 => /lib/libc.so.6 (0xb7cbf000)
>         /lib/ld-linux.so.2 (0xb7f02000)
>
> i hope it helps ...
>
>
> On 10/7/08, Sagar <sagarseth@...> wrote:
>> version mpatrol 1.4.8
>> os SUSE enterprise edition / same result on open suse 10.3
>>
>> processor one is p4 and otherone is core2duo
>>
>> also i hope this textshot helps u to help me ..
>>
>> prmap501:~/code # g++ helloworld.cpp -o h2
>> prmap501:~/code # ./h2
>> hello world
>> prmap501:~/code # ls
>> h2  helloworld.cpp
>> prmap501:~/code # cat helloworld.cpp
>> #include<stdio.h>
>> #include<iostream.h>
>>
>> int main()
>> {
>>      printf("hello world\n");
>>      return(0);
>> }
>>
>> prmap501:~/code # mpatrol --dynamic --leak-table --check-all
>> --check-fork --edit --list --log-all --log-file log_mpatrol.log --prof
>> --show-all --trace --trace-file trace_mpatrol.trace  /root/code/h2
>> prmap501:~/code # ls
>> h2  helloworld.cpp  log_mpatrol.log
>> prmap501:~/code # cat log_mpatrol.log
>> @(#) mpatrol 1.4.8 (02/01/08)
>> Copyright (C) 1997-2002 Graeme S. Roy
>>
>> This is free software, and you are welcome to redistribute it under
>> certain
>> conditions; see the GNU Library General Public License for details.
>>
>> For the latest mpatrol release and documentation,
>> visit http://www.cbmamiga.demon.co.uk/mpatrol.
>>
>> operating system:       UNIX
>> system variant:         Linux
>> processor architecture: Intel 80x86
>> processor word size:    32-bit
>> object file format:     BFD
>> dynamic linker type:    SVR4
>>
>> WARNING: [FRENUL]: free: attempt to free a NULL pointer
>>
>> Log file generated on Tue Oct  7 16:56:22 2008
>>
>> system page size:  4096 bytes
>> default alignment: 4 bytes
>> overflow size:     0 bytes
>> overflow byte:     0xAA
>> allocation byte:   0xFF
>> free byte:         0x55
>> allocation stop:   0
>> reallocation stop: 0
>> free stop:         0
>> unfreed abort:     0
>> small boundary:    32 bytes
>> medium boundary:   256 bytes
>> large boundary:    2048 bytes
>> lower check range: 0
>> upper check range: 0
>> check frequency:   1
>> failure frequency: 0
>> failure seed:      1223391382
>> prologue function: <unset>
>> epilogue function: <unset>
>> handler function:  <unset>
>> log file:          log_mpatrol.log
>> profiling file:    mpatrol.1627.out
>> tracing file:      trace_mpatrol.trace
>> program filename:  /root/code/h2
>> symbols read:      0
>> autosave count:    0
>> freed queue size:  0
>> allocation count:  24
>> allocation peak:   20 (51461 bytes)
>> allocation limit:  0 bytes
>> allocated blocks:  19 (48913 bytes)
>> marked blocks:     0 (0 bytes)
>> freed blocks:      0 (0 bytes)
>> free blocks:       7 (8431 bytes)
>> internal blocks:   6 (98304 bytes)
>> total heap usage:  155648 bytes
>> total compared:    0 bytes
>> total located:     0 bytes
>> total copied:      2720 bytes
>> total set:         38824 bytes
>> total warnings:    1
>> total errors:      0
>>
>> ERROR: [ILLMEM]: illegal memory access at address 0x0000011D
>>     0x0000011D not in heap
>>
>>     call stack
>>         0xB7EC9CAC ???
>>         0xB7ED3F4A ???
>>         0xB7EC101D ???
>>         0xB7F09763 ???
>>         0xB7F09873 ???
>>         0xB7EFC87F ???
>>
>>
>>
>> On 10/7/08, Graeme Roy <graeme_roy@...> wrote:
>>> You haven't given much information.  What operating system and processor
>>> are
>>> you using and what version of mpatrol are you using?
>>>
>>>
>>>
>>> If you link helloworld with the mpatrol library rather than using the
>>> -dynamic option to the mpatrol command does it work?  Post your hello
>>> world
>>> program as well if you want.
>>>
>>>
>>>
>>> Graeme.
>>>
>>>
>>>
>>>   _____
>>>
>>> From: mpatrol@yahoogroups.com [mailto:mpatrol@yahoogroups.com] On Behalf
>>> Of
>>> Sagar Seth
>>> Sent: 07 October 2008 12:24
>>> To: mpatrol@yahoogroups.com
>>> Subject: [mpatrol] Even hello world gives ILLMEM
>>>
>>>
>>>
>>> Hello Everyone,
>>>
>>> I dont have much experience with mpatrol ..
>>>
>>> i tried to run a very simple hello world program
>>>
>>> with one single printf (hello world)
>>>
>>> and this gives me ILLMEM error at very base address 0X0000011D
>>>
>>> i used mpatrol --dynamic --log-all ./helloworld
>>>
>>> ../helloworld is fine ..
>>>
>>> can someone help me .. , i guess i am missing very basic ..
>>>
>>>
>>>
>>>
>>
>>
>> --
>> Thanks and Regards
>> Sagar
>>
>
>
> --
> Thanks and Regards
> Sagar
>


--
Thanks and Regards
Sagar

#1147 From: "vincent.torri" <vtorri@...>
Date: Tue Oct 7, 2008 3:20 pm
Subject: switching from cvs to svn on Sourceforge ?
vincent.torri
Offline Offline
Send Email Send Email
 
Hey Graeme

So would you be interested to switch mpatrol to svn on Sourceforge ?

Vincent

#1146 From: "Graeme Roy" <graeme_roy@...>
Date: Tue Oct 7, 2008 3:05 pm
Subject: RE: Even hello world gives ILLMEM
graemeroy
Offline Offline
Send Email Send Email
 

Hi,

 

This looks like it could be crashing before your program is being run (no symbols have been read from shared libraries).  This will most likely be due to things not being fully set up before the mpatrol library is initialised, and that’s normally caused by order of initialisation of shared libraries, which you have no control over if you use --dynamic.  You probably won’t be able to use the –dynamic option.  Of course, I could be wrong - try explicitly linking with the mpatrol archive library to see if that works.  If it doesn’t then there’s something seriously wrong.  You could also try the 1.5.0 release in SourceForge to see if something’s been fixed there, but I doubt it.

 

Good luck,

 

Graeme.

 


From: mpatrol@yahoogroups.com [mailto:mpatrol@yahoogroups.com] On Behalf Of Sagar
Sent: 07 October 2008 14:25
To: mpatrol@yahoogroups.com; graeme_roy@...
Subject: Re: [mpatrol] Even hello world gives ILLMEM

 

version mpatrol 1.4.8
os SUSE enterprise edition / same result on open suse 10.3

processor one is p4 and otherone is core2duo

also i hope this textshot helps u to help me ..

prmap501:~/code # g++ helloworld.cpp -o h2
prmap501:~/code # ./h2
hello world
prmap501:~/code # ls
h2 helloworld.cpp
prmap501:~/code # cat helloworld.cpp
#include<stdio.h>
#include<iostream.h>

int main()
{
printf("hello world\n");
return(0);
}


prmap501:~/code # mpatrol --dynamic --leak-table --check-all
--check-fork --edit --list --log-all --log-file log_mpatrol.log --prof
--show-all --trace --trace-file trace_mpatrol.trace /root/code/h2
prmap501:~/code # ls
h2 helloworld.cpp log_mpatrol.log
prmap501:~/code # cat log_mpatrol.log
@(#) mpatrol 1.4.8 (02/01/08)
Copyright (C) 1997-2002 Graeme S. Roy

This is free software, and you are welcome to redistribute it under certain
conditions; see the GNU Library General Public License for details.

For the latest mpatrol release and documentation,
visit http://www.cbmamiga.demon.co.uk/mpatrol.

operating system: UNIX
system variant: Linux
processor architecture: Intel 80x86
processor word size: 32-bit
object file format: BFD
dynamic linker type: SVR4

WARNING: [FRENUL]: free: attempt to free a NULL pointer

Log file generated on Tue Oct 7 16:56:22 2008

system page size: 4096 bytes
default alignment: 4 bytes
overflow size: 0 bytes
overflow byte: 0xAA
allocation byte: 0xFF
free byte: 0x55
allocation stop: 0
reallocation stop: 0
free stop: 0
unfreed abort: 0
small boundary: 32 bytes
medium boundary: 256 bytes
large boundary: 2048 bytes
lower check range: 0
upper check range: 0
check frequency: 1
failure frequency: 0
failure seed: 1223391382
prologue function: <unset>
epilogue function: <unset>
handler function: <unset>
log file: log_mpatrol.log
profiling file: mpatrol.1627.out
tracing file: trace_mpatrol.trace
program filename: /root/code/h2
symbols read: 0
autosave count: 0
freed queue size: 0
allocation count: 24
allocation peak: 20 (51461 bytes)
allocation limit: 0 bytes
allocated blocks: 19 (48913 bytes)
marked blocks: 0 (0 bytes)
freed blocks: 0 (0 bytes)
free blocks: 7 (8431 bytes)
internal blocks: 6 (98304 bytes)
total heap usage: 155648 bytes
total compared: 0 bytes
total located: 0 bytes
total copied: 2720 bytes
total set: 38824 bytes
total warnings: 1
total errors: 0

ERROR: [ILLMEM]: illegal memory access at address 0x0000011D
0x0000011D not in heap

call stack
0xB7EC9CAC ???
0xB7ED3F4A ???
0xB7EC101D ???
0xB7F09763 ???
0xB7F09873 ???
0xB7EFC87F ???

On 10/7/08, Graeme Roy <graeme_roy@yahoo.co.uk> wrote:
> You haven't given much information. What operating system and processor are
> you using and what version of mpatrol are you using?
>
>
>
> If you link helloworld with the mpatrol library rather than using the
> -dynamic option to the mpatrol command does it work? Post your hello world
> program as well if you want.
>
>
>
> Graeme.
>
>
>
> _____
>
> From: mpatrol@yahoogroups.com [mailto:mpatrol@yahoogroups.com] On Behalf Of
> Sagar Seth
> Sent: 07 October 2008 12:24
> To: mpatrol@yahoogroups.com
> Subject: [mpatrol] Even hello world gives ILLMEM
>
>
>
> Hello Everyone,
>
> I dont have much experience with mpatrol ..
>
> i tried to run a very simple hello world program
>
> with one single printf (hello world)
>
> and this gives me ILLMEM error at very base address 0X0000011D
>
> i used mpatrol --dynamic --log-all ./helloworld
>
> ../helloworld is fine ..
>
> can someone help me .. , i guess i am missing very basic ..
>
>
>
>

--
Thanks and Regards
Sagar


#1145 From: Sagar <sagarseth@...>
Date: Tue Oct 7, 2008 1:24 pm
Subject: Re: Even hello world gives ILLMEM
sagarindelhi
Online Now Online Now
Send Email Send Email
 
version mpatrol 1.4.8
os SUSE enterprise edition / same result on open suse 10.3

processor one is p4 and otherone is core2duo

also i hope this textshot helps u to help me ..

prmap501:~/code # g++ helloworld.cpp -o h2
prmap501:~/code # ./h2
hello world
prmap501:~/code # ls
h2  helloworld.cpp
prmap501:~/code # cat helloworld.cpp
#include<stdio.h>
#include<iostream.h>

int main()
{
      printf("hello world\n");
      return(0);
}

prmap501:~/code # mpatrol --dynamic --leak-table --check-all
--check-fork --edit --list --log-all --log-file log_mpatrol.log --prof
--show-all --trace --trace-file trace_mpatrol.trace  /root/code/h2
prmap501:~/code # ls
h2  helloworld.cpp  log_mpatrol.log
prmap501:~/code # cat log_mpatrol.log
@(#) mpatrol 1.4.8 (02/01/08)
Copyright (C) 1997-2002 Graeme S. Roy

This is free software, and you are welcome to redistribute it under certain
conditions; see the GNU Library General Public License for details.

For the latest mpatrol release and documentation,
visit http://www.cbmamiga.demon.co.uk/mpatrol.

operating system:       UNIX
system variant:         Linux
processor architecture: Intel 80x86
processor word size:    32-bit
object file format:     BFD
dynamic linker type:    SVR4

WARNING: [FRENUL]: free: attempt to free a NULL pointer

Log file generated on Tue Oct  7 16:56:22 2008

system page size:  4096 bytes
default alignment: 4 bytes
overflow size:     0 bytes
overflow byte:     0xAA
allocation byte:   0xFF
free byte:         0x55
allocation stop:   0
reallocation stop: 0
free stop:         0
unfreed abort:     0
small boundary:    32 bytes
medium boundary:   256 bytes
large boundary:    2048 bytes
lower check range: 0
upper check range: 0
check frequency:   1
failure frequency: 0
failure seed:      1223391382
prologue function: <unset>
epilogue function: <unset>
handler function:  <unset>
log file:          log_mpatrol.log
profiling file:    mpatrol.1627.out
tracing file:      trace_mpatrol.trace
program filename:  /root/code/h2
symbols read:      0
autosave count:    0
freed queue size:  0
allocation count:  24
allocation peak:   20 (51461 bytes)
allocation limit:  0 bytes
allocated blocks:  19 (48913 bytes)
marked blocks:     0 (0 bytes)
freed blocks:      0 (0 bytes)
free blocks:       7 (8431 bytes)
internal blocks:   6 (98304 bytes)
total heap usage:  155648 bytes
total compared:    0 bytes
total located:     0 bytes
total copied:      2720 bytes
total set:         38824 bytes
total warnings:    1
total errors:      0

ERROR: [ILLMEM]: illegal memory access at address 0x0000011D
     0x0000011D not in heap

     call stack
         0xB7EC9CAC ???
         0xB7ED3F4A ???
         0xB7EC101D ???
         0xB7F09763 ???
         0xB7F09873 ???
         0xB7EFC87F ???



On 10/7/08, Graeme Roy <graeme_roy@...> wrote:
> You haven't given much information.  What operating system and processor are
> you using and what version of mpatrol are you using?
>
>
>
> If you link helloworld with the mpatrol library rather than using the
> -dynamic option to the mpatrol command does it work?  Post your hello world
> program as well if you want.
>
>
>
> Graeme.
>
>
>
>   _____
>
> From: mpatrol@yahoogroups.com [mailto:mpatrol@yahoogroups.com] On Behalf Of
> Sagar Seth
> Sent: 07 October 2008 12:24
> To: mpatrol@yahoogroups.com
> Subject: [mpatrol] Even hello world gives ILLMEM
>
>
>
> Hello Everyone,
>
> I dont have much experience with mpatrol ..
>
> i tried to run a very simple hello world program
>
> with one single printf (hello world)
>
> and this gives me ILLMEM error at very base address 0X0000011D
>
> i used mpatrol --dynamic --log-all ./helloworld
>
> ../helloworld is fine ..
>
> can someone help me .. , i guess i am missing very basic ..
>
>
>
>


--
Thanks and Regards
Sagar

#1144 From: "Graeme Roy" <graeme_roy@...>
Date: Tue Oct 7, 2008 12:29 pm
Subject: RE: Even hello world gives ILLMEM
graemeroy
Offline Offline
Send Email Send Email
 

You haven’t given much information.  What operating system and processor are you using and what version of mpatrol are you using?

 

If you link helloworld with the mpatrol library rather than using the –dynamic option to the mpatrol command does it work?  Post your hello world program as well if you want.

 

Graeme.

 


From: mpatrol@yahoogroups.com [mailto:mpatrol@yahoogroups.com] On Behalf Of Sagar Seth
Sent: 07 October 2008 12:24
To: mpatrol@yahoogroups.com
Subject: [mpatrol] Even hello world gives ILLMEM

 

Hello Everyone,

I dont have much experience with mpatrol ..

i tried to run a very simple hello world program

with one single printf (hello world)

and this gives me ILLMEM error at very base address 0X0000011D

i used mpatrol --dynamic --log-all ./helloworld

../helloworld is fine ..

can someone help me .. , i guess i am missing very basic ..


#1143 From: "Sagar Seth" <sagarseth@...>
Date: Tue Oct 7, 2008 11:24 am
Subject: Even hello world gives ILLMEM
sagarindelhi
Online Now Online Now
Send Email Send Email
 
Hello Everyone,

I dont have much experience with mpatrol ..

i tried to run a very simple hello world program

with one single printf (hello world)

and this gives me ILLMEM error at very base address 0X0000011D

i used mpatrol --dynamic --log-all ./helloworld

./helloworld is fine ..

can someone help me .. , i guess i am missing very basic ..

#1142 From: "Graeme Roy" <graeme_roy@...>
Date: Tue Oct 7, 2008 8:20 am
Subject: RE: OFLOWWATCH on arm architecture
graemeroy
Offline Offline
Send Email Send Email
 

Hi,

 

I didn’t do anything other than preliminary support for the ARM architecture so unless someone’s ported support for watchpoint debugging for mpatrol on ARM I don’t think OFLOWWATCH will work.  You need to see if MP_WATCH_SUPPORT is being defined when the mpatrol source code is being built, and also look at __mp_memwatch() in memory.c to see if support for ARM has been added – there is already support for IRIX and Solaris there.

 

Also, you seem to have libmpatrol and libmpalloc linked in to the same process – you really shouldn’t as you won’t know which version of malloc() is being called; the debug version or the release version.  That could be another reason why you’re not getting an error.

 

Graeme.

 


From: mpatrol@yahoogroups.com [mailto:mpatrol@yahoogroups.com] On Behalf Of sp1982us
Sent: 06 October 2008 18:10
To: mpatrol@yahoogroups.com
Subject: [mpatrol] OFLOWWATCH on arm architecture

 

Hi ,
I am a recent adoptee of mpatrol. I am unable to use the watch point
debugging flags on the arm architecture.

I compile using
arm_v5t_le-g++ (GCC) 3.4.3 (MontaVista 3.4.3-25.0.30.0501131
2005-07-23). Can somebody help me out or tell me if im doin something
wrong here ?

i use the following mpatrol options.

export MPATROL_OPTIONS='OFLOWBYTE=0x00 OFLOWSIZE=8 OFLOWWATCH USEDEBUG
CHECK=1-99/1 PAGEALLOC=UPPER NOFREE=2 PROGFILE="/usr/bin/test1"'

i am expecting to see the following output.(This is when i run it on
the x86)
ERROR: [RNGOVF]: memcpy: range [0x0956BFFC,0x0956C001] overflows
[0x0956A000,0x0956CFFF]
0x0956BFFC (4 bytes) {malloc:117:0} [int
main()|samples/source/test1.cpp|41]
0x08049885 main+65 at
/opt/devroot/mpatrol/samples/source/test1.cpp:41
0xB7D653F0 ???
0x080497C1 _start+33

However i only see the following

@(#) mpatrol 1.4.8 (02/01/08)
Copyright (C) 1997-2002 Graeme S. Roy

This is free software, and you are welcome to redistribute it under
certain
conditions; see the GNU Library General Public License for details.

For the latest mpatrol release and documentation,
visit http://www.cbmamiga.demon.co.uk/mpatrol.

operating system: UNIX
system variant: Linux
processor architecture: Unknown
processor word size: 32-bit
object file format: BFD
dynamic linker type: SVR4

Log file generated on Mon Oct 6 16:34:23 2008

read 337 symbols from /usr/lib/libmpatrol.so
read 80 symbols from /usr/lib/libmpalloc.so
read 0 symbols from /usr/lib/libbfd-2.15.94.so
read 4007 symbols from /lib/tls/libc.so.6
read 0 symbols from /usr/lib/libstdc++.so.6
read 24 symbols from /lib/tls/libdl.so.2
read 410 symbols from /lib/tls/libpthread.so.0
read 88 symbols from /lib/tls/librt.so.1
read 807 symbols from /lib/tls/libm.so.6
read 211 symbols from /lib/libgcc_s.so.1
read 251 symbols from /lib/ld-linux.so.3
read 17 symbols from /usr/bin/test1

This is my test program

#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#include "mpatrol.h"
#include "mpatrol/heapdiff.h"
class doublefree{

public:
doublefree()
{

create_error();
}


void printline()
{

printf("\n Memory test program \n");
}

void
readinputline()
{

//scanf("%c",ist);

scanf("%d",df);
}


private:
void
create_error()
{
df =
(int*) malloc(sizeof (int));
//ist
= (char*) malloc(sizeof (char));
}


public:
int *df;
//char *ist;
};

int main(void)
{
printf("\n\tCheck fence memory\n");
//char *str = new char[4];
char *str = (char*) malloc(4);
strcpy(str,"error");
free(str);
return 0;
}


#1141 From: "sp1982us" <sujin.phil@...>
Date: Mon Oct 6, 2008 5:09 pm
Subject: OFLOWWATCH on arm architecture
sp1982us
Online Now Online Now
Send Email Send Email
 
Hi ,
I am a recent adoptee of mpatrol. I am unable to use the watch point
debugging flags on the arm architecture.

I compile using
arm_v5t_le-g++ (GCC) 3.4.3 (MontaVista 3.4.3-25.0.30.0501131
2005-07-23). Can somebody help me out or tell me if im doin something
wrong here ?

i use the following mpatrol options.

export MPATROL_OPTIONS='OFLOWBYTE=0x00 OFLOWSIZE=8 OFLOWWATCH USEDEBUG
CHECK=1-99/1 PAGEALLOC=UPPER NOFREE=2 PROGFILE="/usr/bin/test1"'

i am expecting to see the following output.(This is when i run it on
the x86)
ERROR: [RNGOVF]: memcpy: range [0x0956BFFC,0x0956C001] overflows
[0x0956A000,0x0956CFFF]
     0x0956BFFC (4 bytes) {malloc:117:0} [int
main()|samples/source/test1.cpp|41]
         0x08049885 main+65 at
/opt/devroot/mpatrol/samples/source/test1.cpp:41
         0xB7D653F0 ???
         0x080497C1 _start+33

However i only see the following

@(#) mpatrol 1.4.8 (02/01/08)
Copyright (C) 1997-2002 Graeme S. Roy

This is free software, and you are welcome to redistribute it under
certain
conditions; see the GNU Library General Public License for details.

For the latest mpatrol release and documentation,
visit http://www.cbmamiga.demon.co.uk/mpatrol.

operating system:       UNIX
system variant:         Linux
processor architecture: Unknown
processor word size:    32-bit
object file format:     BFD
dynamic linker type:    SVR4

Log file generated on Mon Oct  6 16:34:23 2008

read 337 symbols from /usr/lib/libmpatrol.so
read 80 symbols from /usr/lib/libmpalloc.so
read 0 symbols from /usr/lib/libbfd-2.15.94.so
read 4007 symbols from /lib/tls/libc.so.6
read 0 symbols from /usr/lib/libstdc++.so.6
read 24 symbols from /lib/tls/libdl.so.2
read 410 symbols from /lib/tls/libpthread.so.0
read 88 symbols from /lib/tls/librt.so.1
read 807 symbols from /lib/tls/libm.so.6
read 211 symbols from /lib/libgcc_s.so.1
read 251 symbols from /lib/ld-linux.so.3
read 17 symbols from /usr/bin/test1


This is my test program

#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#include "mpatrol.h"
#include "mpatrol/heapdiff.h"
class doublefree{

                                         public:
                                                         doublefree()
                                                         {

create_error();
                                                         }

                                                         void printline()
                                                         {

printf("\n Memory test program \n");
                                                         }
                                                         void
readinputline()
                                                         {

//scanf("%c",ist);

scanf("%d",df);
                                                         }

                                         private:
                                                         void
create_error()
                                                         {
                                                                 df =
(int*) malloc(sizeof (int));
                                                                 //ist
= (char*) malloc(sizeof (char));
                                                         }

                                         public:
                                                         int *df;
                                                         //char *ist;
                                 };


int main(void)
{
                                 printf("\n\tCheck fence memory\n");
                                 //char *str = new char[4];
                                 char *str = (char*) malloc(4);
                                 strcpy(str,"error");
                                 free(str);
                                 return 0;
                                 }

#1140 From: "vincent.torri" <vtorri@...>
Date: Mon Oct 6, 2008 7:40 pm
Subject: Re: mpatrol 1.5: can't compile it on mingw (with msys)
vincent.torri
Offline Offline
Send Email Send Email
 
Hey,

> For your first build issue, simply add "all" onto the end of the make
> command and that will build everything.

Ok, I'll try

> As for autotools, I agree it isn't well supported in mpatrol and
could have
> been done better.  However, there were several issues in the way of
that:
>
>
>
> 1. mpatrol was written to take advantage of as many UNIX-specific
> features as it can (watchpoints, siginfo_t, reading from undocumented
> dynamic linker structures, etc).  While I know that I could have
still used
> autotools, I would have to write a whole bunch of new feature tests and
> there didn't seem to be much advantage to doing that, especially as it
> wouldn't have helped me to port mpatrol to new architectures / operating
> systems.

Maybe for a 1.5 it would have been the occasion to do that. What you
can do also, in case you fear to break things is to release a RC
(release candidate), announce it on some places (freshmeat, phoronix,
osnews, slashdot, etc...) and ask for some tests. Then, after some
delay, you can do an official release.

another thing that could be done are unit tests (with the test
library, for example. That help a lot.

> 2. The source code for mpatrol was several years old and quite mature
> by the time I added autotools support (mpatrol 1.4.6).  As such, I
didn't
> want to start making major changes in case it introduced new bugs.
Besides,
> I was using CVS for source code control and I don't like the way it
handles
> moving/renaming files and directories (SVN is a big improvement).

Then, maybe the fisrt thing to do is moving to svn on SF. There is a
guide for that somewhere on SF. Indeed, svn is better than cvs.


> I freely admit that I'm not an autotools expert and I'd be happy for
you to
> help with that.

No problem for helping you with that. I can start a bit and show you
what can be done (for example just for unix). After that, we can see
if we can go forward.

> For Windows CE, mpatrol will probably compile and build but I'm not
sure if
> it will run unless you have a lot of memory on the embedded device.  I
> suppose there's only one way to find out though.

Haaa, mpatrol requires a lot of mem. That can be a problem. But as you
say, I have to check that...

best regards

Vincent Torri

    _____
>
> From: mpatrol@yahoogroups.com [mailto:mpatrol@yahoogroups.com] On
Behalf Of
> vincent.torri
> Sent: 05 October 2008 12:51
> To: mpatrol@yahoogroups.com
> Subject: [mpatrol] mpatrol 1.5: can't compile it on mingw (with msys)
>
>
>
> Hey,
>
> I have just seen that mpatrol has been updated. That is a great news.
> I plan to use it on Windows, as it seems that it's the best mem
> checker on that OS.
>
> So I have just check out the cvs repository and tried to compile it
> with MSYS / MinGW, with 2 ways:
>
> 1) I go to build/windows and run:
>
> make -f Makefile.mingw
>
> but only the static lib (libmpatrol.a) is built.
>
> 2) i go to pkg/auto and run .:setup, ./confgure and make. I got errors
> with the doc subdir (texinfo missing, i just removed doc from the
> subdir to quickly test mpatrol), then :
>
> src/Makefile.am: object `tree.$(OBJEXT)' created both with libtool and
> without
> src/Makefile.am: object `version.$(OBJEXT)' created both with libtool
> and without
> src/Makefile.am: object `list.$(OBJEXT)' created both with libtool and
> without
> src/Makefile.am: object `slots.$(OBJEXT)' created both with libtool
> and without
> src/Makefile.am: object `utils.$(OBJEXT)' created both with libtool
> and without
> make[2]: *** [Makefile.in] Error 1
>
> I think that the way mpatrol is configured is really too complicated.
> It should be a lot simpler, imho.
>
> I just give the way I usually organise my projects, maybe it can help
> (and i can help if needed. I'm very interested in mpatrol)
>
> my_project/
> configure.ac
> Makefile.am
> doc/
> Makefile.am
> src/
> Makefile.am
> bin/
> Makefile.am
> file_bin.c
> ....
> lib/
> Makefile.am
> file_lib.c
> ....
>
> in src/ you can add subdirectories like tests/ or tools (even if I
> think that the programs in the current mpatrol/tools should go in
> src/bin).
>
> I find that way clean (everything in src/ is source files and you
> separate library and binary in 2 subdirs). The documentation is
> manages by the autotools too (like adding a doc rule)
>
> I don't understand why you made the configuration complicated (running
> a script that copies everything, everything in strange subdirs)
>
> If you want, I can try to help you with that autotools stuff. In
> addition, I would like to point out that i am also interested in using
> mpatrol with Windows CE. I don't know if it is easy or not to compile
> it, but it would be nice to have it :) And using autotools can help a
> lot on that platform (using cegcc, when cross-compiling on linux, for
> example)
>
> thank you for your work and especially for continuing to improve
> mpatrol. It's a great tool and it must not be abandoned !
>
> Vincent Torri
>

#1139 From: "vincent.torri" <vtorri@...>
Date: Mon Oct 6, 2008 10:54 am
Subject: Re: mpatrol 1.5: can't compile it on mingw (with msys)
vincent.torri
Offline Offline
Send Email Send Email
 
--- In mpatrol@yahoogroups.com, "vincent.torri" <vtorri@...> wrote:
> my_project/
>   configure.ac
>   Makefile.am
>   doc/
>     Makefile.am
>   src/
>     Makefile.am
>     bin/
>       Makefile.am
>       file_bin.c
>       ...
>     lib/
>       Makefile.am
>       file_lib.c
>       ...
>

the spaces (which show the tree structure) do not appear in the
message (they are maybe removed when displayed in the yahoo group). I
hope they are now displayed

Vincent Torri

Messages 1139 - 1168 of 1198   Newest  |  < Newer  |  Older >  |  Oldest
Advanced
Add to My Yahoo!      XML What's This?

Copyright © 2009 Yahoo! Inc. All rights reserved.
Privacy Policy - Terms of Service - Guidelines - Help