TIP: Click on subject to list as thread! ANSI
echo: rberrypi
to: R.WIESER
from: WOUTER VERHELST
date: 2019-02-25 10:55:00
subject: Re: C is not a low level

On 25/02/2019 10:41, R.Wieser wrote:
> Wouter,
>
>> Except that strn... is not guaranteed to be thread-safe.
>
> You mean that the other thread could throw the string away and invalidate
> the memory, causing "strn..." to try to access memory thats not available
> anymore ?    True.   But thats a whole other can of worms.

That too.

Also that between strn... starting to do its operation and finishing it,
another thread might have grown (or shrunk) the string.

> Besides, the resulting exception/crash would be a whole lot better than the
> silent memory overrun a non-terminated string c|would cause. :-)

Sure.

--- SoupGate-Win32 v1.05
* Origin: Agency HUB, Dunedin - New Zealand | FidoUsenet Gateway (3:770/3)

SOURCE: echomail via QWK@docsplace.org

Email questions or comments to sysop@ipingthereforeiam.com
All parts of this website painstakingly hand-crafted in the U.S.A.!
IPTIA BBS/MUD/Terminal/Game Server List, © 2025 IPTIA Consulting™.