newLISP Fan Club

Forum => newLISP in the real world => Topic started by: newdep on December 28, 2005, 12:34:10 PM

Title: *** glibc detected *** double free or corruption (!prev): 0x
Post by: newdep on December 28, 2005, 12:34:10 PM
Hi Lutz,



Running newlisp 8.7.5 slackware 10.2 on 32 BITS !! ;-)

(compiled with ncurses and readline)



I got the following error (running my rss-ticker2.lsp, not on my page) ->



*** glibc detected *** double free or corruption (!prev): 0x08099300 ***

Aborted

$





Here is the ldd output of newlisp ->



$ldd /usr/bin/newlisp

        libm.so.6 => /lib/libm.so.6 (0x4002d000)

        libdl.so.2 => /lib/libdl.so.2 (0x40051000)

        libreadline.so.4 => /usr/lib/libreadline.so.4 (0x40055000)

        libncurses.so.5 => /lib/libncurses.so.5 (0x40081000)

        libc.so.6 => /lib/libc.so.6 (0x400c0000)

        /lib/ld-linux.so.2 (0x40000000)

        libgpm.so.1 => /lib/libgpm.so.1 (0x401d9000)





Any idea what that could be ?





PS: See the AMD64 posting, there I had the problem too...





Regards, Norman.
Title:
Post by: newdep on December 28, 2005, 12:37:29 PM
Here is the code: It happes thus once every??? xx days?? I dunnoo ;-)





--- code ---



#!/usr/bin/newlisp

;;

;; RSS Ticker v1.0 (c) Norman 2004

;;

;; Displays RSS Feed titels in your terminal screen

;; by using tput codes.

;;

;; Linux terminal version with ANSI and tput required

;;

;;

;; Usage:  "rss-ticker &"

;;

;;

;; enjoy... Norman 2004

;;



(set 'uri '(

"http://nodep.nl/index.html"

"http://www.rebol.net/blog/carl-rss.xml"

"http://www.alh.net/newlisp/phpbb/rss.php"

"http://lambda-the-ultimate.org/node/feed"

"http://nu.nl/deeplink_rss2/index.jsp?r=Internet"

"http://www.planet.nl/rss/pmm.xml"

"http://www.wi-fiplanet.com/icom_includes/feeds/80211/xml_front-news-10.xml"

"http://www.internetnews.com/icom_includes/feeds/inews/xml_front-10.xml"

"http://www.trouw.nl/rss/"

))





(define red     "27[0;31m")

(define green   "27[0;32m")

(define yellow  "27[0;33m")

(define blue    "27[0;34m")

(define magenta "27[0;35m")

(define cyan    "27[0;36m")

(define white   "27[0;37m")

(define default "27[0;0m" )

(define (cls)   (println "27[H27[2J"))



(until (net-error)



(dolist (u uri)



        (set 'url u )

        ;;

        ;; DE-XML

        ;;

        (xml-type-tags nil 'cdata '!-- nil)

        (set 'url (get-url url 120000))

        (set 'url (xml-parse url (+ 1 2 8 16)))



        (if url

        (begin

        ;;

        ;; strippp <!-- comments from top...

        ;;

        (until (= (first (nth 0 url)) 'rss ) (pop url))

        (set 'rsschannel (nth 2 (nth 0 url)))

        (set 'rsschannellen (length rsschannel))



        ;;

        ;; Seeking for ITEMS in CHANNEL

        ;;

        (cls)

        (println "n" white (dup "*" 120 ))

        (println blue "** " green "RSS -> " red (upper-case u) green " <- RSS")

        (println white (dup "*" 120 ))

        (dotimes (y rsschannellen)

         (if (list? (nth y rsschannel))

          (if (= (nth 0 (nth y rsschannel)) 'item )

           (begin

             (sleep 200)

               (println blue "** [ " white (lookup 'title rsschannel) blue " ] ** " yellow (lookup 'title (nth y rsschannel)) default )

        ))))

        (println white (dup "*" 120 ))

        (sleep 30000)

)



        ;; error reading url

        (begin

         (cls)

         (println "n" white (dup "*" 120 ))

         (println red "** " white "ERR -> " red (upper-case u) white " <- ERR")

         (println white (dup "*" 120 ))

         (sleep 2000)

        )



))

)



(println default)

(exit)
Title:
Post by: newdep on December 28, 2005, 01:01:57 PM
It just happened again,

*** glibc detected *** double free or corruption (!prev): 0x080989f0 ***



Could it be parsing XML data perhpas?



Norman.
Title:
Post by: newdep on December 28, 2005, 01:21:20 PM
I think I found it !!

> (setq data (get-url "http://www.trouw.nl/rss/"))

*** glibc detected *** double free or corruption (!prev): 0x080b1360 ***

Aborted

[nodep@zeep]~$





That webpage is in a wrong XML format but more intresing it that it contains

HIGH-ASCII characters.. Is that perhpas causing the problem?  Here the out put from newlisp grabbing that page ->





[text]<?xml version="1.0" encoding="UTF-8"?>

<rss version="2.0">

                <channel>

                        <title><![CDATA[Trouw | Voorpagina]]></title>

                        <link>http://www.trouw.nl/rss/</link>

                        <language>nl-nl</language>

                        <copyright>Copyright: Trouw</copyright>

                        <image>

                        <title>Trouw</title>

                        <url>http://www.trouw.nl/trouw.nl/images/trouw_klein.gif</url>

                        <link>http://www.trouw.nl/</link>

                        </image>

                        <item>

        <title>

                <![CDATA[Schapen in de sneeuw ]]>

        </title>

        <link>

                http://www.trouw.nl/hetnieuws/nederland/article117778.ece/Schapen+in+de+sneeuw+</link>

        <description>

                <![CDATA[De schapen met hun dikke vacht hebben geen last van de kou. Gewillig poseren  ze in dit Hollandse winterlandschap

in de buurt van Kwadijk, Noord-Holland,  voor de Trouw-fotograaf. Vooral in de noordelijke provincies Friesland en Groningen vielen gister

n flinke sneeuwbuien. Naar verwachting zal het vandaag in het  noorden en zuidoosten van het land hier en daar nog licht sneeuwen. De temp

ratuur schommelt overal rond de nul graden Celsius.]]>

        </description>

</item>

<item>

        <title>

                <![CDATA[Hereniging moet soepeler ]]>

        </title>

        <link>

                http://www.trouw.nl/hetnieuws/nederland/article117772.ece/Hereniging+moet+soepeler+</link>

        <description>

                <![CDATA[Nederland is te streng inzake gezinshereniging van immigranten. Daardoor verblijven kinderen ten onrechte in het

uitenland, terwijl ze volgens een Europese richtlijn over mogen komen.]]>

        </description>

</item>

<item>

        <title>

                <![CDATA[Europa bouwt in de ruimte zijn eigen navigatiesysteem  ]]>

        </title>

        <link>

                http://www.trouw.nl/hetnieuws/economie/article117773.ece/Europa+bouwt+in+de+ruimte+zijn+eigen+navigatiesysteem++</link>

        <description>

                <![CDATA[Koersende schippers en dolende automobilisten zijn straks niet meer afhankelijk van het Amerikaanse GPS-systeem.

uropa lanceert vandaag de eerste satelliet van zijn eigen navigatiesysteem. Galileo Dutch Space, leverancier van de zonnepanelen, is het e

ige Nederlandse bedrijf dat een relatief groot aandeel heeft in het project. De onderneming hoopt op meer Galileo-orders.   ]]>

        </description>

</item>

<item>

        <title>

                <![CDATA[Vooral huwelijk zet rem op criminele loopbaan ]]>

        </title>

        <link>

                http://www.trouw.nl/hetnieuws/nederland/article117767.ece/Vooral+huwelijk+zet+rem+op+criminele+loopbaan+</link>

        <description>

                <![CDATA[Gevangenisstraf is meestal niet de reden dat een crimineel zijn criminele carri&egrave;re afbreekt. Veel sneller

ordt de loopbaan beëindigd als de misdadiger trouwt.]]>

        </description>

</item>

<item>

        <title>

                <![CDATA[Duitse glorie ging naar Thailand ]]>

        </title>

        <link>

                http://www.trouw.nl/hetnieuws/europa/article117768.ece/Duitse+glorie+ging+naar+Thailand+</link>

        <description>

                <![CDATA[Het leven van Rita Düben is nauw verweven met de Grohe-fabriek in Herzberg. ]]>

        </description>

</item>

<item>

        <title>

                <![CDATA[Ramp heeft vredesregeling Sri Lanka niet dichterbij gebracht ]]>

        </title>

        <link>

                http://www.trouw.nl/hetnieuws/wereld/article117769.ece/Ramp+heeft+vredesregeling+Sri+Lanka+niet+dichterbij+gebracht+</link

        <description>

                <![CDATA[De eerste opvang van tsunami-slachtoffers is redelijk geslaagd in Sri Lanka. Maar dat is voorlopig het enige lich

punt. De wederopbouw verloopt moeizaam en de burgeroorlog dreigt opnieuw op te laaien.]]>

        </description>

</item>

<item>

        <title>

                <![CDATA[Miljardensoap rond computertje lijkt voorlopig niet ten einde ]]>

        </title>

        <link>

                http://www.trouw.nl/hetnieuws/economie/article117771.ece/Miljardensoap+rond+computertje+lijkt+voorlopig+niet+ten+einde+</l

nk>

        <description>

                <![CDATA[Hoe vaak kun je dom zijn en je bedrijf op het spel zetten, en toch als winnaar uit de bus komen? Het antwoord kom

 wellicht van de maker van de Blackberry, een gewild hebbeding voor managers.]]>

        </description>

</item>

<item>

        <title>

                <![CDATA[Schaatsen / Uytdehaage incasseert mokerslag ]]>

        </title>

        <link>

                http://www.trouw.nl/hetnieuws/sport/article117774.ece/Schaatsen+%2F+Uytdehaage+incasseert+mokerslag+</link>

        <description>

                <![CDATA[Jochem Uytdehaage en Gianni Romme waren de prominentste slachtoffers bij de jacht op startbewijzen voor de Winter

pelen. De olympisch kampioenen van weleer faalden op de vijf kilometer. ]]>

        </description>

</item>

<item>

        <title>

                <![CDATA[Politiek Den Haag maakt van de missie naar Afghanistan een regelrechte klucht ]]>

        </title>

        <link>

                http://www.trouw.nl/deverdieping/dossiers/article117770.ece/Politiek+Den+Haag+maakt+van+de+missie+naar+Afghanistan+een+reg

lrechte+klucht+</link>

        <description>

                <![CDATA[Het is niet meer dan logisch dat zowel het kabinet als het parlement bevangen zijn door twijfel over een mogelijk

nieuwe en gevaarlijker militaire missie in Afghanistan. De vraag is immers of we in staat zijn daar een wezenlijke bijdrage te leveren aan

de opbouw van het land. Maar de vraag is ook of we met een &rsquo;nee&rsquo; de Afghanen en de Navo-bondgenoten in de steek laten; ook al

lijft het aanbod van kracht dat we bereid blijven de &rsquo;oude&rsquo;  missie te continueren. ]]>

        </description>

</item>

<item>

        <title>

                <![CDATA[Marijnissen wil dat Bos voor hem kiest ]]>

        </title>

        <link>

                http://www.trouw.nl/deverdieping/overigeartikelen/article117756.ece/Marijnissen+wil+dat+Bos+voor+hem+kiest+</link>

        <description>

                <![CDATA[De kans is aanwezig dat links na de volgende verkiezingen voor de Tweede Kamer een absolute meerderheid verwerft.

Maar zullen PvdA, SP en GroenLinks dan echt samen gaan regeren? Jan Marijnissen (SP) vertelt waarom hij wil dat Wouter Bos (PvdA) voor hem

kiest. ]]>

        </description>

</item>

<item>        <title>

                <![CDATA[Veertig jaar gespannen dialoog ]]>

        </title>

        <link>

                http://www.trouw.nl/deverdieping/religie_filosofie/article117754.ece/Veertig+jaar+gespannen+dialoog+</link>

        <description>

                <![CDATA[In 1965 zocht de rooms-katholieke kerk met het document &rsquo;Nostra aetate&rsquo; voor het eerst serieuze toena

ering tot het jodendom. Dit jaar stond Rome daar uitgebreid bij stil. Hoe staat het met de grote verzoening? Twee Nederlandse deskundigen,

een joodse en een katholieke gaan in dialoog.]]>

        </description>

</item>

<item>

        <title>

                <![CDATA[Accra-verklaring / Wij mogen onze mond niet houden ]]>

        </title>

        <link>

                http://www.trouw.nl/deverdieping/podium/article117752.ece/Accra-verklaring+%2F+Wij+mogen+onze+mond+niet+houden+</link>

        <description>

                <![CDATA[Toegegeven, de Accra-verklaring die de synode van de PKN heeft overgenomen, bevat zwakke punten. Maar  de kern be

elst vragen die ieder aangaan.]]>

        </description>

</item>

<item>

        <title>

                <![CDATA[Schouten / Geronseld  voor de djihad? ]]>

        </title>

        <link>

                http://www.trouw.nl/deverdieping/dossiers/article117757.ece/Schouten+%2F+Geronseld++voor+de+djihad%3F+</link>

        <description>

                <![CDATA[Bij binnenkomst zag ik het al liggen, gebonden maar liefst en naast de leunstoel, een teken dat het er niet allee

 voor de show lag maar dat het ook gelezen werd. ]]>

        </description>

</item>

<item>

        <title>

                <![CDATA[Student van het jaar  Murat Ersoy wil met zijn  Turkse studentenvereniging de integratie bevorderen.]]>

        </title>

        <link>

                http://www.trouw.nl/degids/gidsartikelen/article117758.ece/Student+van+het+jaar++Murat+Ersoy+wil+met+zijn++Turkse+studente

vereniging+de+integratie+bevorderen.</link>

        <description>

                <![CDATA[Bij de verkiezing van de student van het jaar 2005 is bewust voor een allochtone student gekozen, door webzine Sc

enceGuide samen met de landelijke studentenbonden. &bdquo;Omdat de meest genoemde studenten van het jaar Samir A. en Mohammed B. zijn, en

ij iemand willen bekronen die staat voor al die duizenden allochtone studenten die zich maatschappelijk en in hun studie voluit inzetten",

aldus het webzine.]]>

        </description>

</item>

<item>

        <title>

                <![CDATA[De Ludwig. Bij elke verhuizing stond ik weer in dubio. En dan nam ik hem maar weer mee. ]]>

        </title>

        <link>

                http://www.trouw.nl/deverdieping/dossiers/article117759.ece/De+Ludwig.+Bij+elke+verhuizing+stond+ik+weer+in+dubio.+En+dan+

am+ik+hem+maar+weer+mee.+</link>

        <description>

                <![CDATA[Toen ik 13 was kocht ik een drumstel. Al mijn broers, vier stuks, speelden gitaar, maar ik had er geen aanleg voo

. Voor drummen ook niet, maar het leek me leuk. Een erg praktische keuze was het niet. Je bent één van vijf kinderen, je woont in een ri

tjeshuis en je kiest als instrument de drums. Toen een van mijn gitaarspelende broers van instrument wilde veranderen en interesse voor he

 slagwerk toonde, stuurden mijn ouders hem diplomatiek richting de klarinet. En kochten er meteen een demper bij.]]>

        </description>

</item>

</channel>

        </rss>

ñ[/text]
Title:
Post by: newdep on December 28, 2005, 01:32:11 PM
<?xml version="1.0" encoding="UTF-8"?>  is inside, but that/HIGH-ASCII

should not interfer with get-url or any other string parsing? should it?
Title:
Post by: Lutz on December 28, 2005, 02:12:12 PM
'get-url' should be fine for high-ASCII, i.e. you could do:

(write-file "a.tgz" (get-url "http://newlisp.org/downloads/newlisp-8.7.1.tgz"))


for downloading.



what other operation are yoou using on the data?



Lutz
Title:
Post by: newdep on December 28, 2005, 10:35:25 PM
Yes i thought that too I never had troubles with binary data befor so thats

not it i guess.



I do a xml-parse and a list? (see above is my code).





But as you can see a simple 'get-url on that web-page does crash too!

It looks like its inside the 'get-url function.



Regards, Norman.
Title:
Post by: Lutz on December 29, 2005, 05:41:19 AM
I did and xml-parse on some of the snippets containing >127 ASCII without a problem. UTF-8 characters can have that.



Perhaps you can save the offending piece of data to a file and reproduce the problem to just a few statements b y eliminating as much as possible code from your program. Else it is impossible to debug this.



Lutz
Title:
Post by: newdep on December 29, 2005, 05:44:42 AM
I did save the data and ill check it tonight whem im back at home..

Ill let you know...
Title:
Post by: newdep on December 30, 2005, 04:56:53 AM
Im unable to duplicate the problem with the data above... Strange issue ? ;-)
Title:
Post by: newdep on January 05, 2006, 12:33:32 AM
It happened again, this time for the "http://www.newlisp.org/rss.cgi?News"



*** glibc detected *** double free or corruption (!prev): 0x08095418 ***



I realy cant figure it out...But im 100% sure its the  'get-url function where/when it goes wrong...But the problem could remain somewhere in the

combination of getting an url and buffering perhpas..



Norman.



newLISP v.8.7.6 on linux, execute 'newlisp -h' for more info.



> (setq url (get-url "http://www.newlisp.org/rss.cgi?News"))

Segmentation fault



> (setq url (get-url "http://www.newlisp.org/rss.cgi?News"))

Segmentation fault



> (setq url (get-url "http://www.newlisp.org/rss.cgi?News"))

Segmentation fault





here an strace output perhpas it helps?



execve("/usr/bin/newlisp", ["newlisp"], [/* 36 vars */]) = 0

uname({sys="Linux", node="zeep", ...})  = 0

brk(0)                                  = 0x8071cec

access("/etc/ld.so.preload", R_OK)      = -1 ENOENT (No such file or directory)

open("/usr/X11R6/lib/tls/i686/sse2/libm.so.6", O_RDONLY) = -1 ENOENT (No such file or directory)

stat64("/usr/X11R6/lib/tls/i686/sse2", 0xbfffeea0) = -1 ENOENT (No such file or directory)

open("/usr/X11R6/lib/tls/i686/libm.so.6", O_RDONLY) = -1 ENOENT (No such file or directory)

stat64("/usr/X11R6/lib/tls/i686", 0xbfffeea0) = -1 ENOENT (No such file or directory)

open("/usr/X11R6/lib/tls/sse2/libm.so.6", O_RDONLY) = -1 ENOENT (No such file or directory)

stat64("/usr/X11R6/lib/tls/sse2", 0xbfffeea0) = -1 ENOENT (No such file or directory)

open("/usr/X11R6/lib/tls/libm.so.6", O_RDONLY) = -1 ENOENT (No such file or directory)

stat64("/usr/X11R6/lib/tls", 0xbfffeea0) = -1 ENOENT (No such file or directory)

open("/usr/X11R6/lib/i686/sse2/libm.so.6", O_RDONLY) = -1 ENOENT (No such file or directory)

stat64("/usr/X11R6/lib/i686/sse2", 0xbfffeea0) = -1 ENOENT (No such file or directory)

open("/usr/X11R6/lib/i686/libm.so.6", O_RDONLY) = -1 ENOENT (No such file or directory)

stat64("/usr/X11R6/lib/i686", 0xbfffeea0) = -1 ENOENT (No such file or directory)

open("/usr/X11R6/lib/sse2/libm.so.6", O_RDONLY) = -1 ENOENT (No such file or directory)

stat64("/usr/X11R6/lib/sse2", 0xbfffeea0) = -1 ENOENT (No such file or directory)

open("/usr/X11R6/lib/libm.so.6", O_RDONLY) = -1 ENOENT (No such file or directory)

stat64("/usr/X11R6/lib", {st_mode=S_IFDIR|0755, st_size=8192, ...}) = 0

open("/etc/ld.so.cache", O_RDONLY)      = 3

fstat64(3, {st_mode=S_IFREG|0644, st_size=87458, ...}) = 0

mmap2(NULL, 87458, PROT_READ, MAP_PRIVATE, 3, 0) = 0x40017000

close(3)                                = 0

open("/lib/libm.so.6", O_RDONLY)        = 3

read(3, "177ELF111331P300"..., 512) = 512

fstat64(3, {st_mode=S_IFREG|0755, st_size=176353, ...}) = 0

mmap2(NULL, 139424, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x4002d000

mmap2(0x4004e000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x20) = 0x4004e000

close(3)                                = 0

open("/usr/X11R6/lib/libdl.so.2", O_RDONLY) = -1 ENOENT (No such file or directory)

open("/lib/libdl.so.2", O_RDONLY)       = 3

read(3, "177ELF111331300v"..., 512) = 512

fstat64(3, {st_mode=S_IFREG|0755, st_size=13126, ...}) = 0

mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x40050000

mmap2(NULL, 12392, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x40051000

mmap2(0x40053000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1) = 0x40053000

close(3)                                = 0

open("/usr/X11R6/lib/libreadline.so.4", O_RDONLY) = -1 ENOENT (No such file or directory)

open("/usr/lib/libreadline.so.4", O_RDONLY) = 3

read(3, "177ELF111331240257"..., 512) = 512

fstat64(3, {st_mode=S_IFREG|0755, st_size=208620, ...}) = 0

mmap2(NULL, 179444, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x40055000

mmap2(0x4007c000, 16384, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x26) = 0x4007c000

mmap2(0x40080000, 3316, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x40080000

mprotect(0xbffff000, 4096, PROT_READ|PROT_WRITE|PROT_EXEC|0x1000000) = -1 EINVAL (Invalid argument)

mprotect(0xbfff8000, 32768, PROT_READ|PROT_WRITE|PROT_EXEC) = -1 ENOMEM (Cannot allocate memory)

mprotect(0xbfffc000, 16384, PROT_READ|PROT_WRITE|PROT_EXEC) = -1 ENOMEM (Cannot allocate memory)

mprotect(0xbfffe000, 8192, PROT_READ|PROT_WRITE|PROT_EXEC) = 0

mprotect(0xbfffc000, 8192, PROT_READ|PROT_WRITE|PROT_EXEC) = -1 ENOMEM (Cannot allocate memory)

mprotect(0xbfffd000, 4096, PROT_READ|PROT_WRITE|PROT_EXEC) = -1 ENOMEM (Cannot allocate memory)

close(3)                                = 0

open("/usr/X11R6/lib/libncurses.so.5", O_RDONLY) = -1 ENOENT (No such file or directory)

open("/lib/libncurses.so.5", O_RDONLY)  = 3

read(3, "177ELF111331340342"..., 512) = 512

fstat64(3, {st_mode=S_IFREG|0755, st_size=253600, ...}) = 0

mmap2(NULL, 256236, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x40081000

mmap2(0x400b7000, 36864, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x35) = 0x400b7000

close(3)                                = 0

open("/usr/X11R6/lib/libc.so.6", O_RDONLY) = -1 ENOENT (No such file or directory)

open("/lib/libc.so.6", O_RDONLY)        = 3

read(3, "177ELF11133120U100"..., 512) = 512

fstat64(3, {st_mode=S_IFREG|0755, st_size=1340373, ...}) = 0

mmap2(NULL, 1150196, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x400c0000

mmap2(0x401d3000, 16384, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x112) = 0x401d3000

mmap2(0x401d7000, 7412, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x401d7000

close(3)                                = 0

open("/usr/X11R6/lib/libgpm.so.1", O_RDONLY) = -1 ENOENT (No such file or directory)

open("/lib/libgpm.so.1", O_RDONLY)      = 3

read(3, "177ELF111331 3200"..., 512) = 512

fstat64(3, {st_mode=S_IFREG|0755, st_size=19284, ...}) = 0

mmap2(NULL, 22920, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x401d9000

mmap2(0x401de000, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x4) = 0x401de000

close(3)                                = 0

mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x401df000

mprotect(0x401d3000, 4096, PROT_READ)   = 0

munmap(0x40017000, 87458)               = 0

brk(0)                                  = 0x8071cec

brk(0x8092cec)                          = 0x8092cec

brk(0x8093000)                          = 0x8093000

rt_sigaction(SIGINT, {0x804a330, [INT], SA_RESTORER|SA_RESTART, 0x400e8cb8}, {SIG_DFL}, 8) = 0

rt_sigaction(SIGALRM, {0x804a330, [ALRM], SA_RESTORER|SA_RESTART, 0x400e8cb8}, {SIG_DFL}, 8) = 0

rt_sigaction(SIGVTALRM, {0x804a330, [VTALRM], SA_RESTORER|SA_RESTART, 0x400e8cb8}, {SIG_DFL}, 8) = 0

rt_sigaction(SIGPROF, {0x804a330, [PROF], SA_RESTORER|SA_RESTART, 0x400e8cb8}, {SIG_DFL}, 8) = 0

rt_sigaction(SIGPIPE, {0x804a330, [PIPE], SA_RESTORER|SA_RESTART, 0x400e8cb8}, {SIG_DFL}, 8) = 0

rt_sigaction(SIGCHLD, {0x804a330, [CHLD], SA_RESTORER|SA_RESTART, 0x400e8cb8}, {SIG_DFL}, 8) = 0

open("/usr/share/newlisp/init.lsp", O_RDONLY) = -1 ENOENT (No such file or directory)

ioctl(0, SNDCTL_TMR_TIMEBASE or TCGETS, {B38400 opost isig icanon echo ...}) = 0

fstat64(1, {st_mode=S_IFCHR|0720, st_rdev=makedev(136, 3), ...}) = 0

mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x40017000

write(1, "newLISP v.8.7.6 on linux, execut"..., 62) = 62

write(1, "n", 1)                       = 1

rt_sigaction(SIGINT, {0x804a330, [INT], SA_RESTORER|SA_RESTART, 0x400e8cb8}, {0x804a330, [INT], SA_RESTORER|SA_RESTART, 0x400e8cb8}, 8) = 0

rt_sigaction(SIGALRM, {0x804a330, [ALRM], SA_RESTORER|SA_RESTART, 0x400e8cb8}, {0x804a330, [ALRM], SA_RESTORER|SA_RESTART, 0x400e8cb8}, 8) = 0

rt_sigaction(SIGVTALRM, {0x804a330, [VTALRM], SA_RESTORER|SA_RESTART, 0x400e8cb8}, {0x804a330, [VTALRM], SA_RESTORER|SA_RESTART, 0x400e8cb8}, 8) = 0

rt_sigaction(SIGPROF, {0x804a330, [PROF], SA_RESTORER|SA_RESTART, 0x400e8cb8}, {0x804a330, [PROF], SA_RESTORER|SA_RESTART, 0x400e8cb8}, 8) = 0

rt_sigaction(SIGPIPE, {0x804a330, [PIPE], SA_RESTORER|SA_RESTART, 0x400e8cb8}, {0x804a330, [PIPE], SA_RESTORER|SA_RESTART, 0x400e8cb8}, 8) = 0

rt_sigaction(SIGCHLD, {0x804a330, [CHLD], SA_RESTORER|SA_RESTART, 0x400e8cb8}, {0x804a330, [CHLD], SA_RESTORER|SA_RESTART, 0x400e8cb8}, 8) = 0

ioctl(1, SNDCTL_TMR_TIMEBASE or TCGETS, {B38400 opost isig icanon echo ...}) = 0

access("/home/nodep/.terminfo/x/xterm", R_OK) = -1 ENOENT (No such file or directory)

access("/usr/share/terminfo/x/xterm", R_OK) = 0

open("/usr/share/terminfo/x/xterm", O_RDONLY) = 3

read(3, "321343517i12304", 12) = 12

read(3, "xterm|X11 terminal emulator", 28) = 28

read(3, "1111111"..., 29) = 29

read(3, "", 1)                        = 1

read(3, "P1030377377377377377377377377377377377"..., 30) = 30

read(3, "46103136&*.3773779JLP"..., 722) = 722

read(3, "33[Z7r33[%i%p1%d;%p2%dr33[3g33["..., 1176) = 1176

read(3, "", 10)                         = 0

close(3)                                = 0

ioctl(1, SNDCTL_TMR_TIMEBASE or TCGETS, {B38400 opost isig icanon echo ...}) = 0

ioctl(1, SNDCTL_TMR_TIMEBASE or TCGETS, {B38400 opost isig icanon echo ...}) = 0

ioctl(1, SNDCTL_TMR_TIMEBASE or TCGETS, {B38400 opost isig icanon echo ...}) = 0

ioctl(1, TIOCGWINSZ, {ws_row=43, ws_col=132, ws_xpixel=1192, ws_ypixel=649}) = 0

ioctl(0, TIOCGWINSZ, {ws_row=43, ws_col=132, ws_xpixel=1192, ws_ypixel=649}) = 0

ioctl(0, TIOCGWINSZ, {ws_row=43, ws_col=132, ws_xpixel=1192, ws_ypixel=649}) = 0

ioctl(0, TIOCSWINSZ, {ws_row=43, ws_col=132, ws_xpixel=1192, ws_ypixel=649}) = 0

ioctl(0, SNDCTL_TMR_TIMEBASE or TCGETS, {B38400 opost isig icanon echo ...}) = 0

open("/usr/lib/locale/locale-archive", O_RDONLY|O_LARGEFILE) = -1 ENOENT (No such file or directory)

open("/usr/share/locale/locale.alias", O_RDONLY) = 3

fstat64(3, {st_mode=S_IFREG|0644, st_size=2586, ...}) = 0

mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x40018000

read(3, "# Locale name alias data base.n#"..., 4096) = 2586

read(3, "", 4096)                       = 0

close(3)                                = 0

munmap(0x40018000, 4096)                = 0

open("/usr/lib/locale/en_US/LC_CTYPE", O_RDONLY) = 3

fstat64(3, {st_mode=S_IFREG|0644, st_size=178476, ...}) = 0

mmap2(NULL, 178476, PROT_READ, MAP_PRIVATE, 3, 0) = 0x401e0000

close(3)                                = 0

stat64("/etc/inputrc", {st_mode=S_IFREG|0644, st_size=690, ...}) = 0

open("/etc/inputrc", O_RDONLY)          = 3

read(3, "# /etc/inputrcn# This file confi"..., 690) = 690

close(3)                                = 0

brk(0x80b4000)                          = 0x80b4000

rt_sigprocmask(SIG_BLOCK, [INT], [], 8) = 0

ioctl(0, TIOCGWINSZ, {ws_row=43, ws_col=132, ws_xpixel=1192, ws_ypixel=649}) = 0

ioctl(0, TIOCSWINSZ, {ws_row=43, ws_col=132, ws_xpixel=1192, ws_ypixel=649}) = 0

ioctl(0, SNDCTL_TMR_TIMEBASE or TCGETS, {B38400 opost isig icanon echo ...}) = 0

ioctl(0, SNDCTL_TMR_STOP or TCSETSW, {B38400 opost isig -icanon -echo ...}) = 0

rt_sigprocmask(SIG_SETMASK, [], NULL, 8) = 0

rt_sigaction(SIGINT, {0x4006f860, [], SA_RESTORER, 0x400e8cb8}, {0x804a330, [INT], SA_RESTORER|SA_RESTART, 0x400e8cb8}, 8) = 0

rt_sigaction(SIGTERM, {0x4006f860, [], SA_RESTORER, 0x400e8cb8}, {SIG_DFL}, 8) = 0

rt_sigaction(SIGQUIT, {0x4006f860, [], SA_RESTORER, 0x400e8cb8}, {SIG_DFL}, 8) = 0

rt_sigaction(SIGALRM, {0x4006f860, [], SA_RESTORER, 0x400e8cb8}, {0x804a330, [ALRM], SA_RESTORER|SA_RESTART, 0x400e8cb8}, 8) = 0

rt_sigaction(SIGALRM, {0x804a330, [ALRM], SA_RESTORER|SA_RESTART, 0x400e8cb8}, {0x4006f860, [], SA_RESTORER, 0x400e8cb8}, 8) = 0

rt_sigaction(SIGTSTP, {0x4006f860, [], SA_RESTORER, 0x400e8cb8}, {SIG_DFL}, 8) = 0

rt_sigaction(SIGTTOU, {0x4006f860, [], SA_RESTORER, 0x400e8cb8}, {SIG_DFL}, 8) = 0

rt_sigaction(SIGTTIN, {0x4006f860, [], SA_RESTORER, 0x400e8cb8}, {SIG_DFL}, 8) = 0

rt_sigaction(SIGWINCH, {0x4006f920, [], SA_RESTORER, 0x400e8cb8}, {SIG_DFL}, 8) = 0

write(1, "> ", 2)                       = 2

rt_sigprocmask(SIG_BLOCK, NULL, [], 8)  = 0

read(0, "(", 1)                         = 1

write(1, "(", 1)                        = 1

rt_sigprocmask(SIG_BLOCK, NULL, [], 8)  = 0

read(0, "s", 1)                         = 1

write(1, "s", 1)                        = 1

rt_sigprocmask(SIG_BLOCK, NULL, [], 8)  = 0

read(0, "e", 1)                         = 1

write(1, "e", 1)                        = 1

rt_sigprocmask(SIG_BLOCK, NULL, [], 8)  = 0

read(0, "t", 1)                         = 1

write(1, "t", 1)                        = 1

rt_sigprocmask(SIG_BLOCK, NULL, [], 8)  = 0

read(0, "q", 1)                         = 1

write(1, "q", 1)                        = 1

rt_sigprocmask(SIG_BLOCK, NULL, [], 8)  = 0

read(0, " ", 1)                         = 1

write(1, " ", 1)                        = 1

rt_sigprocmask(SIG_BLOCK, NULL, [], 8)  = 0

read(0, "u", 1)                         = 1

write(1, "u", 1)                        = 1

rt_sigprocmask(SIG_BLOCK, NULL, [], 8)  = 0

read(0, "r", 1)                         = 1

write(1, "r", 1)                        = 1

rt_sigprocmask(SIG_BLOCK, NULL, [], 8)  = 0

read(0, "l", 1)                         = 1

write(1, "l", 1)                        = 1

rt_sigprocmask(SIG_BLOCK, NULL, [], 8)  = 0

read(0, " ", 1)                         = 1

write(1, " ", 1)                        = 1

rt_sigprocmask(SIG_BLOCK, NULL, [], 8)  = 0

read(0, "(", 1)                         = 1

write(1, "(", 1)                        = 1

rt_sigprocmask(SIG_BLOCK, NULL, [], 8)  = 0

read(0, "g", 1)                         = 1

write(1, "g", 1)                        = 1

rt_sigprocmask(SIG_BLOCK, NULL, [], 8)  = 0

read(0, "e", 1)                         = 1

write(1, "e", 1)                        = 1

rt_sigprocmask(SIG_BLOCK, NULL, [], 8)  = 0

read(0, "t", 1)                         = 1

write(1, "t", 1)                        = 1

rt_sigprocmask(SIG_BLOCK, NULL, [], 8)  = 0

read(0, "-", 1)                         = 1

write(1, "-", 1)                        = 1

rt_sigprocmask(SIG_BLOCK, NULL, [], 8)  = 0

read(0, "u", 1)                         = 1

write(1, "u", 1)                        = 1

rt_sigprocmask(SIG_BLOCK, NULL, [], 8)  = 0

read(0, "r", 1)                         = 1

write(1, "r", 1)                        = 1

rt_sigprocmask(SIG_BLOCK, NULL, [], 8)  = 0

read(0, "l", 1)                         = 1

write(1, "l", 1)                        = 1

rt_sigprocmask(SIG_BLOCK, NULL, [], 8)  = 0

read(0, " ", 1)                         = 1

write(1, " ", 1)                        = 1

rt_sigprocmask(SIG_BLOCK, NULL, [], 8)  = 0

read(0, """, 1)                        = 1

write(1, """, 1)                       = 1

rt_sigprocmask(SIG_BLOCK, NULL, [], 8)  = 0

read(0, "h", 1)                         = 1

write(1, "h", 1)                        = 1

rt_sigprocmask(SIG_BLOCK, NULL, [], 8)  = 0

read(0, "t", 1)                         = 1

write(1, "t", 1)                        = 1

rt_sigprocmask(SIG_BLOCK, NULL, [], 8)  = 0

read(0, "t", 1)                         = 1

write(1, "t", 1)                        = 1

rt_sigprocmask(SIG_BLOCK, NULL, [], 8)  = 0

read(0, "p", 1)                         = 1

write(1, "p", 1)                        = 1

rt_sigprocmask(SIG_BLOCK, NULL, [], 8)  = 0

read(0, ":", 1)                         = 1

write(1, ":", 1)                        = 1

rt_sigprocmask(SIG_BLOCK, NULL, [], 8)  = 0

read(0, "/", 1)                         = 1

write(1, "/", 1)                        = 1

rt_sigprocmask(SIG_BLOCK, NULL, [], 8)  = 0

read(0, "/", 1)                         = 1

write(1, "/", 1)                        = 1

rt_sigprocmask(SIG_BLOCK, NULL, [], 8)  = 0

read(0, "w", 1)                         = 1

write(1, "w", 1)                        = 1

rt_sigprocmask(SIG_BLOCK, NULL, [], 8)  = 0

read(0, "w", 1)                         = 1

write(1, "w", 1)                        = 1

rt_sigprocmask(SIG_BLOCK, NULL, [], 8)  = 0

read(0, "w", 1)                         = 1

write(1, "w", 1)                        = 1

rt_sigprocmask(SIG_BLOCK, NULL, [], 8)  = 0

read(0, ".", 1)                         = 1

write(1, ".", 1)                        = 1

rt_sigprocmask(SIG_BLOCK, NULL, [], 8)  = 0

read(0, "n", 1)                         = 1

write(1, "n", 1)                        = 1

rt_sigprocmask(SIG_BLOCK, NULL, [], 8)  = 0

read(0, "e", 1)                         = 1

write(1, "e", 1)                        = 1

rt_sigprocmask(SIG_BLOCK, NULL, [], 8)  = 0

read(0, "w", 1)                         = 1

write(1, "w", 1)                        = 1

rt_sigprocmask(SIG_BLOCK, NULL, [], 8)  = 0

read(0, "l", 1)                         = 1

write(1, "l", 1)                        = 1

rt_sigprocmask(SIG_BLOCK, NULL, [], 8)  = 0

read(0, "i", 1)                         = 1

write(1, "i", 1)                        = 1

rt_sigprocmask(SIG_BLOCK, NULL, [], 8)  = 0

read(0, "s", 1)                         = 1

write(1, "s", 1)                        = 1

rt_sigprocmask(SIG_BLOCK, NULL, [], 8)  = 0

read(0, "p", 1)                         = 1

write(1, "p", 1)                        = 1

rt_sigprocmask(SIG_BLOCK, NULL, [], 8)  = 0

read(0, ".", 1)                         = 1

write(1, ".", 1)                        = 1

rt_sigprocmask(SIG_BLOCK, NULL, [], 8)  = 0

read(0, "o", 1)                         = 1

write(1, "o", 1)                        = 1

rt_sigprocmask(SIG_BLOCK, NULL, [], 8)  = 0

read(0, "r", 1)                         = 1

write(1, "r", 1)                        = 1

rt_sigprocmask(SIG_BLOCK, NULL, [], 8)  = 0

read(0, "g", 1)                         = 1

write(1, "g", 1)                        = 1

rt_sigprocmask(SIG_BLOCK, NULL, [], 8)  = 0

read(0, "/", 1)                         = 1

write(1, "/", 1)                        = 1

rt_sigprocmask(SIG_BLOCK, NULL, [], 8)  = 0

read(0, "r", 1)                         = 1

write(1, "r", 1)                        = 1

rt_sigprocmask(SIG_BLOCK, NULL, [], 8)  = 0

read(0, "s", 1)                         = 1

write(1, "s", 1)                        = 1

rt_sigprocmask(SIG_BLOCK, NULL, [], 8)  = 0

read(0, "s", 1)                         = 1

write(1, "s", 1)                        = 1

rt_sigprocmask(SIG_BLOCK, NULL, [], 8)  = 0

read(0, ".", 1)                         = 1

write(1, ".", 1)                        = 1

rt_sigprocmask(SIG_BLOCK, NULL, [], 8)  = 0

read(0, "c", 1)                         = 1

write(1, "c", 1)                        = 1

rt_sigprocmask(SIG_BLOCK, NULL, [], 8)  = 0

read(0, "g", 1)                         = 1

write(1, "g", 1)                        = 1

rt_sigprocmask(SIG_BLOCK, NULL, [], 8)  = 0

read(0, "i", 1)                         = 1

write(1, "i", 1)                        = 1

rt_sigprocmask(SIG_BLOCK, NULL, [], 8)  = 0

read(0, "?", 1)                         = 1

write(1, "?", 1)                        = 1

rt_sigprocmask(SIG_BLOCK, NULL, [], 8)  = 0

read(0, "N", 1)                         = 1

write(1, "N", 1)                        = 1

rt_sigprocmask(SIG_BLOCK, NULL, [], 8)  = 0

read(0, "e", 1)                         = 1

write(1, "e", 1)                        = 1

rt_sigprocmask(SIG_BLOCK, NULL, [], 8)  = 0

read(0, "w", 1)                         = 1

write(1, "w", 1)                        = 1

rt_sigprocmask(SIG_BLOCK, NULL, [], 8)  = 0

read(0, "s", 1)                         = 1

write(1, "s", 1)                        = 1

rt_sigprocmask(SIG_BLOCK, NULL, [], 8)  = 0

read(0, """, 1)                        = 1

write(1, """, 1)                       = 1

rt_sigprocmask(SIG_BLOCK, NULL, [], 8)  = 0

read(0, ")", 1)                         = 1

write(1, ")", 1)                        = 1

rt_sigprocmask(SIG_BLOCK, NULL, [], 8)  = 0

read(0, ")", 1)                         = 1

write(1, ")", 1)                        = 1

rt_sigprocmask(SIG_BLOCK, NULL, [], 8)  = 0

read(0, "r", 1)                        = 1

write(1, "n", 1)                       = 1

rt_sigprocmask(SIG_BLOCK, [INT], [], 8) = 0

ioctl(0, SNDCTL_TMR_STOP or TCSETSW, {B38400 opost isig icanon echo ...}) = 0

rt_sigprocmask(SIG_SETMASK, [], NULL, 8) = 0

rt_sigaction(SIGINT, {0x804a330, [INT], SA_RESTORER|SA_RESTART, 0x400e8cb8}, {0x4006f860, [], SA_RESTORER, 0x400e8cb8}, 8) = 0

rt_sigaction(SIGTERM, {SIG_DFL}, {0x4006f860, [], SA_RESTORER, 0x400e8cb8}, 8) = 0

rt_sigaction(SIGQUIT, {SIG_DFL}, {0x4006f860, [], SA_RESTORER, 0x400e8cb8}, 8) = 0

rt_sigaction(SIGALRM, {0x804a330, [ALRM], SA_RESTORER|SA_RESTART, 0x400e8cb8}, {0x804a330, [ALRM], SA_RESTORER|SA_RESTART, 0x400e8cb8}, 8) = 0

rt_sigaction(SIGTSTP, {SIG_DFL}, {0x4006f860, [], SA_RESTORER, 0x400e8cb8}, 8) = 0

rt_sigaction(SIGTTOU, {SIG_DFL}, {0x4006f860, [], SA_RESTORER, 0x400e8cb8}, 8) = 0

rt_sigaction(SIGTTIN, {SIG_DFL}, {0x4006f860, [], SA_RESTORER, 0x400e8cb8}, 8) = 0

rt_sigaction(SIGWINCH, {SIG_DFL}, {0x4006f920, [], SA_RESTORER, 0x400e8cb8}, 8) = 0

gettimeofday({1136450159, 64543}, NULL) = 0

socket(PF_INET, SOCK_STREAM, IPPROTO_IP) = 3

gettimeofday({1136450159, 64589}, NULL) = 0

getpid()                                = 4428

open("/etc/resolv.conf", O_RDONLY)      = 4

fstat64(4, {st_mode=S_IFREG|0644, st_size=96, ...}) = 0

mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x40018000

read(4, "nameserver localhostnnameserver "..., 4096) = 96

read(4, "", 4096)                       = 0

close(4)                                = 0

munmap(0x40018000, 4096)                = 0

uname({sys="Linux", node="zeep", ...})  = 0

socket(PF_FILE, SOCK_STREAM, 0)         = 4

fcntl64(4, F_GETFL)                     = 0x2 (flags O_RDWR)

fcntl64(4, F_SETFL, O_RDWR|O_NONBLOCK)  = 0

connect(4, {sa_family=AF_FILE, path="/var/run/nscd/socket"}, 110) = -1 ENOENT (No such file or directory)

close(4)                                = 0

socket(PF_FILE, SOCK_STREAM, 0)         = 4

fcntl64(4, F_GETFL)                     = 0x2 (flags O_RDWR)

fcntl64(4, F_SETFL, O_RDWR|O_NONBLOCK)  = 0

connect(4, {sa_family=AF_FILE, path="/var/run/nscd/socket"}, 110) = -1 ENOENT (No such file or directory)

close(4)                                = 0

open("/etc/nsswitch.conf", O_RDONLY)    = 4

fstat64(4, {st_mode=S_IFREG|0644, st_size=1083, ...}) = 0

mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x40018000

read(4, "#n# /etc/nsswitch.confn#n# An ex"..., 4096) = 1083

read(4, "", 4096)                       = 0

close(4)                                = 0

munmap(0x40018000, 4096)                = 0

open("/usr/X11R6/lib/libnss_files.so.2", O_RDONLY) = -1 ENOENT (No such file or directory)

open("/etc/ld.so.cache", O_RDONLY)      = 4

fstat64(4, {st_mode=S_IFREG|0644, st_size=87458, ...}) = 0

mmap2(NULL, 87458, PROT_READ, MAP_PRIVATE, 4, 0) = 0x4020c000

close(4)                                = 0

open("/lib/libnss_files.so.2", O_RDONLY) = 4

read(4, "177ELF111331P3300"..., 512) = 512

fstat64(4, {st_mode=S_IFREG|0755, st_size=41351, ...}) = 0

mmap2(NULL, 37516, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 4, 0) = 0x40018000

mmap2(0x40020000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 4, 0x7) = 0x40020000

close(4)                                = 0

munmap(0x4020c000, 87458)               = 0

open("/etc/host.conf", O_RDONLY)        = 4

fstat64(4, {st_mode=S_IFREG|0644, st_size=27, ...}) = 0

mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x40022000

read(4, "order hosts, bindnmulti onn", 4096) = 27

read(4, "", 4096)                       = 0

close(4)                                = 0

munmap(0x40022000, 4096)                = 0

open("/etc/hosts", O_RDONLY)            = 4

fcntl64(4, F_GETFD)                     = 0

fcntl64(4, F_SETFD, FD_CLOEXEC)         = 0

fstat64(4, {st_mode=S_IFREG|0644, st_size=614, ...}) = 0

mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x40022000

read(4, "#n# hoststtThis file describes a"..., 4096) = 614

read(4, "", 4096)                       = 0

close(4)                                = 0

munmap(0x40022000, 4096)                = 0

open("/usr/X11R6/lib/libnss_dns.so.2", O_RDONLY) = -1 ENOENT (No such file or directory)

open("/etc/ld.so.cache", O_RDONLY)      = 4

fstat64(4, {st_mode=S_IFREG|0644, st_size=87458, ...}) = 0

mmap2(NULL, 87458, PROT_READ, MAP_PRIVATE, 4, 0) = 0x4020c000

close(4)                                = 0

open("/lib/libnss_dns.so.2", O_RDONLY)  = 4

read(4, "177ELF111331300r"..., 512) = 512

fstat64(4, {st_mode=S_IFREG|0755, st_size=21024, ...}) = 0

mmap2(NULL, 20616, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 4, 0) = 0x40022000

mmap2(0x40026000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 4, 0x3) = 0x40026000

close(4)                                = 0

open("/usr/X11R6/lib/libresolv.so.2", O_RDONLY) = -1 ENOENT (No such file or directory)

open("/lib/libresolv.so.2", O_RDONLY)   = 4

read(4, "177ELF111331200$"..., 512) = 512

fstat64(4, {st_mode=S_IFREG|0755, st_size=73805, ...}) = 0

mmap2(NULL, 75976, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 4, 0) = 0x40222000

mprotect(0x40230000, 18632, PROT_NONE)  = 0

mmap2(0x40231000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 4, 0xe) = 0x40231000

mmap2(0x40233000, 6344, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x40233000

close(4)                                = 0

munmap(0x4020c000, 87458)               = 0

gettimeofday({1136450159, 65944}, NULL) = 0

socket(PF_INET, SOCK_DGRAM, IPPROTO_IP) = 4

connect(4, {sa_family=AF_INET, sin_port=htons(53), sin_addr=inet_addr("213.51.129.37")}, 28) = 0

fcntl64(4, F_GETFL)                     = 0x2 (flags O_RDWR)

fcntl64(4, F_SETFL, O_RDWR|O_NONBLOCK)  = 0

gettimeofday({1136450159, 66036}, NULL) = 0

poll([{fd=4, events=POLLOUT, revents=POLLOUT}], 1, 0) = 1

send(4, "7n113www7newlisp3org1"..., 33, 0) = 33

poll([{fd=4, events=POLLIN, revents=POLLIN}], 1, 5000) = 1

ioctl(4, FIONREAD, [96])                = 0

recvfrom(4, "7n20120012113www7newlisp3org1"..., 1024, 0, {sa_family=AF_INET, sin_port=htons(53), sin_addr=inet_addr("213.51.129.37")}, [16]) = 96

close(4)                                = 0

connect(3, {sa_family=AF_INET, sin_port=htons(80), sin_addr=inet_addr("66.235.209.72")}, 16) = 0

send(3, "GET /rss.cgi?News HTTP/1.1rn", 28, 0) = 28

send(3, "Host: www.newlisp.orgrn", 23, 0) = 23

send(3, "User-Agent: newLISP v8706rn", 27, 0) = 27

send(3, "Connection: closern", 19, 0) = 19

send(3, "rn", 2, 0)                   = 2

select(1024, [3], NULL, [3], {0, 1000}) = 0 (Timeout)

select(1024, [3], NULL, [3], {0, 1000}) = 0 (Timeout)

select(1024, [3], NULL, [3], {0, 1000}) = 0 (Timeout)

select(1024, [3], NULL, [3], {0, 1000}) = 0 (Timeout)

select(1024, [3], NULL, [3], {0, 1000}) = 0 (Timeout)

select(1024, [3], NULL, [3], {0, 1000}) = 0 (Timeout)

select(1024, [3], NULL, [3], {0, 1000}) = 0 (Timeout)

select(1024, [3], NULL, [3], {0, 1000}) = 0 (Timeout)

select(1024, [3], NULL, [3], {0, 1000}) = 0 (Timeout)

select(1024, [3], NULL, [3], {0, 1000}) = 0 (Timeout)

select(1024, [3], NULL, [3], {0, 1000}) = 0 (Timeout)

select(1024, [3], NULL, [3], {0, 1000}) = 0 (Timeout)

select(1024, [3], NULL, [3], {0, 1000}) = 0 (Timeout)

select(1024, [3], NULL, [3], {0, 1000}) = 0 (Timeout)

select(1024, [3], NULL, [3], {0, 1000}) = 0 (Timeout)

select(1024, [3], NULL, [3], {0, 1000}) = 0 (Timeout)

select(1024, [3], NULL, [3], {0, 1000}) = 0 (Timeout)

select(1024, [3], NULL, [3], {0, 1000}) = 0 (Timeout)

select(1024, [3], NULL, [3], {0, 1000}) = 0 (Timeout)

select(1024, [3], NULL, [3], {0, 1000}) = 0 (Timeout)

select(1024, [3], NULL, [3], {0, 1000}) = 0 (Timeout)

select(1024, [3], NULL, [3], {0, 1000}) = 0 (Timeout)

select(1024, [3], NULL, [3], {0, 1000}) = 0 (Timeout)

select(1024, [3], NULL, [3], {0, 1000}) = 0 (Timeout)

select(1024, [3], NULL, [3], {0, 1000}) = 0 (Timeout)

select(1024, [3], NULL, [3], {0, 1000}) = 0 (Timeout)

select(1024, [3], NULL, [3], {0, 1000}) = 0 (Timeout)

select(1024, [3], NULL, [3], {0, 1000}) = 0 (Timeout)

select(1024, [3], NULL, [3], {0, 1000}) = 0 (Timeout)

select(1024, [3], NULL, [3], {0, 1000}) = 0 (Timeout)

select(1024, [3], NULL, [3], {0, 1000}) = 0 (Timeout)

select(1024, [3], NULL, [3], {0, 1000}) = 0 (Timeout)

select(1024, [3], NULL, [3], {0, 1000}) = 0 (Timeout)

select(1024, [3], NULL, [3], {0, 1000}) = 0 (Timeout)

select(1024, [3], NULL, [3], {0, 1000}) = 0 (Timeout)

select(1024, [3], NULL, [3], {0, 1000}) = 0 (Timeout)

select(1024, [3], NULL, [3], {0, 1000}) = 0 (Timeout)

select(1024, [3], NULL, [3], {0, 1000}) = 0 (Timeout)

select(1024, [3], NULL, [3], {0, 1000}) = 0 (Timeout)

select(1024, [3], NULL, [3], {0, 1000}) = 0 (Timeout)

select(1024, [3], NULL, [3], {0, 1000}) = 0 (Timeout)

select(1024, [3], NULL, [3], {0, 1000}) = 0 (Timeout)

select(1024, [3], NULL, [3], {0, 1000}) = 0 (Timeout)

select(1024, [3], NULL, [3], {0, 1000}) = 1 (left {0, 10000})

recv(3, "H", 1, 0)                      = 1

select(1024, [3], NULL, [3], {0, 1000}) = 1 (left {0, 10000})

recv(3, "T", 1, 0)                      = 1

select(1024, [3], NULL, [3], {0, 1000}) = 1 (left {0, 10000})

recv(3, "T", 1, 0)                      = 1

select(1024, [3], NULL, [3], {0, 1000}) = 1 (left {0, 10000})

recv(3, "P", 1, 0)                      = 1

select(1024, [3], NULL, [3], {0, 1000}) = 1 (left {0, 10000})

recv(3, "/", 1, 0)                      = 1

select(1024, [3], NULL, [3], {0, 1000}) = 1 (left {0, 10000})

recv(3, "1", 1, 0)                      = 1

select(1024, [3], NULL, [3], {0, 1000}) = 1 (left {0, 10000})

recv(3, ".", 1, 0)                      = 1

select(1024, [3], NULL, [3], {0, 1000}) = 1 (left {0, 10000})

recv(3, "1", 1, 0)                      = 1

select(1024, [3], NULL, [3], {0, 1000}) = 1 (left {0, 10000})

recv(3, " ", 1, 0)                      = 1

select(1024, [3], NULL, [3], {0, 1000}) = 1 (left {0, 10000})

recv(3, "2", 1, 0)                      = 1

select(1024, [3], NULL, [3], {0, 1000}) = 1 (left {0, 10000})

recv(3, "0", 1, 0)                      = 1

select(1024, [3], NULL, [3], {0, 1000}) = 1 (left {0, 10000})

recv(3, "0", 1, 0)                      = 1

select(1024, [3], NULL, [3], {0, 1000}) = 1 (left {0, 10000})

recv(3, " ", 1, 0)                      = 1

select(1024, [3], NULL, [3], {0, 1000}) = 1 (left {0, 10000})

recselect(1024, [3], NULL, [3], {0, 1000}) = 1 (left {0, 10000})

recv(3, "K", 1, 0)                      = 1

select(1024, [3], NULL, [3], {0, 1000}) = 1 (left {0, 10000})

recv(3, "r", 1, 0)                     = 1

select(1024, [3], NULL, [3], {0, 1000}) = 1 (left {0, 10000})

recv(3, "n", 1, 0)                     = 1

select(1024, [3], NULL, [3], {0, 1000}) = 1 (left {0, 10000})

recv(3, "D", 1, 0)                      = 1

select(1024, [3], NULL, [3], {0, 1000}) = 1 (left {0, 10000})

recv(3, "a", 1, 0)                      = 1

select(1024, [3], NULL, [3], {0, 1000}) = 1 (left {0, 10000})

recv(3, "t", 1, 0)                      = 1

select(1024, [3], NULL, [3], {0, 1000}) = 1 (left {0, 10000})

recv(3, "e", 1, 0)                      = 1

select(1024, [3], NULL, [3], {0, 1000}) = 1 (left {0, 10000})

recv(3, ":", 1, 0)                      = 1

select(1024, [3], NULL, [3], {0, 1000}) = 1 (left {0, 10000})

recv(3, " ", 1, 0)                      = 1

select(1024, [3], NULL, [3], {0, 1000}) = 1 (left {0, 10000})

recv(3, "T", 1, 0)                      = 1

select(1024, [3], NULL, [3], {0, 1000}) = 1 (left {0, 10000})

recv(3, "h", 1, 0)                      = 1

select(1024, [3], NULL, [3], {0, 1000}) = 1 (left {0, 10000})

recv(3, "u", 1, 0)                      = 1

select(1024, [3], NULL, [3], {0, 1000}) = 1 (left {0, 10000})

recv(3, ",", 1, 0)                      = 1

select(1024, [3], NULL, [3], {0, 1000}) = 1 (left {0, 10000})

recv(3, " ", 1, 0)                      = 1

select(1024, [3], NULL, [3], {0, 1000}) = 1 (left {0, 10000})

recv(3, "0", 1, 0)                      = 1

select(1024, [3], NULL, [3], {0, 1000}) = 1 (left {0, 10000})

recv(3, "5", 1, 0)                      = 1

select(1024, [3], NULL, [3], {0, 1000}) = 1 (left {0, 10000})

recv(3, " ", 1, 0)                      = 1

select(1024, [3], NULL, [3], {0, 1000}) = 1 (left {0, 10000})

recv(3, "J", 1, 0)                      = 1

select(1024, [3], NULL, [3], {0, 1000}) = 1 (left {0, 10000})

recv(3, "a", 1, 0)                      = 1

select(1024, [3], NULL, [3], {0, 1000}) = 1 (left {0, 10000})

recv(3, "n", 1, 0)                      = 1

select(1024, [3], NULL, [3], {0, 1000}) = 1 (left {0, 10000})

recv(3, " ", 1, 0)                      = 1

select(1024, [3], NULL, [3], {0, 1000}) = 1 (left {0, 10000})

recv(3, "2", 1, 0)                      = 1

select(1024, [3], NULL, [3], {0, 1000}) = 1 (left {0, 10000})

recv(3, "0", 1, 0)                      = 1

select(1024, [3], NULL, [3], {0, 1000}) = 1 (left {0, 10000})

recv(3, "0", 1, 0)                      = 1



..........

..........

etc....etc...

...........

..........



select(1024, [3], NULL, [3], {0, 1000}) = 1 (left {0, 10000})

recv(3, "</link>", 7, 0)                = 7

select(1024, [3], NULL, [3], {0, 1000}) = 1 (left {0, 10000})

recv(3, "r", 1, 0)                     = 1

select(1024, [3], NULL, [3], {0, 1000}) = 1 (left {0, 10000})

recv(3, "n", 1, 0)                     = 1

select(1024, [3], NULL, [3], {0, 1000}) = 1 (left {0, 10000})

recv(3, "1", 1, 0)                      = 1

select(1024, [3], NULL, [3], {0, 1000}) = 1 (left {0, 10000})

recv(3, " ", 1, 0)                      = 1

select(1024, [3], NULL, [3], {0, 1000}) = 1 (left {0, 10000})

recv(3, " ", 1, 0)                      = 1

select(1024, [3], NULL, [3], {0, 1000}) = 1 (left {0, 10000})

recv(3, "r", 1, 0)                     = 1

select(1024, [3], NULL, [3], {0, 1000}) = 1 (left {0, 10000})

recv(3, "n", 1, 0)                     = 1

select(1024, [3], NULL, [3], {0, 1000}) = 1 (left {0, 10000})

recv(3, "n", 1, 0)                     = 1

select(1024, [3], NULL, [3], {0, 1000}) = 1 (left {0, 10000})

recv(3, "r", 1, 0)                     = 1

select(1024, [3], NULL, [3], {0, 1000}) = 1 (left {0, 10000})

recv(3, "n", 1, 0)                     = 1

select(1024, [3], NULL, [3], {0, 1000}) = 1 (left {0, 10000})

recv(3, "b", 1, 0)                      = 1

select(1024, [3], NULL, [3], {0, 1000}) = 1 (left {0, 10000})

recv(3, " ", 1, 0)                      = 1

select(1024, [3], NULL, [3], {0, 1000}) = 1 (left {0, 10000})

recv(3, " ", 1, 0)                      = 1

select(1024, [3], NULL, [3], {0, 1000}) = 1 (left {0, 10000})

recv(3, "r", 1, 0)                     = 1

select(1024, [3], NULL, [3], {0, 1000}) = 1 (left {0, 10000})

recv(3, "n", 1, 0)                     = 1

select(1024, [3], NULL, [3], {0, 1000}) = 1 (left {0, 10000})

recv(3, "    </item>", 11, 0)           = 11

select(1024, [3], NULL, [3], {0, 1000}) = 1 (left {0, 10000})

recv(3, "r", 1, 0)                     = 1

select(1024, [3], NULL, [3], {0, 1000}) = 1 (left {0, 10000})

recv(3, "n", 1, 0)                     = 1

select(1024, [3], NULL, [3], {0, 1000}) = 1 (left {0, 10000})

recv(3, "1", 1, 0)                      = 1

select(1024, [3], NULL, [3], {0, 1000}) = 1 (left {0, 10000})

recv(3, " ", 1, 0)                      = 1

select(1024, [3], NULL, [3], {0, 1000}) = 1 (left {0, 10000})

recv(3, " ", 1, 0)                      = 1

select(1024, [3], NULL, [3], {0, 1000}) = 1 (left {0, 10000})

recv(3, "r", 1, 0)                     = 1

select(1024, [3], NULL, [3], {0, 1000}) = 1 (left {0, 10000})

recv(3, "n", 1, 0)                     = 1

select(1024, [3], NULL, [3], {0, 1000}) = 1 (left {0, 10000})

recv(3, "n", 1, 0)                     = 1

select(1024, [3], NULL, [3], {0, 1000}) = 1 (left {0, 10000})

recv(3, "r", 1, 0)                     = 1

select(1024, [3], NULL, [3], {0, 1000}) = 1 (left {0, 10000})

recv(3, "n", 1, 0)                     = 1

select(1024, [3], NULL, [3], {0, 1000}) = 1 (left {0, 10000})

recv(3, "e", 1, 0)                      = 1

select(1024, [3], NULL, [3], {0, 1000}) = 1 (left {0, 10000})

recv(3, " ", 1, 0)                      = 1

select(1024, [3], NULL, [3], {0, 1000}) = 1 (left {0, 10000})

recv(3, " ", 1, 0)                      = 1

select(1024, [3], NULL, [3], {0, 1000}) = 1 (left {0, 10000})

recv(3, "r", 1, 0)                     = 1

select(1024, [3], NULL, [3], {0, 1000}) = 1 (left {0, 10000})

recv(3, "n", 1, 0)                     = 1

select(1024, [3], NULL, [3], {0, 1000}) = 1 (left {0, 10000})

recv(3, "    </channel>", 14, 0)        = 14

select(1024, [3], NULL, [3], {0, 1000}) = 1 (left {0, 10000})

recv(3, "r", 1, 0)                     = 1

select(1024, [3], NULL, [3], {0, 1000}) = 1 (left {0, 10000})

recv(3, "n", 1, 0)                     = 1

select(1024, [3], NULL, [3], {0, 1000}) = 1 (left {0, 10000})

recv(3, "1", 1, 0)                      = 1

select(1024, [3], NULL, [3], {0, 1000}) = 1 (left {0, 10000})

recv(3, " ", 1, 0)                      = 1

select(1024, [3], NULL, [3], {0, 1000}) = 1 (left {0, 10000})

recv(3, " ", 1, 0)                      = 1

select(1024, [3], NULL, [3], {0, 1000}) = 1 (left {0, 10000})

recv(3, "r", 1, 0)                     = 1

select(1024, [3], NULL, [3], {0, 1000}) = 1 (left {0, 10000})

recv(3, "n", 1, 0)                     = 1

select(1024, [3], NULL, [3], {0, 1000}) = 1 (left {0, 10000})

recv(3, "n", 1, 0)                     = 1

select(1024, [3], NULL, [3], {0, 1000}) = 1 (left {0, 10000})

recv(3, "r", 1, 0)                     = 1

select(1024, [3], NULL, [3], {0, 1000}) = 1 (left {0, 10000})

recv(3, "n", 1, 0)                     = 1

select(1024, [3], NULL, [3], {0, 1000}) = 1 (left {0, 10000})

recv(3, "6", 1, 0)                      = 1

select(1024, [3], NULL, [3], {0, 1000}) = 1 (left {0, 10000})

recv(3, " ", 1, 0)                      = 1

select(1024, [3], NULL, [3], {0, 1000}) = 1 (left {0, 10000})

recv(3, " ", 1, 0)                      = 1

select(1024, [3], NULL, [3], {0, 1000}) = 1 (left {0, 10000})

recv(3, "r", 1, 0)                     = 1

select(1024, [3], NULL, [3], {0, 1000}) = 1 (left {0, 10000})

recv(3, "n", 1, 0)                     = 1

select(1024, [3], NULL, [3], {0, 1000}) = 1 (left {0, 10000})

recv(3, "</rss>", 6, 0)                 = 6

select(1024, [3], NULL, [3], {0, 1000}) = 1 (left {0, 10000})

recv(3, "r", 1, 0)                     = 1

select(1024, [3], NULL, [3], {0, 1000}) = 1 (left {0, 10000})

recv(3, "n", 1, 0)                     = 1

select(1024, [3], NULL, [3], {0, 1000}) = 1 (left {0, 10000})

recv(3, "1", 1, 0)                      = 1

select(1024, [3], NULL, [3], {0, 1000}) = 1 (left {0, 10000})

recv(3, " ", 1, 0)                      = 1

select(1024, [3], NULL, [3], {0, 1000}) = 1 (left {0, 10000})

recv(3, " ", 1, 0)                      = 1

select(1024, [3], NULL, [3], {0, 1000}) = 1 (left {0, 10000})

recv(3, "r", 1, 0)                     = 1

select(1024, [3], NULL, [3], {0, 1000}) = 1 (left {0, 10000})

recv(3, "n", 1, 0)                     = 1

select(1024, [3], NULL, [3], {0, 1000}) = 1 (left {0, 10000})

recv(3, "n", 1, 0)                     = 1

select(1024, [3], NULL, [3], {0, 1000}) = 1 (left {0, 10000})

recv(3, "r", 1, 0)                     = 1

select(1024, [3], NULL, [3], {0, 1000}) = 1 (left {0, 10000})

recv(3, "n", 1, 0)                     = 1

select(1024, [3], NULL, [3], {0, 1000}) = 1 (left {0, 10000})

recv(3, "0", 1, 0)                      = 1

select(1024, [3], NULL, [3], {0, 1000}) = 1 (left {0, 10000})

recv(3, "r", 1, 0)                     = 1

select(1024, [3], NULL, [3], {0, 1000}) = 1 (left {0, 10000})

recv(3, "n", 1, 0)                     = 1

close(3)

--- SIGSEGV (Segmentation fault) @ 0 (0) ---

+++ killed by SIGSEGV +++
Title:
Post by: newdep on January 05, 2006, 01:12:11 AM
Addon !



this Segdumps -> (setq bla (get-url "http://www.newlisp.org/rss.cgi?News"))



this does not ->  (get-url "http://www.newlisp.org/rss.cgi?News")
Title:
Post by: Lutz on January 05, 2006, 01:45:38 AM
I wonder if anybody can reproduce this on a LINUX machine. I have tried on MacOS X 10.4.3, FreeBSD 4.7 and OpenBSD 3.8 and no problem on these machines. Is this the same amd64 machine you reported segfaults before?



Lutz



ps: also fine on Solaris SunOS 5.8
Title:
Post by: pjot on January 05, 2006, 04:03:32 AM
Yesterday I received the same error with my GTK RSS reader. Today I have no time to test it further, I'll see during weekend if I can trace down the cause.



But it seems network related to me. Norman and I use the same Slackware 10.2; maybe it's something in GCC or in libc.



Peter
Title:
Post by: newdep on January 06, 2006, 03:07:16 PM
Well im lost, I just reinstalled slack 10.2 from scratch and I stil have this error..
Title:
Post by: newdep on January 07, 2006, 01:21:51 AM
All version of newlisp do crash ....



The error here is realted to: "Crashes in malloc(), free() or realloc() are almost always related to heap corruption, such as overflowing an allocated chunk or freeing the same pointer twice"



But where ? Im not sure if its newlisp related could very well be a new version

of anyting below..



 libm.so.6 => /lib/libm.so.6 (0x4002c000)

 libdl.so.2 => /lib/libdl.so.2 (0x40050000)

 libreadline.so.4 => /usr/lib/libreadline.so.4 (0x40054000)

 libncurses.so.5 => /lib/libncurses.so.5 (0x40080000)

 libc.so.6 => /lib/libc.so.6 (0x400bf000)

 /lib/ld-linux.so.2 (0x40000000)

 libgpm.so.1 => /lib/libgpm.so.1 (0x401d8000)





Its very very odd, I cant reproduce the error to happen it just happens

randomly now... all get-url actions are oke... Could it be a memory free issue?



Norman.
Title:
Post by: newdep on January 07, 2006, 01:37:51 AM
NOTES

       The Unix98 standard requires malloc(), calloc(), and realloc() to set errno to ENOMEM upon failure. Glibc assumes  that

       this  is  done (and the glibc versions of these routines do this); if you use a private malloc implementation that does

       not set errno, then certain library routines may fail without having a reason in errno.



       Crashes in malloc(), free() or realloc() are almost always related to heap corruption, such as overflowing an allocated

       chunk or freeing the same pointer twice.



       Recent  versions  of Linux libc (later than 5.4.23) and GNU libc (2.x) include a malloc implementation which is tunable

       via environment variables.  When MALLOC_CHECK_ is set, a special (less  efficient)  implementation  is  used  which  is

       designed  to be tolerant against simple errors, such as double calls of free() with the same argument, or overruns of a

       single byte (off-by-one bugs).  Not all such errors can be protected against, however, and memory leaks can result.  If

       MALLOC_CHECK_  is  set  to 0, any detected heap corruption is silently ignored; if set to 1, a diagnostic is printed on

       stderr; if set to 2, abort() is called immediately.  This can be useful because  otherwise  a  crash  may  happen  much

       later, and the true cause for the problem is then very hard to track down.



BUGS

       By  default,  Linux  follows  an optimistic memory allocation strategy.  This means that when malloc() returns non-NULL

       there is no guarantee that the memory really is available. This is a really bad bug.  In case it  turns  out  that  the

       system  is  out  of memory, one or more processes will be killed by the infamous OOM killer.  In case Linux is employed

       under circumstances where it would be less desirable to suddenly lose some randomly picked processes, and moreover  the

       kernel version is sufficiently recent, one can switch off this overcommitting behavior using a command like

              # echo 2 > /proc/sys/vm/overcommit_memory

       See also the kernel Documentation directory, files vm/overcommit-accounting and sysctl/vm.txt.









So I put the MALLOC_CHECK_=0/1/2 in my enironment and it runs !

No problems and NO abort!.. So somthing is fishy here.. This should not

be done but be managed by libc  (see above the man page of malloc)



Seeking the internet on this topic it seems to happen a lot... But if its

a slackware distribution issue ?? I cant figure it out..





Norman.
Title:
Post by: newdep on January 07, 2006, 02:19:22 AM
Okay !

some ColdMetal debugging here a gdb output with realtime tracking...

Hope its usefull for a small indication...





$gdb newlisp

GNU gdb 6.3

Copyright 2004 Free Software Foundation, Inc.

GDB is free software, covered by the GNU General Public License, and you are

welcome to change it and/or distribute copies of it under certain conditions.

Type "show copying" to see the conditions.

There is absolutely no warranty for GDB.  Type "show warranty" for details.

This GDB was configured as "i486-slackware-linux"...(no debugging symbols found)

Using host libthread_db library "/lib/libthread_db.so.1".



(gdb) handle SIGPIPE nostop

Signal        Stop      Print   Pass to program Description

SIGPIPE       No        Yes     Yes             Broken pipe

(gdb) run

Starting program: /usr/bin/newlisp

(no debugging symbols found)

(no debugging symbols found)

newLISP v.8.7.6 on linux, execute 'newlisp -h' for more info.



> (load "rss-ticker2.lsp")



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

Remove screen output here...

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



*** glibc detected *** double free or corruption (!prev): 0x080a2850 ***



Program received signal SIGABRT, Aborted.

0x400e7d81 in kill () from /lib/libc.so.6

(gdb) bt full

#0  0x400e7d81 in kill () from /lib/libc.so.6

No symbol table info available.

#1  0x400e7b05 in raise () from /lib/libc.so.6

No symbol table info available.

#2  0x400e905d in abort () from /lib/libc.so.6

No symbol table info available.

#3  0x4011a46c in __libc_message () from /lib/libc.so.6

No symbol table info available.

#4  0x40122df6 in malloc_printerr () from /lib/libc.so.6

No symbol table info available.

#5  0x40121abf in _int_free () from /lib/libc.so.6

No symbol table info available.

#6  0x401206df in free () from /lib/libc.so.6

No symbol table info available.

#7  0x0804c268 in ?? ()

No symbol table info available.

#8  0x080a2850 in ?? ()

No symbol table info available.

#9  0x401d59c0 in __libc_tsd_MALLOC_data () from /lib/libc.so.6

No symbol table info available.

#10 0xbffff0e8 in ?? ()

No symbol table info available.

#11 0x0809d8c0 in ?? ()

No symbol table info available.

#12 0x080884d8 in ?? ()

No symbol table info available.

#13 0x080a55b0 in ?? ()

No symbol table info available.

#14 0xbffff108 in ?? ()

No symbol table info available.

#15 0x0804b608 in ?? ()

No symbol table info available.

#16 0x080a5590 in ?? ()

No symbol table info available.

#17 0x0809d8a0 in ?? ()

No symbol table info available.

#18 0xbffff108 in ?? ()

No symbol table info available.

#19 0x0804c340 in ?? ()

No symbol table info available.

#20 0x00000024 in ?? ()

No symbol table info available.

#21 0x00000004 in ?? ()

No symbol table info available.

#22 0x08073910 in ?? ()

No symbol table info available.

#23 0x08073900 in ?? ()

No symbol table info available.

---Type <return> to continue, or q <return> to quit---

#24 0x00000003 in ?? ()

No symbol table info available.

#25 0x0809d8a0 in ?? ()

No symbol table info available.

#26 0xbffff128 in ?? ()

No symbol table info available.

#27 0x08050059 in ?? ()

No symbol table info available.

#28 0x08073900 in ?? ()

No symbol table info available.

#29 0x08095748 in ?? ()

No symbol table info available.

#30 0x00000024 in ?? ()

No symbol table info available.

#31 0x080731a0 in ?? ()

No symbol table info available.

#32 0x080a7a38 in ?? ()

No symbol table info available.

#33 0x080735c0 in ?? ()

No symbol table info available.

#34 0xbffff158 in ?? ()

No symbol table info available.

#35 0x080508ce in ?? ()

No symbol table info available.

#36 0x08073640 in ?? ()

No symbol table info available.

#37 0x00000008 in ?? ()

No symbol table info available.

#38 0x40121a24 in _int_free () from /lib/libc.so.6

No symbol table info available.

Previous frame inner to this frame (corrupt stack?)

(gdb)



in short ->



(gdb) backtrace

#0  0x400e7d81 in kill () from /lib/libc.so.6

#1  0x400e7b05 in raise () from /lib/libc.so.6

#2  0x400e905d in abort () from /lib/libc.so.6

#3  0x4011a46c in __libc_message () from /lib/libc.so.6

#4  0x40122df6 in malloc_printerr () from /lib/libc.so.6

#5  0x40121abf in _int_free () from /lib/libc.so.6

#6  0x401206df in free () from /lib/libc.so.6

#7  0x0804c268 in ?? ()

#8  0x080a2850 in ?? ()

#9  0x401d59c0 in __libc_tsd_MALLOC_data () from /lib/libc.so.6

#10 0xbffff0e8 in ?? ()

#11 0x0809d8c0 in ?? ()

#12 0x080884d8 in ?? ()

#13 0x080a55b0 in ?? ()

#14 0xbffff108 in ?? ()

#15 0x0804b608 in ?? ()

#16 0x080a5590 in ?? ()

#17 0x0809d8a0 in ?? ()

#18 0xbffff108 in ?? ()

#19 0x0804c340 in ?? ()

#20 0x00000024 in ?? ()

#21 0x00000004 in ?? ()

#22 0x08073910 in ?? ()

#23 0x08073900 in ?? ()

#24 0x00000003 in ?? ()

#25 0x0809d8a0 in ?? ()

#26 0xbffff128 in ?? ()

#27 0x08050059 in ?? ()

#28 0x08073900 in ?? ()

#29 0x08095748 in ?? ()

#30 0x00000024 in ?? ()

#31 0x080731a0 in ?? ()

#32 0x080a7a38 in ?? ()

#33 0x080735c0 in ?? ()

#34 0xbffff158 in ?? ()

#35 0x080508ce in ?? ()

#36 0x08073640 in ?? ()

#37 0x00000008 in ?? ()

#38 0x40121a24 in _int_free () from /lib/libc.so.6
Title:
Post by: newdep on January 07, 2006, 02:29:29 AM
Sorry ! no debug info in previous one !! here is the correct debug...

enjoy ;-)





*** glibc detected *** double free or corruption (!prev): 0x080a2848 ***



Program received signal SIGABRT, Aborted.

0x400e7d81 in kill () from /lib/libc.so.6

(gdb) bt full

#0  0x400e7d81 in kill () from /lib/libc.so.6

No symbol table info available.

#1  0x400e7b05 in raise () from /lib/libc.so.6

No symbol table info available.

#2  0x400e905d in abort () from /lib/libc.so.6

No symbol table info available.

#3  0x4011a46c in __libc_message () from /lib/libc.so.6

No symbol table info available.

#4  0x40122df6 in malloc_printerr () from /lib/libc.so.6

No symbol table info available.

#5  0x40121abf in _int_free () from /lib/libc.so.6

No symbol table info available.

#6  0x401206df in free () from /lib/libc.so.6

No symbol table info available.

#7  0x0804c268 in deleteList (cell=0x401d3ff4) at newlisp.c:1536

        next = (CELL *) 0x401d3ff4

#8  0x0804b608 in evaluateExpression (cell=0x80a2848) at newlisp.c:1112

        result = (CELL *) 0x80a55a8

        args = (CELL *) 0x8073910

        pCell = (CELL *) 0x401d59c0

        resultIdxSave = 4

#9  0x08050059 in evaluateBlock (cell=0x8073900) at newlisp.c:3966

        result = (CELL *) 0x0

#10 0x080508ce in p_dolist (params=0x8073290) at newlisp.c:4246

        cell = (CELL *) 0x3

        list = (CELL *) 0x80735c0

        symbol = (SYMBOL *) 0x80930e8

#11 0x0804b832 in evaluateExpression (cell=0x80731a0) at newlisp.c:1058

        result = (CELL *) 0x80731a0

        args = (CELL *) 0x8073470

        pCell = (CELL *) 0x8071e00

        resultIdxSave = 2

#12 0x08050059 in evaluateBlock (cell=0x80731a0) at newlisp.c:3966

        result = (CELL *) 0x0

#13 0x080503c5 in repeat (params=0x8073150, type=2) at newlisp.c:4094

        result = (CELL *) 0x2

        cell = (CELL *) 0x0

        resultIdxSave = 2

#14 0x080502d1 in p_until (params=0x8073150) at newlisp.c:4060

No locals.

#15 0x0804b832 in evaluateExpression (cell=0x8073140) at newlisp.c:1058

        result = (CELL *) 0x1

        args = (CELL *) 0x8073160

        pCell = (CELL *) 0x8071d90

        resultIdxSave = 2

#16 0x0804b07c in evaluateStream (stream=0xbffff320, outDevice=0, flag=1) at newlisp.c:855

        program = (CELL *) 0x8073000

        eval = (CELL *) 0x80731e0

---Type <return> to continue, or q <return> to quit---

        resultIdxSave = 1

        result = 1

#17 0x0804d8ac in loadFile (fileName=0x8091fc8 "rss-ticker2.lsp", offset=0, encryptFlag=134683484) at newlisp.c:2446

        result = (CELL *) 0x0

        stream = {handle = 6, ptr = 0x80998d7 "nn(println default)n(exit)n",

  buffer = 0x8099098 "#!/usr/bin/newlispn;;n;; RSS Ticker v1.0 (c) Norman 2004n;;n;; Displays RSS Feed titels in your terminal screenn;; by using tput codes.n;;n;; Linux terminal version with ANSI and tput requiredn;; n;;n"..., position = 0, size = 18432}

        errNo = 0

        dataLen = 0

        errorJumpSave = {{__jmpbuf = {134709576, -1073744412, -1073744780, -1073744488, -1073744832, 134522561}, __mask_was_saved = 0,

    __saved_mask = {__val = {0 <repeats 32 times>}}}}

        key = "0000000001000000@H35@010000"

#18 0x08050bc1 in p_load (params=0x8071d40) at newlisp.c:4366

        fileName = 0x8091fc8 "rss-ticker2.lsp"

        result = (CELL *) 0x0

#19 0x0804b832 in evaluateExpression (cell=0x8072fb0) at newlisp.c:1058

        result = (CELL *) 0x1

        args = (CELL *) 0x8072fc0

        pCell = (CELL *) 0x8072920

        resultIdxSave = 1

#20 0x0804b07c in evaluateStream (stream=0xbffff400, outDevice=2, flag=0) at newlisp.c:855

        program = (CELL *) 0x8071d60

        eval = (CELL *) 0x8071d40

        resultIdxSave = 0

        result = 1

#21 0x0804aeca in executeCommandLine (command=0xbffff400 "", outDevice=2, cmdStream=0xbffff460) at newlisp.c:833

        stream = {handle = 0, ptr = 0x8092088 "", buffer = 0x8092070 "(load "rss-ticker2.lsp")", position = 0, size = 2072}

#22 0x0804a801 in main (argc=1, argv=0xbffff5e4) at newlisp.c:663

        command = "c22304b224Wf@¨÷04@ ", '' <repeats 11 times>, ":þf@d«f@t#f@¨÷04@b000000214ý04@Ðý04@Ø_01@|f01@00000000dõÿ¿230u00@Ý22204b216ÿw01À21204b õÿ¿(f01@05000000Ðý04@010000000000000001000000211Ëf@ õÿ¿ô?35@00000000äõÿ¿8õÿ¿216ÿw01220õÿ¿Ðd01@Ý22204b/÷ÿ¿Îð21@¤235f@¨÷04@8õÿ¿uBr@ô?35@ìõÿ¿Xõÿ¿ºn04@Ø_01@Xk01@X"...

        cmdStream = {handle = 0, ptr = 0x0, buffer = 0x0, position = 0, size = 0}

        idx = 1

        cmd = 0x8092070 "(load "rss-ticker2.lsp")"

(gdb) backtrace

#0  0x400e7d81 in kill () from /lib/libc.so.6

#1  0x400e7b05 in raise () from /lib/libc.so.6

#2  0x400e905d in abort () from /lib/libc.so.6

#3  0x4011a46c in __libc_message () from /lib/libc.so.6

#4  0x40122df6 in malloc_printerr () from /lib/libc.so.6

#5  0x40121abf in _int_free () from /lib/libc.so.6

#6  0x401206df in free () from /lib/libc.so.6

#7  0x0804c268 in deleteList (cell=0x401d3ff4) at newlisp.c:1536

#8  0x0804b608 in evaluateExpression (cell=0x80a2848) at newlisp.c:1112

#9  0x08050059 in evaluateBlock (cell=0x8073900) at newlisp.c:3966

#10 0x080508ce in p_dolist (params=0x8073290) at newlisp.c:4246

#11 0x0804b832 in evaluateExpression (cell=0x80731a0) at newlisp.c:1058

#12 0x08050059 in evaluateBlock (cell=0x80731a0) at newlisp.c:3966

#13 0x080503c5 in repeat (params=0x8073150, type=2) at newlisp.c:4094

#14 0x080502d1 in p_until (params=0x8073150) at newlisp.c:4060

#15 0x0804b832 in evaluateExpression (cell=0x8073140) at newlisp.c:1058

#16 0x0804b07c in evaluateStream (stream=0xbffff320, outDevice=0, flag=1) at newlisp.c:855

#17 0x0804d8ac in loadFile (fileName=0x8091fc8 "rss-ticker2.lsp", offset=0, encryptFlag=134683484) at newlisp.c:2446

#18 0x08050bc1 in p_load (params=0x8071d40) at newlisp.c:4366

#19 0x0804b832 in evaluateExpression (cell=0x8072fb0) at newlisp.c:1058

#20 0x0804b07c in evaluateStream (stream=0xbffff400, outDevice=2, flag=0) at newlisp.c:855

#21 0x0804aeca in executeCommandLine (command=0xbffff400 "", outDevice=2, cmdStream=0xbffff460) at newlisp.c:833

#22 0x0804a801 in main (argc=1, argv=0xbffff5e4) at newlisp.c:663

(gdb)
Title:
Post by: newdep on January 07, 2006, 02:49:16 AM
Lutz,



What version of readline do you use?

What does newlisp with readline?



I compiled newlisp without readline (and pjot also) NO problems,

WITH readline it crashes...



my readline version is: readline-4.3-i486-3

Pjots version: readline-4.3-i486-3



PS: does not have to be the problem! but just checking..



Reagrds, Norman
Title:
Post by: newdep on January 07, 2006, 02:56:45 AM
Well i changed to readline-5.0 and still crashes..here the output...

What does newlisp do with readline regarding functions? malloc?



here my makefile







# makefile for newLISP v. 8.x.x on LINUX

#

# Note, that readline support may require different libraries on different OSs

#



OBJS = newlisp.o nl-symbol.o nl-math.o nl-list.o nl-liststr.o nl-string.o nl-filesys.o

        nl-sock.o nl-import.o nl-xml.o nl-web.o nl-matrix.o nl-debug.o pcre.o



CFLAGS = -Wall -pedantic -Wno-uninitialized -c -O2 -g -DREADLINE -DLINUX

#CFLAGS = -Wall -pedantic -Wno-uninitialized -c -O2 -g -DLINUX



CC = gcc





default: $(OBJS)

#       $(CC) $(OBJS) -g -lm -ldl -lreadline -ltermcap -o newlisp

        $(CC) $(OBJS) -g -lm -ldl -lreadline -lncurses -o newlisp

#       $(CC) $(OBJS) -g -lm -ldl -o newlisp

#       strip newlisp



.c.o:

        $(CC) $(CFLAGS) $<



$(OBJS): primes.h protos.h makefile_linux















(gdb) bt

#0  0x400e7d81 in kill () from /lib/libc.so.6

#1  0x400e7b05 in raise () from /lib/libc.so.6

#2  0x400e905d in abort () from /lib/libc.so.6

#3  0x4011a46c in __libc_message () from /lib/libc.so.6

#4  0x40122df6 in malloc_printerr () from /lib/libc.so.6

#5  0x40121abf in _int_free () from /lib/libc.so.6

#6  0x401206df in free () from /lib/libc.so.6

#7  0x0804c268 in deleteList (cell=0x401d3ff4) at newlisp.c:1536

#8  0x0804b608 in evaluateExpression (cell=0x80a3fc0) at newlisp.c:1112

#9  0x08050059 in evaluateBlock (cell=0x80736f0) at newlisp.c:3966

#10 0x080508ce in p_dolist (params=0x80731d0) at newlisp.c:4246

#11 0x0804b832 in evaluateExpression (cell=0x80731b0) at newlisp.c:1058

#12 0x08050059 in evaluateBlock (cell=0x80731b0) at newlisp.c:3966

#13 0x080503c5 in repeat (params=0x8073150, type=2) at newlisp.c:4094

#14 0x080502d1 in p_until (params=0x8073150) at newlisp.c:4060

#15 0x0804b832 in evaluateExpression (cell=0x8073140) at newlisp.c:1058

#16 0x0804b07c in evaluateStream (stream=0xbffff3e0, outDevice=0, flag=1) at newlisp.c:855

#17 0x0804d8ac in loadFile (fileName=0x8096648 "rss-ticker2.lsp", offset=0, encryptFlag=134683484) at newlisp.c:2446

#18 0x08050bc1 in p_load (params=0x8071d40) at newlisp.c:4366

#19 0x0804b832 in evaluateExpression (cell=0x8072fb0) at newlisp.c:1058

#20 0x0804b07c in evaluateStream (stream=0xbffff4c0, outDevice=2, flag=0) at newlisp.c:855

#21 0x0804aeca in executeCommandLine (command=0xbffff4c0 "", outDevice=2, cmdStream=0xbffff520) at newlisp.c:833

#22 0x0804a801 in main (argc=1, argv=0xbffff6a4) at newlisp.c:663



(gdb) bt full

#0  0x400e7d81 in kill () from /lib/libc.so.6

No symbol table info available.

#1  0x400e7b05 in raise () from /lib/libc.so.6

No symbol table info available.

#2  0x400e905d in abort () from /lib/libc.so.6

No symbol table info available.

#3  0x4011a46c in __libc_message () from /lib/libc.so.6

No symbol table info available.

#4  0x40122df6 in malloc_printerr () from /lib/libc.so.6

No symbol table info available.

#5  0x40121abf in _int_free () from /lib/libc.so.6

No symbol table info available.

#6  0x401206df in free () from /lib/libc.so.6

No symbol table info available.

#7  0x0804c268 in deleteList (cell=0x401d3ff4) at newlisp.c:1536

        next = (CELL *) 0x401d3ff4

#8  0x0804b608 in evaluateExpression (cell=0x80a3fc0) at newlisp.c:1112

        result = (CELL *) 0x80a6c10

        args = (CELL *) 0x8073700

        pCell = (CELL *) 0x401d59c0

        resultIdxSave = 4

#9  0x08050059 in evaluateBlock (cell=0x80736f0) at newlisp.c:3966

        result = (CELL *) 0x0

#10 0x080508ce in p_dolist (params=0x80731d0) at newlisp.c:4246

        cell = (CELL *) 0x3

        list = (CELL *) 0x8073340

        symbol = (SYMBOL *) 0x809f090

#11 0x0804b832 in evaluateExpression (cell=0x80731b0) at newlisp.c:1058

        result = (CELL *) 0x80731b0

        args = (CELL *) 0x80731e0

        pCell = (CELL *) 0x8071e00

        resultIdxSave = 2

#12 0x08050059 in evaluateBlock (cell=0x80731b0) at newlisp.c:3966

        result = (CELL *) 0x0

#13 0x080503c5 in repeat (params=0x8073150, type=2) at newlisp.c:4094

        result = (CELL *) 0x2

        cell = (CELL *) 0x0

        resultIdxSave = 2

#14 0x080502d1 in p_until (params=0x8073150) at newlisp.c:4060

No locals.

#15 0x0804b832 in evaluateExpression (cell=0x8073140) at newlisp.c:1058

        result = (CELL *) 0x1

        args = (CELL *) 0x8073160

        pCell = (CELL *) 0x8071d90

        resultIdxSave = 2

#16 0x0804b07c in evaluateStream (stream=0xbffff3e0, outDevice=0, flag=1) at newlisp.c:855

---Type <return> to continue, or q <return> to quit---

        program = (CELL *) 0x8073000

        eval = (CELL *) 0x80731c0

        resultIdxSave = 1

        result = 1

#17 0x0804d8ac in loadFile (fileName=0x8096648 "rss-ticker2.lsp", offset=0, encryptFlag=134683484) at newlisp.c:2446

        result = (CELL *) 0x0

        stream = {handle = 6, ptr = 0x809add7 "nn(println default)n(exit)n",

  buffer = 0x809a598 "#!/usr/bin/newlispn;;n;; RSS Ticker v1.0 (c) Norman 2004n;;n;; Displays RSS Feed titels in your terminal screenn;;

 by using tput codes.n;;n;; Linux terminal version with ANSI and tput requiredn;; n;;n"..., position = 0, size = 18432}

        errNo = 0

        dataLen = 0

        errorJumpSave = {{__jmpbuf = {134709576, -1073744220, -1073744588, -1073744296, -1073744640, 134522561}, __mask_was_saved = 0,

    __saved_mask = {__val = {0 <repeats 32 times>}}}}

        key = "pôÿ¿00000000àóÿ¿@óÿ¿"

#18 0x08050bc1 in p_load (params=0x8071d40) at newlisp.c:4366

        fileName = 0x8096648 "rss-ticker2.lsp"

        result = (CELL *) 0x0

#19 0x0804b832 in evaluateExpression (cell=0x8072fb0) at newlisp.c:1058

        result = (CELL *) 0x1

        args = (CELL *) 0x8072fc0

        pCell = (CELL *) 0x8072920

        resultIdxSave = 1

#20 0x0804b07c in evaluateStream (stream=0xbffff4c0, outDevice=2, flag=0) at newlisp.c:855

        program = (CELL *) 0x8071d60

        eval = (CELL *) 0x8071d40

        resultIdxSave = 0

        result = 1

#21 0x0804aeca in executeCommandLine (command=0xbffff4c0 "", outDevice=2, cmdStream=0xbffff520) at newlisp.c:833

        stream = {handle = 0, ptr = 0x8096798 "", buffer = 0x8096780 "(load "rss-ticker2.lsp")", position = 0, size = 2072}

#22 0x0804a801 in main (argc=1, argv=0xbffff6a4) at newlisp.c:663

        command = "c22304b224Wf@¨÷04@ ", '' <repeats 11 times>, ":þf@d«f@t#f@¨÷04@b000000214ý04@Ðý04@Ø_01@|f01

@00000000$öÿ¿230u00@Ý22204b216ÿw01À21204bàõÿ¿(f01@05000000Ðý04@0100000000000000010000

00211Ëf@àõÿ¿ô?35@00000000¤öÿ¿øõÿ¿216ÿw01Pöÿ¿Ðd01@Ý22204bÕ÷ÿ¿Îð21@¤235f@¨÷04@øõÿ¿uBr@ô?35@¬öÿ¿30öÿ¿ºn04@Ø_

01@Xk01@30"...

        cmdStream = {handle = 0, ptr = 0x0, buffer = 0x0, position = 0, size = 0}

        idx = 1

        cmd = 0x8096780 "(load "rss-ticker2.lsp")"

(gdb)
Title:
Post by: pjot on January 07, 2006, 02:57:43 AM
I receive the same crashes.



But if I compile newLisp WITHOUT readline, it all runs well.



Continuing...
Title:
Post by: newdep on January 07, 2006, 03:19:05 AM
Okay I compiled newlisp with the latest readline and ncurses

still got the problem..
Title:
Post by: newdep on January 07, 2006, 03:27:44 AM
Lutz,



Without any strange options.. here a simple debug of get-url

like this -> (goes wrong!) (and below also one thats oke!!)



(setq url (get-url "http://www.newlisp.org/rss.cgi?News"))







s$gdb newlisp

GNU gdb 6.3

Copyright 2004 Free Software Foundation, Inc.

GDB is free software, covered by the GNU General Public License, and you are

welcome to change it and/or distribute copies of it under certain conditions.

Type "show copying" to see the conditions.

There is absolutely no warranty for GDB.  Type "show warranty" for details.

This GDB was configured as "i486-slackware-linux"...Using host libthread_db library "/lib/libthread_db.so.1".



(gdb) run

Starting program: /usr/bin/newlisp

newLISP v.8.7.6 on linux, execute 'newlisp -h' for more info.



> (setq url (get-url "http://www.newlisp.org/rss.cgi?News"))



Program received signal SIGSEGV, Segmentation fault.

0x400e2dc9 in malloc_consolidate () from /lib/libc.so.6

(gdb) bt

#0  0x400e2dc9 in malloc_consolidate () from /lib/libc.so.6

#1  0x400e2493 in _int_malloc () from /lib/libc.so.6

#2  0x400e1548 in malloc () from /lib/libc.so.6

#3  0x0804c730 in allocMemory (nbytes=2325) at newlisp.c:1594

#4  0x0804c501 in copyCell (cell=0x401969c0) at newlisp.c:1484

#5  0x0804fbeb in setDefine (symbol=0x80aecd8, params=0x6d783f3c, type=1702240364) at newlisp.c:3597

#6  0x0804fa27 in p_setq (params=0x808bc00) at newlisp.c:3516

#7  0x0804bc22 in evaluateExpression (cell=0x808ba70) at newlisp.c:1058

#8  0x0804b46c in evaluateStream (stream=0xbffff440, outDevice=2, flag=0) at newlisp.c:855

#9  0x0804b2ba in executeCommandLine (command=0xbffff440 "", outDevice=2, cmdStream=0xbffff4a0) at newlisp.c:833

#10 0x0804abf1 in main (argc=1, argv=0xbffff624) at newlisp.c:663

(gdb) bt full

#0  0x400e2dc9 in malloc_consolidate () from /lib/libc.so.6

No symbol table info available.

#1  0x400e2493 in _int_malloc () from /lib/libc.so.6

No symbol table info available.

#2  0x400e1548 in malloc () from /lib/libc.so.6

No symbol table info available.

#3  0x0804c730 in allocMemory (nbytes=2325) at newlisp.c:1594

        ptr = (void *) 0x40194ff4

#4  0x0804c501 in copyCell (cell=0x401969c0) at newlisp.c:1484

        newCell = (CELL *) 0x808bc40

#5  0x0804fbeb in setDefine (symbol=0x80aecd8, params=0x6d783f3c, type=1702240364) at newlisp.c:3597

        cell = (CELL *) 0x808bc00

#6  0x0804fa27 in p_setq (params=0x808bc00) at newlisp.c:3516

        symbol = (SYMBOL *) 0x6576206c

        next = (CELL *) 0x808a800

#7  0x0804bc22 in evaluateExpression (cell=0x808ba70) at newlisp.c:1058

        result = (CELL *) 0x1

        args = (CELL *) 0x808ba80

        pCell = (CELL *) 0x401969c0

        resultIdxSave = 1

#8  0x0804b46c in evaluateStream (stream=0xbffff440, outDevice=2, flag=0) at newlisp.c:855

        program = (CELL *) 0x808a820

        eval = (CELL *) 0x808a800

        resultIdxSave = 0

        result = 1

#9  0x0804b2ba in executeCommandLine (command=0xbffff440 "", outDevice=2, cmdStream=0xbffff4a0) at newlisp.c:833

        stream = {handle = 0, ptr = 0x80adcd2 "", buffer = 0x80adc98 "(setq url (get-url "http://www.newlisp.org/rss.cgi?News"))",

  position = 0, size = 2106}

#10 0x0804abf1 in main (argc=1, argv=0xbffff624) at newlisp.c:663

        command = "Õ22504b224gb@30õ04@ ", '' <repeats 11 times>, ":16t@d»b@t3b@30õ04@06000000,ø04@hø04@Ø_0

1@|f01@00000000¤õÿ¿230u00@>22504b216ÿw012021404b`õÿ¿(f01@04000000hø04@0100000000000000

001000000211Ûb@`õÿ¿ôO31@00000000$öÿ¿xõÿ¿216ÿw01Ðõÿ¿Ðd01@>22504b`÷ÿ¿Î0016@¤­b@30õ04@xõÿ¿uRt@ôO31@,öÿ¿2

30õÿ¿ºn04@Ø_01@Xk01@230"...

        cmdStream = {handle = 0, ptr = 0x0, buffer = 0x0, position = 0, size = 0}

        idx = 1

        cmd = 0x80adc98 "(setq url (get-url "http://www.newlisp.org/rss.cgi?News"))"

(gdb)











AND without !!! the setq url !!! is works oke !!!











$gdb newlisp

GNU gdb 6.3

Copyright 2004 Free Software Foundation, Inc.

GDB is free software, covered by the GNU General Public License, and you are

welcome to change it and/or distribute copies of it under certain conditions.

Type "show copying" to see the conditions.

There is absolutely no warranty for GDB.  Type "show warranty" for details.

This GDB was configured as "i486-slackware-linux"...Using host libthread_db library "/lib/libthread_db.so.1".



(gdb) run

Starting program: /usr/bin/newlisp

newLISP v.8.7.6 on linux, execute 'newlisp -h' for more info.



> (get-url "http://www.newlisp.org/rss.cgi?News")

[text]<?xml version="1.0" encoding="UTF-8"?>

<!-- generator="newLISP Wiki/CMS rss.cgi v. 1.0" -->

<rss version="0.92">

    <channel>

        <title>newLISP</title>

        <description>News and Comments</description>

        <link>http://newlisp.org</link>

        <copyright>copyright (c) Lutz Mueller, 2005. All rights reserved.</copyright>

    <item>

        <title>development version newLISP 8.7.6</title>

        <description></description>

        <link>http://newlisp.org/index.cgi?find=Lutz%20on%20Mon%20Jan%20%202%2019:59:52%202006 </link>

    </item>

    <item>

        <title>development version newLISP 8.7.5</title>

        <description></description>

        <link>http://newlisp.org/index.cgi?find=Lutz%20on%20Fri%20Dec%2023%2017:11:58%202005 </link>

    </item>

    <item>

        <title>development version newLISP 8.7.4</title>

        <description></description>

        <link>http://newlisp.org/index.cgi?find=Lutz%20on%20Mon%20Dec%20%205%2015:14:18%202005 </link>

    </item>

    <item>

        <title>newLISP coding competition</title>

        <description></description>

        <link>http://newlisp.org/index.cgi?find=lutz%20on%20Sat%20Dec%20%203%2002:37:41%202005 </link>

    </item>

    <item>

        <title>Users about newLISP</title>

        <description></description>

        <link>http://newlisp.org/index.cgi?find=Lutz%20on%20Fri%20Dec%20%202%2019:54:41%202005 </link>

    </item>

    <item>

        <title>development version newLISP 8.7.3</title>

        <description></description>

        <link>http://newlisp.org/index.cgi?find=Lutz%20on%20Sun%20Nov%2027%2016:46:06%202005 </link>

    </item>

    <item>

        <title>repost development version newLISP 8.7.2</title>

        <description></description>

        <link>http://newlisp.org/index.cgi?find=Lutz%20on%20Sun%20Nov%2020%2018:58:18%202005 </link>

    </item>

    <item>

        <title>development version newLISP 8.7.2</title>

        <description></description>

        <link>http://newlisp.org/index.cgi?find=Lutz%20Mueller%20on%20Sun%20Nov%2020%2017:01:14%202005 </link>

    </item>

    <item>

        <title>newLISP release version 8.7.1</title>

        <description></description>

        <link>http://newlisp.org/index.cgi?find=lutz%20Mueller%20on%20Mon%20Nov%20%207%2017:47:50%202005 </link>

    </item>

    </channel>

</rss>

[/text]

> bt

nil

>
Title:
Post by: pjot on January 07, 2006, 03:48:12 AM
Okay, I found something very interesting.



1) Start a new xTerm, then start newlisp. From the newLisp console, I run this:



(setq url (get-url "http://www.newlisp.org/rss.cgi?News"))



This is the result:
Quote
peter@Solarstriker:~$ newlisp

newLISP v.8.7.6 on linux, execute 'newlisp -h' for more info.



> (setq url (get-url "http://www.newlisp.org/rss.cgi?News"))

peter@Solarstriker:~$


As you see, I arrive back to the Linux prompt immediately, without results.



2) Start a new xTerm, then start newLisp. From the newLisp console, I run this:



(get-url "http://www.newlisp.org/rss.cgi?News")



This is the result:
Quote
peter@Solarstriker:~$ newlisp

newLISP v.8.7.6 on linux, execute 'newlisp -h' for more info.



> (get-url "http://www.newlisp.org/rss.cgi?News")

[text]<?xml version="1.0" encoding="UTF-8"?>

<!-- generator="newLISP Wiki/CMS rss.cgi v. 1.0" -->

<rss version="0.92">

    <channel>

        <title>newLISP</title>

        <description>News and Comments</description>

        <link>http://newlisp.org</link>

        <copyright>copyright (c) Lutz Mueller, 2005. All rights reserved.</copyright>

    <item>

        <title>development version newLISP 8.7.6</title>

        <description></description>

        <link>http://newlisp.org/index.cgi?find=Lutz%20on%20Mon%20Jan%20%202%2019:59:52%202006 </link>

    </item>

    <item>



...... ETCETERA......



2020%2017:01:14%202005 </link>

    </item>

    <item>

        <title>newLISP release version 8.7.1</title>

        <description></description>

        <link>http://newlisp.org/index.cgi?find=lutz%20Mueller%20on%20Mon%20Nov%20%207%2017:47:50%202005 </link>

    </item>

    </channel>

</rss>

[/text]


Look at how the result ends: with a [/text], which is correct. Now, if I run the first query in this same session again, this is the result:


Quote
> (setq url (get-url "http://www.newlisp.org/rss.cgi?News"))

[text]<?xml version="1.0" encoding="UTF-8"?>

<!-- generator="newLISP Wiki/CMS rss.cgi v. 1.0" -->

<rss version="0.92">

    <channel>

        <title>newLISP</title>

        <description>News and Comments</description>

        <link>http://newlisp.org</link>

        <copyright>copyright (c) Lutz Mueller, 2005. All rights reserved.</copyright>

    <item>

        <title>development version newLISP 8.7.6</title>

        <description></description>

        <link>http://newlisp.org/index.cgi?find=Lutz%20on%20Mon%20Jan%20%202%2019:59:52%202006 </link>

    </item>

    <item>

        <title>development version newLISP 8.7.5</title>

        <description></description>



.....ETCETERA.....



    </item>

    <item>

        <title>newLISP release version 8.7.1</title>

        <description></description>

        <link>http://newlisp.org/index.cgi?find=lutz%20Mueller%20on%20Mon%20Nov%20%207%2017:47:50%202005 </link>

    </item>

    </channel>

</rss>

!02005 <á




It seems to work, but look at how the query ends: with !02005<á, instead of [/text].





Peter
Title:
Post by: newdep on January 07, 2006, 03:56:08 AM
yes thats correct I have everytime different chracters just befor [/text]

sometimes highasci sometimes other things..

I cant explain that... a LOCALE issue?
Title:
Post by: pjot on January 07, 2006, 04:07:24 AM
Same problems occur when I compile newLisp WITHOUT support for READLINE.



Peter
Title:
Post by: pjot on January 07, 2006, 04:19:45 AM
Using Valgrind:


Quote
peter@Solarstriker:~$ valgrind --leak-check=full newlisp

==28837== Memcheck, a memory error detector.

==28837== Copyright (C) 2002-2005, and GNU GPL'd, by Julian Seward et al.

==28837== Using LibVEX rev 1471, a library for dynamic binary translation.

==28837== Copyright (C) 2004-2005, and GNU GPL'd, by OpenWorks LLP.

==28837== Using valgrind-3.1.0, a dynamic binary instrumentation framework.

==28837== Copyright (C) 2000-2005, and GNU GPL'd, by Julian Seward et al.

==28837== For more details, rerun with: -v

==28837==

newLISP v.8.7.6 on linux, execute 'newlisp -h' for more info.



> (setq url (get-url "http://www.newlisp.org/rss.cgi?News"))                                                          

==28837== Invalid write of size 1

==28837==    at 0x8062F63: getPutPostUrl (nl-web.c:525)

==28837==    by 0x80625E0: p_getUrl (nl-web.c:179)

==28837==    by 0x804B681: evaluateExpression (newlisp.c:1058)

==28837==    by 0x804F642: setDefine (newlisp.c:3597)

==28837==    by 0x804F486: p_setq (newlisp.c:3516)

==28837==    by 0x804B681: evaluateExpression (newlisp.c:1058)

==28837==    by 0x804AECB: evaluateStream (newlisp.c:855)

==28837==    by 0x804AD19: executeCommandLine (newlisp.c:833)

==28837==    by 0x804A645: main (newlisp.c:686)

==28837==  Address 0x41D7FAC is 0 bytes after a block of size 2,324 alloc'd

==28837==    at 0x401C811: realloc (vg_replace_malloc.c:306)

==28837==    by 0x806312B: getPutPostUrl (nl-web.c:482)

==28837==    by 0x80625E0: p_getUrl (nl-web.c:179)

==28837==    by 0x804B681: evaluateExpression (newlisp.c:1058)

==28837==    by 0x804F642: setDefine (newlisp.c:3597)

==28837==    by 0x804F486: p_setq (newlisp.c:3516)

==28837==    by 0x804B681: evaluateExpression (newlisp.c:1058)

==28837==    by 0x804AECB: evaluateStream (newlisp.c:855)

==28837==    by 0x804AD19: executeCommandLine (newlisp.c:833)

==28837==    by 0x804A645: main (newlisp.c:686)

==28837==

==28837== Invalid read of size 1

==28837==    at 0x401D500: memcpy (mac_replace_strmem.c:394)

==28837==    by 0x804BF74: copyCell (newlisp.c:1485)

==28837==    by 0x804F64A: setDefine (newlisp.c:3597)

==28837==    by 0x804F486: p_setq (newlisp.c:3516)

==28837==    by 0x804B681: evaluateExpression (newlisp.c:1058)

==28837==    by 0x804AECB: evaluateStream (newlisp.c:855)

==28837==    by 0x804AD19: executeCommandLine (newlisp.c:833)

==28837==    by 0x804A645: main (newlisp.c:686)

==28837==  Address 0x41D7FAC is 0 bytes after a block of size 2,324 alloc'd

==28837==    at 0x401C811: realloc (vg_replace_malloc.c:306)

==28837==    by 0x806312B: getPutPostUrl (nl-web.c:482)

==28837==    by 0x80625E0: p_getUrl (nl-web.c:179)

==28837==    by 0x804B681: evaluateExpression (newlisp.c:1058)

==28837==    by 0x804F642: setDefine (newlisp.c:3597)

==28837==    by 0x804F486: p_setq (newlisp.c:3516)

==28837==    by 0x804B681: evaluateExpression (newlisp.c:1058)

==28837==    by 0x804AECB: evaluateStream (newlisp.c:855)

==28837==    by 0x804AD19: executeCommandLine (newlisp.c:833)

==28837==    by 0x804A645: main (newlisp.c:686)




I changed line 525 in 'nl-web.c' to:



*(resultPtr + resultSize - 1) = 0;





Now it works.



Peter
Title:
Post by: pjot on January 07, 2006, 04:32:57 AM
I still have the invalid read though:


Quote
newLISP v.8.7.6 on linux, execute 'newlisp -h' for more info.



>  (setq url (get-url "http://www.newlisp.org/rss.cgi?News"))

==29098== Invalid read of size 1

==29098==    at 0x401D500: memcpy (mac_replace_strmem.c:394)

==29098==    by 0x804C124: copyCell (newlisp.c:1485)

==29098==    by 0x804F7FA: setDefine (newlisp.c:3597)

==29098==    by 0x804F636: p_setq (newlisp.c:3516)

==29098==    by 0x804B831: evaluateExpression (newlisp.c:1058)

==29098==    by 0x804B07B: evaluateStream (newlisp.c:855)

==29098==    by 0x804AEC9: executeCommandLine (newlisp.c:833)

==29098==    by 0x804A800: main (newlisp.c:663)

==29098==  Address 0x4232CC4 is 0 bytes after a block of size 2,324 alloc'd

==29098==    at 0x401C811: realloc (vg_replace_malloc.c:306)

==29098==    by 0x80632DB: getPutPostUrl (nl-web.c:482)

==29098==    by 0x8062790: p_getUrl (nl-web.c:179)

==29098==    by 0x804B831: evaluateExpression (newlisp.c:1058)

==29098==    by 0x804F7F2: setDefine (newlisp.c:3597)

==29098==    by 0x804F636: p_setq (newlisp.c:3516)

==29098==    by 0x804B831: evaluateExpression (newlisp.c:1058)

==29098==    by 0x804B07B: evaluateStream (newlisp.c:855)

==29098==    by 0x804AEC9: executeCommandLine (newlisp.c:833)

==29098==    by 0x804A800: main (newlisp.c:663)


This seems to be caused by the fact that this line in newlisp.c (1485);



memcpy((void *)newCell->contents,(void*)cell->contents, (UINT)cell->aux);





...copies 1 byte too much. So the (UINT)cell-aux is not correct.



Peter
Title:
Post by: Lutz on January 07, 2006, 06:43:32 AM
Can you check if you can see the same thing in 8.7.1? 'get-url' had changes on 8.7.2/3.



Thanks



Lutz
Title:
Post by: Lutz on January 07, 2006, 07:00:26 AM
... and does this happend only with "chunked" pages? You can check this when retrieving with the "header" option and it says "Transfer-Encoding: chunked".



I would do all this by myself, but the problem just doesn't want to show up on other OSs than Slackware.



Lutz
Title:
Post by: pjot on January 07, 2006, 08:05:41 AM
Yes it happens with newLisp 8.7.1 as well, even more:


Quote
peter@Starcrater:~$ valgrind --leak-check=full newlisp

==9346== Memcheck, a memory error detector.

==9346== Copyright (C) 2002-2005, and GNU GPL'd, by Julian Seward et al.

==9346== Using LibVEX rev 1471, a library for dynamic binary translation.

==9346== Copyright (C) 2004-2005, and GNU GPL'd, by OpenWorks LLP.

==9346== Using valgrind-3.1.0, a dynamic binary instrumentation framework.

==9346== Copyright (C) 2000-2005, and GNU GPL'd, by Julian Seward et al.

==9346== For more details, rerun with: -v

==9346==

==9346== Conditional jump or move depends on uninitialised value(s)

==9346==    at 0x804DABB: compileExpression (newlisp.c:2528)

==9346==    by 0x804DCF4: compileExpression (newlisp.c:2596)

==9346==    by 0x804AF6A: evaluateStream (newlisp.c:846)

==9346==    by 0x804D7EB: loadFile (newlisp.c:2437)

==9346==    by 0x804A3E7: loadStartup (newlisp.c:430)

==9346==    by 0x804A796: main (newlisp.c:554)

==9346==

==9346== Conditional jump or move depends on uninitialised value(s)

==9346==    at 0x804DABB: compileExpression (newlisp.c:2528)

==9346==    by 0x804DCF4: compileExpression (newlisp.c:2596)

==9346==    by 0x804DCF4: compileExpression (newlisp.c:2596)

==9346==    by 0x804AF6A: evaluateStream (newlisp.c:846)

==9346==    by 0x804D7EB: loadFile (newlisp.c:2437)

==9346==    by 0x804A3E7: loadStartup (newlisp.c:430)

==9346==    by 0x804A796: main (newlisp.c:554)

==9346==

==9346== Conditional jump or move depends on uninitialised value(s)

==9346==    at 0x804DABB: compileExpression (newlisp.c:2528)

==9346==    by 0x804DCF4: compileExpression (newlisp.c:2596)

==9346==    by 0x804DCF4: compileExpression (newlisp.c:2596)

==9346==    by 0x804DCF4: compileExpression (newlisp.c:2596)

==9346==    by 0x804AF6A: evaluateStream (newlisp.c:846)

==9346==    by 0x804D7EB: loadFile (newlisp.c:2437)

==9346==    by 0x804A3E7: loadStartup (newlisp.c:430)

==9346==    by 0x804A796: main (newlisp.c:554)

newLISP v.8.7.1 on linux, execute 'newlisp -h' for more info.



>  (setq url (get-url "http://www.newlisp.org/rss.cgi?News"))

==9346==

==9346== Invalid write of size 1

==9346==    at 0x8062530: getPutPostUrl (nl-web.c:529)

==9346==    by 0x8061CA0: p_getUrl (nl-web.c:183)

==9346==    by 0x804B76F: evaluateExpression (newlisp.c:1018)

==9346==    by 0x804F6F2: setDefine (newlisp.c:3582)

==9346==    by 0x804F536: p_setq (newlisp.c:3501)

==9346==    by 0x804B76F: evaluateExpression (newlisp.c:1018)

==9346==    by 0x804AFAB: evaluateStream (newlisp.c:850)

==9346==    by 0x804ADF9: executeCommandLine (newlisp.c:828)

==9346==    by 0x804A73B: main (newlisp.c:658)

==9346==  Address 0x4260BE4 is 0 bytes after a block of size 2,324 alloc'd

==9346==    at 0x401C811: realloc (vg_replace_malloc.c:306)

==9346==    by 0x80626CA: getPutPostUrl (nl-web.c:486)

==9346==    by 0x8061CA0: p_getUrl (nl-web.c:183)

==9346==    by 0x804B76F: evaluateExpression (newlisp.c:1018)

==9346==    by 0x804F6F2: setDefine (newlisp.c:3582)

==9346==    by 0x804F536: p_setq (newlisp.c:3501)

==9346==    by 0x804B76F: evaluateExpression (newlisp.c:1018)

==9346==    by 0x804AFAB: evaluateStream (newlisp.c:850)

==9346==    by 0x804ADF9: executeCommandLine (newlisp.c:828)

==9346==    by 0x804A73B: main (newlisp.c:658)

==9346==

==9346== Invalid read of size 1

==9346==    at 0x401D500: memcpy (mac_replace_strmem.c:394)

==9346==    by 0x804C064: copyCell (newlisp.c:1476)

==9346==    by 0x804F6FA: setDefine (newlisp.c:3582)

==9346==    by 0x804F536: p_setq (newlisp.c:3501)

==9346==    by 0x804B76F: evaluateExpression (newlisp.c:1018)

==9346==    by 0x804AFAB: evaluateStream (newlisp.c:850)

==9346==    by 0x804ADF9: executeCommandLine (newlisp.c:828)

==9346==    by 0x804A73B: main (newlisp.c:658)

==9346==  Address 0x4260BE4 is 0 bytes after a block of size 2,324 alloc'd

==9346==    at 0x401C811: realloc (vg_replace_malloc.c:306)

==9346==    by 0x80626CA: getPutPostUrl (nl-web.c:486)

==9346==    by 0x8061CA0: p_getUrl (nl-web.c:183)

==9346==    by 0x804B76F: evaluateExpression (newlisp.c:1018)

==9346==    by 0x804F6F2: setDefine (newlisp.c:3582)

==9346==    by 0x804F536: p_setq (newlisp.c:3501)

==9346==    by 0x804B76F: evaluateExpression (newlisp.c:1018)

==9346==    by 0x804AFAB: evaluateStream (newlisp.c:850)

==9346==    by 0x804ADF9: executeCommandLine (newlisp.c:828)

==9346==    by 0x804A73B: main (newlisp.c:658)


Same problem, line 529 says:

*(resultPtr + resultSize) = 0;


If I add the '-1' the problem is gone. I'll check the 'chunked' issue now.



Peter
Title:
Post by: pjot on January 07, 2006, 08:22:14 AM
I seem not be able to find a  chunked' page. Some other thing is interesting though:


Quote
peter@Starcrater:~$ valgrind --leak-check=full newlisp

==9606== Memcheck, a memory error detector.

==9606== Copyright (C) 2002-2005, and GNU GPL'd, by Julian Seward et al.

==9606== Using LibVEX rev 1471, a library for dynamic binary translation.

==9606== Copyright (C) 2004-2005, and GNU GPL'd, by OpenWorks LLP.

==9606== Using valgrind-3.1.0, a dynamic binary instrumentation framework.

==9606== Copyright (C) 2000-2005, and GNU GPL'd, by Julian Seward et al.

==9606== For more details, rerun with: -v

==9606==

==9606== Conditional jump or move depends on uninitialised value(s)

==9606==    at 0x804DABB: compileExpression (newlisp.c:2528)

==9606==    by 0x804DCF4: compileExpression (newlisp.c:2596)

==9606==    by 0x804AF6A: evaluateStream (newlisp.c:846)

==9606==    by 0x804D7EB: loadFile (newlisp.c:2437)

==9606==    by 0x804A3E7: loadStartup (newlisp.c:430)

==9606==    by 0x804A796: main (newlisp.c:554)

==9606==

==9606== Conditional jump or move depends on uninitialised value(s)

==9606==    at 0x804DABB: compileExpression (newlisp.c:2528)

==9606==    by 0x804DCF4: compileExpression (newlisp.c:2596)

==9606==    by 0x804DCF4: compileExpression (newlisp.c:2596)

==9606==    by 0x804AF6A: evaluateStream (newlisp.c:846)

==9606==    by 0x804D7EB: loadFile (newlisp.c:2437)

==9606==    by 0x804A3E7: loadStartup (newlisp.c:430)

==9606==    by 0x804A796: main (newlisp.c:554)

==9606==

==9606== Conditional jump or move depends on uninitialised value(s)

==9606==    at 0x804DABB: compileExpression (newlisp.c:2528)

==9606==    by 0x804DCF4: compileExpression (newlisp.c:2596)

==9606==    by 0x804DCF4: compileExpression (newlisp.c:2596)

==9606==    by 0x804DCF4: compileExpression (newlisp.c:2596)

==9606==    by 0x804AF6A: evaluateStream (newlisp.c:846)

==9606==    by 0x804D7EB: loadFile (newlisp.c:2437)

==9606==    by 0x804A3E7: loadStartup (newlisp.c:430)

==9606==    by 0x804A796: main (newlisp.c:554)

newLISP v.8.7.1 on linux, execute 'newlisp -h' for more info.



> (setq url (get-url "http://www.newlisp.org/rss.cgi?News" "header"))

"Date: Sat, 07 Jan 2006 19:18:38 GMTrnServer: Apache/1.3.29 (Unix) mod_python/2.7.10 Python/2.2.2 mod_webapp/1.2.0-dev mod_perl/1.29 mod_throttle/3.1.2 PHP/4.3.4rnConnection: closernContent-Type: text/xmlrnrn"


So a 'get-url' with the "header" option shows no memory errors. If I immediately after that perform the get-url WITHOUT the "header" option, I receive the same error again.



Peter
Title:
Post by: pjot on January 07, 2006, 08:31:40 AM
Also retrieving 'normal' webpages (not RSS) show the error of reading and writing 1 byte too much.



I am at my 2nd machine now, also with Slackware 10.2 fresh install.



Maybe you could try to install valgrind yourself to see if it happens also? Sometimes there is no crash so maybe that's why you don't see it?. But Valgrind always show the problem of the extra byte. It should show up on Mandrake and other Linux versions also.



It's free software from www.valgrind.org



Peter
Title:
Post by: newdep on January 07, 2006, 09:05:13 AM
Hi Lutz,



The error message is double free, that means a pointer problem...

It's only this get-url issue, the rest works fine...



Also the garbage inside the output befor [/text] indicates some

strange memory mixup...



Slackware uses pure 100% kernel en library stuff no adjustements,

I changed readlib and ncurses and still exists...tested with console/xterm

other teminals but the problems resists in newlisp get-url.



What about the freshmeat compiler farm? do they have slack 10.2?

And can you reproduce it?



Norman.
Title:
Post by: Lutz on January 07, 2006, 09:39:03 AM
Thanks for all the printouts from valgrind, I think I found the problem.



Also reviewing the code I think that all of the "Conditional jump or move depends on uninitialised value(s)" messages do not reveal a problem. valgrind seems to flag all instances where pointers to uninitialized memory are passed, which is ok when that memory is written by the function receiving the pointer.



Unfortunately the only Linux machines I have to test on, are at sourceforge and behind a firewall without web-access for 'get-url'. If it is Ok, I will send you the next development release before publishing it for checking again with valgrind.



Lutz
Title:
Post by: pjot on January 07, 2006, 09:47:52 AM
Fine, no problem!



Peter
Title:
Post by: Lutz on January 07, 2006, 10:20:57 AM
In version 8.7.6 in file nl-web.c line 482 change:



resultPtr = realloc(resultPtr, resultSize + size);



to



resultPtr = realloc(resultPtr, resultSize + size + 1);



This will solve the problem, the "Transfer-Encoding: chunked" option only shows up with the "debug" option:



(get-url "http://www.newlisp.org/rss.cgi?News" "debug")



I will release 8.7.7 this weekend with 'get-url' fix. This version contains also regular expression support for 'directory'



Lutz



ps: thanks to you and Norman for helping to debug this
Title:
Post by: pjot on January 07, 2006, 10:36:23 AM
Results:


Quote
peter@Starcrater:~$  valgrind --leak-check=full newlisp

==16488== Memcheck, a memory error detector.

==16488== Copyright (C) 2002-2005, and GNU GPL'd, by Julian Seward et al.

==16488== Using LibVEX rev 1471, a library for dynamic binary translation.

==16488== Copyright (C) 2004-2005, and GNU GPL'd, by OpenWorks LLP.

==16488== Using valgrind-3.1.0, a dynamic binary instrumentation framework.

==16488== Copyright (C) 2000-2005, and GNU GPL'd, by Julian Seward et al.

==16488== For more details, rerun with: -v

==16488==

newLISP v.8.7.6 on linux, execute 'newlisp -h' for more info.



> (setq url (get-url "http://www.newlisp.org/rss.cgi?News"))

[text]<?xml version="1.0" encoding="UTF-8"?>

<!-- generator="newLISP Wiki/CMS rss.cgi v. 1.0" -->

<rss version="0.92">

    <channel>

        <title>newLISP</title>

        <description>News and Comments</description>

        <link>http://newlisp.org</link>

        <copyright>copyright (c) Lutz Mueller, 2005. All rights reserved.</copyright>

    <item>

        <title>development version newLISP 8.7.6</title>

        <description></description>

        <link>http://newlisp.org/index.cgi?find=Lutz%20on%20Mon%20Jan%20%202%2019:59:52%202006 </link>

    </item>

    <item>

        <title>development version newLISP 8.7.5</title>

        <description></description>

        <link>http://newlisp.org/index.cgi?find=Lutz%20on%20Fri%20Dec%2023%2017:11:58%202005 </link>

    </item>

    <item>

        <title>development version newLISP 8.7.4</title>

        <description></description>

        <link>http://newlisp.org/index.cgi?find=Lutz%20on%20Mon%20Dec%20%205%2015:14:18%202005 </link>

    </item>

    <item>

        <title>newLISP coding competition</title>

        <description></description>

        <link>http://newlisp.org/index.cgi?find=lutz%20on%20Sat%20Dec%20%203%2002:37:41%202005 </link>

    </item>

    <item>

        <title>Users about newLISP</title>

        <description></description>

        <link>http://newlisp.org/index.cgi?find=Lutz%20on%20Fri%20Dec%20%202%2019:54:41%202005 </link>

    </item>

    <item>

        <title>development version newLISP 8.7.3</title>

        <description></description>

        <link>http://newlisp.org/index.cgi?find=Lutz%20on%20Sun%20Nov%2027%2016:46:06%202005 </link>

    </item>

    <item>

        <title>repost development version newLISP 8.7.2</title>

        <description></description>

        <link>http://newlisp.org/index.cgi?find=Lutz%20on%20Sun%20Nov%2020%2018:58:18%202005 </link>

    </item>

    <item>

        <title>development version newLISP 8.7.2</title>

        <description></description>

        <link>http://newlisp.org/index.cgi?find=Lutz%20Mueller%20on%20Sun%20Nov%2020%2017:01:14%202005 </link>

    </item>

    <item>

        <title>newLISP release version 8.7.1</title>

        <description></description>

        <link>http://newlisp.org/index.cgi?find=lutz%20Mueller%20on%20Mon%20Nov%20%207%2017:47:50%202005 </link>

    </item>

    </channel>

</rss>

[/text]




Conclusion: RUNS LIKE A DREAM!



Also it amazes me that the errors during startup of newLisp are gone. :-)



Thanks!

Peter
Title:
Post by: newdep on January 07, 2006, 10:36:29 AM
That solved the problem thanks!



Still its strange that other linux version dont effect this problem

(probably the default handling of malloc_check)



could be quiet dangerous in some situation just to miss1 byte ;-)



Thanks!



Norman.