From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00 autolearn=ham autolearn_force=no version=3.4.4 X-Google-Thread: 103376,51cac8d4f3a458ad X-Google-Attributes: gid103376,public X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news1.google.com!news4.google.com!news.glorb.com!border1.nntp.dca.giganews.com!nntp.giganews.com!local01.nntp.dca.giganews.com!nntp.comcast.com!news.comcast.com.POSTED!not-for-mail NNTP-Posting-Date: Sun, 03 Apr 2005 13:08:49 -0500 From: tmoran@acm.org Newsgroups: comp.lang.ada Subject: Re: GNAT.Sockets Segfault in a task References: X-Newsreader: Tom's custom newsreader Message-ID: <7vedncmB7JKsrM3fRVn-iw@comcast.com> Date: Sun, 03 Apr 2005 13:08:49 -0500 NNTP-Posting-Host: 67.161.24.234 X-Trace: sv3-q2aRO9MPGy4UgKT5NEjkC6CQQXS9Y5/wGf58hq3IyrGFzi+DuUT4qGPhxkqZyTMOH7gcSzrPtMg+FrY!OOsi4eRVPLaDVgtvh/bi1VtcEmBeJNquSmQWwSuAUp9URU6FDe03V7rX6/ZdjA== X-Complaints-To: abuse@comcast.net X-DMCA-Complaints-To: dmca@comcast.net X-Abuse-and-DMCA-Info: Please be sure to forward a copy of ALL headers X-Abuse-and-DMCA-Info: Otherwise we will be unable to process your complaint properly X-Postfilter: 1.3.32 Xref: g2news1.google.com comp.lang.ada:10265 Date: 2005-04-03T13:08:49-05:00 List-Id: > At httpd.adb, line 81, I've "Message:String := String'Input(Channel);" Was the data written by a String'Output compiled by the same compiler for the same kind of machine? 'Input expects to get first the bounds, then the content, of the string. The format of the bounds part is not specified by the language, ie, it's compiler dependent. Perhaps the incoming data didn't contain any bounds and String'Input was interpreting the first few characters as bounds, with disastrous result? If these are strings, are they from RFC 822 style data where string termination is by CRLF? In that case you need to do reads into a buffer and concatenate/cut at CRLFs to make separate strings. You could make Channel of a child of Root_Stream_Type and write your function RFC822_Input and "for String'Input use RFC822_Input;" >Thanks. I resolved the problem with using STREAM :). Going to the low level suggests you know, independently, at least the length of the string. If the bounds are First and Last, you could: declare Message : String(First .. Last); begin String'Read(Channel, Message); ...