[AGENT++] RE: memory violations

Gil Steiner gils at tsoft-tele.com
Tue Mar 23 17:24:31 CET 2004


Hi all,

I finally managed to compile the library by manually moving ALL inline
methods to the relevant cpp files, except some that have no matching cpp
files but seem to compile with no problems. I know this is a very
'unprofessional' solution but time was a critical issue here...

Unfortunately, now I'm running into an even bigger problem. I get crashes
all the time and purify indicates that the problem is in Pdu::Pdu(void).
It is repoting an SBW (Stack Bounds Write) when entering the constructor and
initializing the members.

I would really appreciate any help on this.

Regards,

+gil
 

-----Original Message-----
From: agentpp-request at agentpp.org [mailto:agentpp-request at agentpp.org] 
Sent: Tuesday, March 23, 2004 1:00 PM
To: agentpp at agentpp.org
Subject: AGENTPP Digest, Vol 2, Issue 22

Send AGENTPP mailing list submissions to
	agentpp at agentpp.org

To subscribe or unsubscribe via the World Wide Web, visit
	http://agentpp.org/mailman/listinfo/agentpp
or, via email, send a message with subject or body 'help' to
	agentpp-request at agentpp.org

You can reach the person managing the list at
	agentpp-owner at agentpp.org

When replying, please edit your Subject line so it is more specific than
"Re: Contents of AGENTPP digest..."


Today's Topics:

   1. RE: Problem compiling SNMP++ 3.2.10a on Solaris 9 w gcc	2.95
      (Gil Steiner)
   2. Re: RE: Problem compiling SNMP++ 3.2.10a on Solaris 9 w gcc
      2.95 (katz at agentpp.com)


----------------------------------------------------------------------

Message: 1
Date: Mon, 22 Mar 2004 13:11:54 +0200
From: Gil Steiner <gils at tsoft-tele.com>
Subject: [AGENT++] RE: Problem compiling SNMP++ 3.2.10a on Solaris 9 w
	gcc	2.95
To: "'agentpp at agentpp.org'" <agentpp at agentpp.org>
Message-ID: <9329E8787085D711940B00508B9A68A215B8E2 at IRIS>
Content-Type: text/plain

 
Hi again,

Thanks for the quick reply!

The OS and gcc version are in the subject: solaris 9 and gcc 2.95 I am aware
of the 'inline' issue. This usually works fine and I use it a lot but in
this case I could not link any code to the library because it always
reported these inline methods as missing. I even tried with the console
examples that are included with snmp++ I added a set_writecommunity to
snmpGet and it did not compile.
I tried to compile with -fno-inline but it did not work as well.

+gil

-----Original Message-----
From: agentpp-request at agentpp.org [mailto:agentpp-request at agentpp.org]
Sent: Monday, March 22, 2004 1:00 PM
To: agentpp at agentpp.org
Subject: AGENTPP Digest, Vol 2, Issue 21

Send AGENTPP mailing list submissions to
	agentpp at agentpp.org

To subscribe or unsubscribe via the World Wide Web, visit
	http://agentpp.org/mailman/listinfo/agentpp
or, via email, send a message with subject or body 'help' to
	agentpp-request at agentpp.org

You can reach the person managing the list at
	agentpp-owner at agentpp.org

When replying, please edit your Subject line so it is more specific than
"Re: Contents of AGENTPP digest..."


Today's Topics:

   1. Problem compiling SNMP++ 3.2.10a on Solaris 9 w gcc 2.95
      (Gil Steiner)
   2. Re: Problem compiling SNMP++ 3.2.10a on Solaris 9 w gcc 2.95
      (Jochen Katz)
   3. Hi, all! (=?gb2312?B?t+e85LLW1MI=?=)


----------------------------------------------------------------------

Message: 1
Date: Sun, 21 Mar 2004 17:46:03 +0200
From: Gil Steiner <gils at tsoft-tele.com>
Subject: [AGENT++] Problem compiling SNMP++ 3.2.10a on Solaris 9 w gcc
	2.95
To: "'agentpp at agentpp.org'" <agentpp at agentpp.org>
Message-ID: <9329E8787085D711940B00508B9A68A215B8DF at IRIS>
Content-Type: text/plain; charset="us-ascii"

Hi,
 
It seems that g++ (and gcc for that matter) 'ignores' some of the methods
that are implemented in the header files. For example, a lot of the methods
in target.h are not present in libsnmp++.a (and libsnmp++.so). This, of
course, causes link errors and I cannot use the lib.
If I move the implementation to the target.cpp file, It fixes the problem.
 
Any ideas?
 
Thanks,
+gil
-------------- next part --------------
An HTML attachment was scrubbed...
URL:
http://p15141779.pureserver.info/pipermail/agentpp/attachments/20040321/d3a5
4c34/attachment-0001.htm

------------------------------

Message: 2
Date: Sun, 21 Mar 2004 22:08:14 +0100
From: Jochen Katz <katz at agentpp.com>
Subject: Re: [AGENT++] Problem compiling SNMP++ 3.2.10a on Solaris 9 w
	gcc 2.95
To: "'agentpp at agentpp.org'" <agentpp at agentpp.org>
Message-ID: <405E043E.5030206 at 2004.joka.homelinux.org>
Content-Type: text/plain; charset=us-ascii; format=flowed

Hi,

> It seems that g++ (and gcc for that matter) 'ignores' some of the 
> methods that are implemented in the header files. For example, a lot 
> of the methods in target.h are not present in libsnmp++.a (and
> libsnmp++.so).

from my knowledge this is ok, as the methods implemented in the header are
inlined into any object file that uses these methods. So no object file
should have these methods as external unresolved symbol.

> This, of course, causes link errors and I cannot use the lib.

> Any ideas?

Did you use different compiler switches for building the lib and your code?

What OS and g++ version are you using?

Regards,
   Jochen


------------------------------

Message: 3
Date: Mon, 22 Mar 2004 10:23:12 +0800
From: =?gb2312?B?t+e85LLW1MI=?= <kenees at 263.net>
Subject: [AGENT++] Hi, all!
To: agentpp at agentpp.org
Message-ID: <20040322022312.B01C41C075 at smtp.263.net>
Content-Type: text/plain; charset="us-ascii"

An HTML attachment was scrubbed...
URL:
http://p15141779.pureserver.info/pipermail/agentpp/attachments/20040322/18c2
ecdb/attachment-0001.htm

------------------------------

_______________________________________________
AGENTPP mailing list
AGENTPP at agentpp.org
http://agentpp.org/mailman/listinfo/agentpp


End of AGENTPP Digest, Vol 2, Issue 21
**************************************


------------------------------

Message: 2
Date: Mon, 22 Mar 2004 13:48:48 +0100
From: katz at agentpp.com
Subject: Re: [AGENT++] RE: Problem compiling SNMP++ 3.2.10a on Solaris
	9 w gcc	2.95
To: Gil Steiner <gils at tsoft-tele.com>
Cc: agentpp at agentpp.org
Message-ID: <E1B5OrI-0000Fj-00 at config7.kundenserver.de>
Content-Type: text/plain; charset=iso-8859-1

Hi,

the only platform I ever saw a problem like this was on cygwin.
At first make sure that all object files and libs are removed and that no
old libs are in any system path and do a clean rebuild.
If this does not help: what happens if you use the static lib for linking
the application?

Regards,
  Jochen


Gil Steiner <gils at tsoft-tele.com> schrieb am 22.03.2004, 12:11:54:
>  
> The OS and gcc version are in the subject: solaris 9 and gcc 2.95 I am 
> aware of the 'inline' issue. This usually works fine and I use it a 
> lot but in this case I could not link any code to the library because 
> it always reported these inline methods as missing. I even tried with 
> the console examples that are included with snmp++ I added a 
> set_writecommunity to snmpGet and it did not compile.
> I tried to compile with -fno-inline but it did not work as well.


------------------------------

_______________________________________________
AGENTPP mailing list
AGENTPP at agentpp.org
http://agentpp.org/mailman/listinfo/agentpp


End of AGENTPP Digest, Vol 2, Issue 22
**************************************



More information about the AGENTPP mailing list