Strange. Seems like the message catalog doing the wrong stuff here.
--
Jarl
On Sat, Mar 29, 2008 at 11:27 PM, Axton <[EMAIL PROTECTED]> wrote:
> ** Very odd, it would appear that if the LANG env var is set, the memory
> leak happens; if the env var is not set, no leak.
>
> In the case of the memory leak:
> [EMAIL PROTECTED] /home/remedy/projects/memleak_arinit]$ locale
> LANG=en_US.UTF-8
> LC_CTYPE="en_US.UTF-8"
> LC_NUMERIC="en_US.UTF-8"
> LC_TIME="en_US.UTF-8"
> LC_COLLATE="en_US.UTF-8"
> LC_MONETARY="en_US.UTF-8"
> LC_MESSAGES="en_US.UTF-8"
> LC_ALL=
>
> In the case of no leak:
> [EMAIL PROTECTED] /home/remedy/projects/memleak_arinit]$ locale
> LANG=
> LC_CTYPE="C"
> LC_NUMERIC="C"
> LC_TIME="C"
> LC_COLLATE="C"
> LC_MONETARY="C"
> LC_MESSAGES="C"
> LC_ALL=
>
> Axton
>
>
>
> On Fri, Mar 28, 2008 at 4:05 PM, Axton <[EMAIL PROTECTED]> wrote:
>
> > Some add'l info:
> >
> > (dbx) stop in ARTermination
> > dbx: warning: 'ARTermination' has no debugger info -- will trigger on
> first instruction
> > (2) stop in ARTermination
> > (dbx) rerun
> > Running: sendrem
> > (process id 2990)
> >
> > RTC: Enabling Error Checking...
> > RTC: Running program...
> > [EMAIL PROTECTED] ([EMAIL PROTECTED]) stopped in ARTermination at 0xecdd6968
> > 0xecdd6968: ARTermination : save %sp, -120, %sp
> > Current function is main
> > 31 rtn = ARTermination (&control, &status);
> > (dbx) showleaks
> >
> > Checking for memory leaks...
> >
> > Actual leaks report (actual leaks: 1 total size: 154
> bytes)
> >
> > Total Num of Leaked Allocation call stack
> > Size Blocks Block
> > Address
> > ========== ====== =========== =======================================
> > 154 1 0x40388 UNIXInitialization < _pthread_once <
> DoARInitialization < ARInitialization < main
> >
> >
> >
> > Possible leaks report (possible leaks: 0 total size: 0
> bytes)
> >
> >
> > (dbx) print (char *)0x40388
> > (char *) 0x40388 = 0x40388
> "NLSPATH=/a/b/c/usr/SUNWspro/bin/../prod/bin/sparcv9/../../lib/locale/en_US.UTF-8/LC_MESSAGES/%N.cat:/usr/lib/locale//LC_MESSAGES/N"
> > (dbx) exit
> > [EMAIL PROTECTED] scratch]$ env |grep NLSPATH
> >
> >
> >
> >
> >
> >
> > On Fri, Mar 28, 2008 at 1:41 PM, Axton <[EMAIL PROTECTED]> wrote:
> >
> > > A very simple program (does nothing, really, except create an arcontrol
> struct):
> > >
> > > [EMAIL PROTECTED] scratch]$ cat sendrem.c
> > > #include <string.h>
> > > #include <ar.h>
> > > #include <arextern.h>
> > > #include <arfree.h>
> > >
> > > int main
> > > (
> > > int argc,
> > > char *argv[]
> > > )
> > > {
> > > ARControlStruct control;
> > > ARFieldValueList fieldList;
> > > AREntryIdType entryId;
> > > ARStatusList status;
> > > int rtn;
> > >
> > > control.cacheId = 0;
> > > control.sessionId = 0;
> > > strncpy (control.server, "remedy", AR_MAX_SERVER_SIZE);
> > > strncpy (control.user, "Demo", sizeof(ARAccessNameType) - 1);
> > > strncpy (control.password, "", sizeof(ARPasswordType) - 1);
> > > strncpy (control.authString, "", AR_MAX_AUTH_SIZE);
> > > strcpy (control.localeInfo.locale, "");
> > > strcpy (control.localeInfo.charSet, "");
> > > strcpy (control.localeInfo.timeZone, "");
> > > strcpy (control.localeInfo.customDateFormat, "");
> > > strcpy (control.localeInfo.customTimeFormat, "");
> > > strcpy (control.localeInfo.separators, "");
> > >
> > > rtn = ARInitialization (&control, &status);
> > > FreeARStatusList(&status, FALSE);
> > >
> > > rtn = ARTermination (&control, &status);
> > > FreeARStatusList(&status, FALSE);
> > >
> > > return 0;
> > > }
> > >
> > >
> > >
> > > [EMAIL PROTECTED] scratch]$ cat Makefile
> > > #
> > > # parameters
> > >
> > > PROGRAM = sendrem
> > > SOURCES = sendrem.c
> > > OBJECTS = sendrem.o
> > > RM = /usr/bin/rm -f
> > >
> > > #
> > > # compiler flags
> > >
> > > CC = /a/b/c/usr/SUNWspro/bin/cc
> > > CXX = /a/b/c/usr/SUNWspro/bin/CC
> > > CFLAGS = -D_REENTRANT -g -DDEBUG -v -Xc -xc99=none -features=extinl
> > > CPPFLAGS = -I../../../lib/arapi-solaris-701/include -m32
> > > LDFLAGS = -L../../../lib/arapi-solaris-701/lib
> > > LDLIBS = -lar -Bdynamic -lnsl -lw -lpthread -ldl
> > >
> > > #
> > > # standard targets
> > >
> > > all: $(OBJECTS)
> > > $(CXX) -o $(PROGRAM) $(OBJECTS) $(LDFLAGS) $(LDLIBS)
> > >
> > > clean:
> > > $(RM) $(PROGRAM) $(OBJECTS) core
> > >
> > >
> > >
> > >
> > > Compiles clean:
> > >
> > > [EMAIL PROTECTED] scratch]$ make clean
> > > /usr/bin/rm -f sendrem sendrem.o core
> > > [EMAIL PROTECTED] scratch]$ make
> > > /a/b/c/usr/SUNWspro/bin/cc -D_REENTRANT -g -DDEBUG -v -Xc -xc99=none
> -features=extinl -I../../../lib/arapi-solaris-701/include -m32 -c -o
> sendrem.o sendrem.c
> > > /a/b/c/usr/SUNWspro/bin/CC -o sendrem sendrem.o
> -L../../../lib/arapi-solaris-701/lib -lar -Bdynamic -lnsl -lw -lpthread -ldl
> > >
> > >
> > >
> > > dbx shows a memory leak in ARInitialization:
> > >
> > > [EMAIL PROTECTED] scratch]$ dbx sendrem
> > > For information about new features see `help changes'
> > > To remove this message, put `dbxenv suppress_startup_message 7.6' in
> your .dbxrc
> > > Reading sendrem
> > > Reading ld.so.1
> > > Reading libumem.so.1
> > > Reading libar.so
> > > Reading libnsl.so.1
> > > Reading libw.so.1
> > > Reading libpthread.so.1
> > > Reading libdl.so.1
> > > Reading libCrun.so.1
> > > Reading libm.so.1
> > > Reading libc.so.1
> > > Reading libicuucbmc.so.32
> > > Reading libicui18nbmc.so.32
> > > Reading libicudatabmc.so.32
> > > Reading libmp.so.2
> > > Reading libCstd.so.1
> > > Reading libc_psr.so.1
> > > Reading libthread.so.1
> > > Reading libCstd_isa.so.1
> > > (dbx) check -leaks
> > > leaks checking - ON
> > > (dbx) run
> > > Running: sendrem
> > > (process id 26476)
> > > Reading rtcapihook.so
> > > Reading rtcaudit.so
> > > Reading libmapmalloc.so.1
> > > Reading libgen.so.1
> > > Reading rtcboot.so
> > > Reading librtc.so
> > > RTC: Enabling Error Checking...
> > > RTC: Running program...
> > > Reading en_US.UTF-8.so.2
> > > Reading methods_unicode.so.2
> > > Checking for memory leaks...
> > >
> > > Actual leaks report (actual leaks: 1 total size:
> 154 bytes)
> > >
> > > Total Num of Leaked Allocation call stack
> > > Size Blocks Block
> > > Address
> > > ========== ====== =========== =======================================
> > > 154 1 0x40450 UNIXInitialization < _pthread_once <
> DoARInitialization < ARInitialization < main
> > >
> > >
> > > Possible leaks report (possible leaks: 0 total size:
> 0 bytes)
> > >
> > >
> > >
> > > execution completed, exit code is 0
> > >
> > >
> > >
> > >
> > >
> > > ARServer is non-existent. Same leak shown with both 7.0.1p6 and 7.1p1 c
> api.
> > >
> > > Some special env vars are set:
> > > LD_PRELOAD=libumem.so.1
> > > UMEM_DEBUG=default
> > > UMEM_LOGGING=transaction
> > >
> > > Any insight would be appreciated.
> > >
> > > OS: SunOS 5.9 Generic_122300-13 sun4u sparc SUNW,Sun-Fire-480R
> > >
> > > Thanks,
> > > Axton Grams
> > >
> >
> >
>
> __Platinum Sponsor: www.rmsportal.com ARSlist: "Where the Answers Are"
> html___
_______________________________________________________________________________
UNSUBSCRIBE or access ARSlist Archives at www.arslist.org
Platinum Sponsor: www.rmsportal.com ARSlist: "Where the Answers Are"