Re: [fpc-devel] certificate verify issue of tfphttpclient with openssl

2020-08-22 Thread Michael Van Canneyt via fpc-devel
On Sun, 23 Aug 2020, baldzhang via fpc-devel wrote: At 2020-08-22 06:28:55, "Michael Van Canneyt via fpc-devel" wrote: On Sat, 22 Aug 2020, baldzhang via fpc-devel wrote: Patch checked and applied in rev. 46540 谢谢您,这个很有用! Michael. Thanks for the hard work of pascal team :) Is this pos

Re: [fpc-devel] certificate verify issue of tfphttpclient with openssl

2020-08-22 Thread baldzhang via fpc-devel
At 2020-08-22 06:28:55, "Michael Van Canneyt via fpc-devel" wrote: > >On Sat, 22 Aug 2020, baldzhang via fpc-devel wrote: > >Patch checked and applied in rev. 46540 > >谢谢您,这个很有用! > >Michael. Thanks for the hard work of pascal team :) Is this possible to merge back to 3.2 ? BTW: Very surprised w

Re: [fpc-devel] TThread.Terminate;

2020-08-22 Thread Sven Barth via fpc-devel
Am 22.08.2020 um 18:45 schrieb Jonas Maebe via fpc-devel: On 22/08/2020 17:39, Martin Frb via fpc-devel wrote: I guess the "Terminate" field is actually about cache coherency. Yes, but as mentioned earlier it's in general completely useless to force the overhead of cache coherency for it. By de

Re: [fpc-devel] TThread.Terminate;

2020-08-22 Thread Jonas Maebe via fpc-devel
On 22/08/2020 17:39, Martin Frb via fpc-devel wrote: > I guess the "Terminate" field is actually about cache coherency. Yes, but as mentioned earlier it's in general completely useless to force the overhead of cache coherency for it. By design it's not something that will be checked immediately af

Re: [fpc-devel] TThread.Terminate;

2020-08-22 Thread Jonas Maebe via fpc-devel
On 22/08/2020 17:39, Martin Frb via fpc-devel wrote: > Is there some really good article (better than the wikipedia > https://en.wikipedia.org/wiki/Memory_barrier) on > > - memory barrier > vs > - cache coherency > vs > interlocked > ? I think https://www.kernel.org/doc/Documentation/memory-barri

Re: [fpc-devel] TThread.Terminate;

2020-08-22 Thread Martin Frb via fpc-devel
On 22/08/2020 17:39, Martin Frb via fpc-devel wrote: Is there some really good article (better than the wikipedia https://en.wikipedia.org/wiki/Memory_barrier) on - memory barrier vs - cache coherency vs interlocked ? From what I found: https://stackoverflow.com/questions/30958375/memory-bar

Re: [fpc-devel] TThread.Terminate;

2020-08-22 Thread Martin Frb via fpc-devel
Is there some really good article (better than the wikipedia https://en.wikipedia.org/wiki/Memory_barrier) on - memory barrier vs - cache coherency vs interlocked ? On 22/08/2020 16:57, Jonas Maebe via fpc-devel wrote: Very important: InterlockedExchange is not a memory barrier, except on x8

Re: [fpc-devel] TThread.Terminate;

2020-08-22 Thread Jonas Maebe via fpc-devel
On 22/08/2020 16:09, Martin via fpc-devel wrote: > procedure TThread.Terminate; > begin >   FTerminated := True; > end; > > Should that not in some way deal with memory barriers? E.g. > InterlockedExchange or similar? Very important: InterlockedExchange is not a memory barrier, except on x86. >

[fpc-devel] TThread.Terminate;

2020-08-22 Thread Martin via fpc-devel
procedure TThread.Terminate; begin   FTerminated := True; end; Should that not in some way deal with memory barriers? E.g. InterlockedExchange or similar? And the same for the "Terminated" property, should that have a getter to do the same? As it stands, afaik a thread could get the "Termin

Re: [fpc-devel] Dwarf and "Result"

2020-08-22 Thread Martin Frb via fpc-devel
On 22/08/2020 13:54, Jonas Maebe via fpc-devel wrote: Lowercase variables cannot be accessed directly by Pascal code, and only by the compiler itself (or through absolute aliases). Gdb shows all 3 values in the locals -stack-list-locals So the double "result"/"RESULT" is irritating. Anyway it

Re: [fpc-devel] Exact details for RTLeventWaitFor and related ?

2020-08-22 Thread Martin Frb via fpc-devel
On 22/08/2020 03:50, Kirinn via fpc-devel wrote: When I researched synchronisation behavior and wrote the wiki page "Threads", I found that RTL events behave like this: - When the event is set, a single waiting thread is released (in FIFO order), and the event is automatically immediately rese

Re: [fpc-devel] Dwarf and "Result"

2020-08-22 Thread Jonas Maebe via fpc-devel
On 19/08/2020 20:01, Martin via fpc-devel wrote: > I just noted (testing with 3.3.1 from 2 or 3days ago) that -gw adds 3 > variables for result > "result" > "FUNCTIONNAME" > "RESULT" > > Why an upper, and lowercase result? "result" is the actual function result parameter. "FUNCTIONNAME" is an al

Re: [fpc-devel] Exact details for RTLeventWaitFor and related ?

2020-08-22 Thread Sven Barth via fpc-devel
Am 22.08.2020 um 07:06 schrieb Pascal Riekenberg via fpc-devel: Kirinn via fpc-devel hat am 22. August 2020 um 03:50 geschrieben: For set/reset counting we'd need a semaphore instead of an RTL event, but I don't think we have an actively supported semaphore implementation at this time. I can

Re: [fpc-devel] Exact details for RTLeventWaitFor and related ?

2020-08-22 Thread Sven Barth via fpc-devel
Am 22.08.2020 um 02:44 schrieb Martin via fpc-devel: I am tracing a race condition in lazCollections TLazThreadedQueue on win-64 What is supposed to happen in the following case: 2 or more threads are waiting on the some event   RTLeventWaitFor(UniqueEvent) 1 thread sets it   RTLeventSetEvent(