From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on inbox.vuxu.org X-Spam-Level: X-Spam-Status: No, score=-0.0 required=5.0 tests=T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.4 Received: (qmail 12610 invoked from network); 15 Dec 2023 10:22:22 -0000 Received: from 9front.inri.net (168.235.81.73) by inbox.vuxu.org with ESMTPUTF8; 15 Dec 2023 10:22:22 -0000 Received: from sirjofri.de ([5.45.105.127]) by 9front; Fri Dec 15 05:21:17 -0500 2023 Received: from dummy.faircode.eu ([31.16.254.78]) by sirjofri.de; Fri Dec 15 11:21:09 +0100 2023 Date: Fri, 15 Dec 2023 11:21:07 +0100 (GMT+01:00) From: sirjofri To: 9front@9front.org Message-ID: <774b7167-1cec-47b6-9c06-bd631abb0ed7@sirjofri.de> In-Reply-To: References: MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Correlation-ID: <774b7167-1cec-47b6-9c06-bd631abb0ed7@sirjofri.de> List-ID: <9front.9front.org> List-Help: X-Glyph: ➈ X-Bullshit: distributed SOAP over SSL database-oriented markup Subject: Re: [9front] prof profiler changing program result Reply-To: 9front@9front.org Precedence: bulk 13.12.2023 04:30:51 Amavect : > On Sat, Dec 9, 2023 at 12:30=E2=80=AFPM sirjofri wrote: >> today I did an implementation of mandelbrot and learned to use prof to p= rofile my program. >> I noticed that the mandelbrot result is different when linked using -p. >> Instead of the nice mandelbrot image I get a circle (but still with lots= of details). >> Funnily enough, julia seems to work better. > You have uninitialized variables. > I guess kencc doesn't warn if you don't fully initialize a struct. > Acid showed me that SetParams params was initialized differently by > the time it reaches generate(). > The .julia field gets an uninitialized value of 0 without -p, and an > uninitialized value of 1 with -p. > After setting a zero struct initializer {0}, the mandelbrot generates cor= rectly. > After setting a struct initializer {1}, the mandelbrot generates > incorrectly in the same way. Good catch, I didn't think about that. I fixed my program now and it works, thank you for pointing it out. sirjofri