From: Geoff McLane <ubuntu@geoffair.info>
To: Edbrowse-dev@lists.the-brannons.com
Subject: Re: [edbrowse-dev] Threads (fwd)
Date: Sat, 31 Aug 2019 21:05:01 +0200 [thread overview]
Message-ID: <3f5e0abd-ae6e-746c-3d95-78d3882f66a8@geoffair.info> (raw)
In-Reply-To: <20190730180859.eklhad@comcast.net>
Hi Karl,
Yes, the overrun has nothing to do with threading... I only ran into it
running the special MSVC Debug build, which has a special prologue to write
a marker, like oxcc, to ALL stack variable, and an epilogue that checks
for invasions...
of various types... very special case...
And since in this case it seemed just by 1 byte, although there could have
been others, which 'normally' will not cause a problem, so long as it is
not killing a variable still in use, then the results are totally
unpredictable...
Maybe will not have time tonight to pull and test your latest...
Ok, concerning 'creat()', I too think this system call would be 100%
thread safe,
why not? so I did what you suggested - found some simple code here -
https://www.technical-recipes.com/2016/using-posix-threads-in-microsoft-visual-studio/
... copied in your 'creat(buf, 0666)'... into the perform_work thread...
and BANG got
an exception...
I was overlooking your permission value... 0666... the exception is an
'invalid parameter'
dialog... when I replace that with '_S_IREAD | _S_IWRITE', 0x0180,
everything ran smooth...
5 threads create, 5 temp files created... no problems...
So this solves it in my mind... what about you?
Will get to a pull soonest...
Regards, Geoff.
next prev parent reply other threads:[~2019-08-31 19:05 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-08-28 5:46 Kevin Carhart
2019-08-28 6:25 ` Karl Dahlke
2019-08-29 3:23 ` Kevin Carhart
2019-08-29 19:46 ` Geoff McLane
2019-08-29 21:05 ` Karl Dahlke
2019-08-30 19:23 ` Geoff McLane
2019-08-30 21:26 ` Karl Dahlke
2019-08-30 22:08 ` Karl Dahlke
2019-08-31 19:05 ` Geoff McLane [this message]
2019-09-01 2:58 Kevin Carhart
2019-09-01 3:04 ` Karl Dahlke
2019-09-01 18:37 ` Geoff McLane
2019-09-02 2:48 ` Karl Dahlke
2019-09-02 18:38 ` Geoff McLane
2019-09-02 18:53 ` Karl Dahlke
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=3f5e0abd-ae6e-746c-3d95-78d3882f66a8@geoffair.info \
--to=ubuntu@geoffair.info \
--cc=Edbrowse-dev@lists.the-brannons.com \
/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).