From: Amavect <amavect@gmail.com>
To: 9front@9front.org
Subject: Re: [9front] prof profiler changing program result
Date: Tue, 12 Dec 2023 21:28:00 -0600 [thread overview]
Message-ID: <CAGOW0YMMYgj8587bfUcuSKnYn+j51BrhcxMg67jTpFXXR97jfg@mail.gmail.com> (raw)
In-Reply-To: <c27b29a0-d34e-4f53-898f-718797a46ca4@sirjofri.de>
On Sat, Dec 9, 2023 at 12:30 PM sirjofri <sirjofri+ml-9front@sirjofri.de> wrote:
>today I did an implementation of mandelbrot and learned to use prof to profile 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 correctly.
After setting a struct initializer {1}, the mandelbrot generates
incorrectly in the same way.
Thanks,
Amavect
next prev parent reply other threads:[~2023-12-13 3:30 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-12-09 18:29 sirjofri
2023-12-09 19:05 ` Steve Simon
2023-12-13 3:28 ` Amavect [this message]
2023-12-15 10:21 ` sirjofri
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=CAGOW0YMMYgj8587bfUcuSKnYn+j51BrhcxMg67jTpFXXR97jfg@mail.gmail.com \
--to=amavect@gmail.com \
--cc=9front@9front.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).