edbrowse-dev - development list for edbrowse
 help / color / mirror / Atom feed
From: Geoff McLane <ubuntu@geoffair.info>
To: Edbrowse-dev@lists.the-brannons.com
Subject: Re: [edbrowse-dev] Threads (fwd)
Date: Fri, 30 Aug 2019 21:23:47 +0200	[thread overview]
Message-ID: <f976515e-a41d-df69-8a5c-b2c7b54496dd@geoffair.info> (raw)
In-Reply-To: <20190729170518.eklhad@comcast.net>

Hi Karl,

Not sure about create() and thread safety... since forever I
have been adding a -D_REENTRANT flag to ALL builds, unix & w32...
do I need to add/do anything else? ... have had no trouble
using pthreads in other projects... did just recently update
to ptw32 v.3.0.0... which required a minor CMakeLists.txt change, below...

But anyway did a fetch and rebase to your latest... 1 minor clash...
easily fixed... and the new EXE ran like hell was on fire... with
b www.nasa.gov... lots of downloads, it seems... until it reached
another exception... but different...

In append0(), after many times thru, lots of threads created,
Run-Time Check Failure #2 - Stack around the variable 'e' was corrupted.
This is a stack char e[40], and on inspection after the exception,
contains a string "l{a|000002CDF3254928,#document-fragment "...

The fact that at that moment the buffer ends in a space, 0x20, and
not a null, from sprintf(...) might indicate an overrun... inc'd to 80...
got to native_insbf, with same e[40]... bumped to 80... then 
native_removeChild()...
and I got to the end of the load...
3055

Testing done -
=
191
,p
and got many lines, many of the form '* {...text...}'... some
text like 'h3 Latest NASA Information on Hurricane Dorian... etc...' ...
it looks good...

What to test next? but out of time tonight...

This is very good news, I think... will test more, and
report soonest...

Some other noted items -

1. In w32, using jsdb got an output like
download in background not available on Windows at this time.
Huh? Is that not what pthreads gives us... do not understand...

2. decided to build in ubuntu, but on trying to run ./edbrowse, got -
.ebrc: SSL certificate file /etc/ssl/certs/ComSign_CA.pem does not exist 
or is not readable.
edbrowse ready
b www.nasa.gov
the curl library returned the following error message while performing 
the requested operation: Problem with the SSL CA cert (path? access rights?)
Any help with that appreciated... How can I add what is missing?

3. In unix build, found I had to add pthreads, under unix...
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 5457acd..c0fac06 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -165,9 +165,14 @@ if (WIN32)
              message( FATAL_ERROR "*** Thread libray NOT FOUND!" )
          endif()
      else ()
-        message( FATAL "*** Threads NOT FOUNDunable to proceed")
+        message( FATAL_ERROR "*** Threads NOT FOUND! Unable to proceed")
      endif ()
  endif ()
+if (UNIX)
+    find_package(Threads REQUIRED)
+    list(APPEND add_LIBS ${CMAKE_THREAD_LIBS_INIT})
+    message(STATUS "*** list(APPEND add_LIBS ${CMAKE_THREAD_LIBS_INIT})" )
+endif ()

  if (BUILD_EDBR_ODBC) # if the user OPTION ON
      # This module defines

4. Also a small Windows change for CMakeLists.txt, for pthreads update 
to 3.0.0...
remove the kludge of defining HAVE_STRUCT_TIMESPEC, since the ptw32 now 
take care
of that...

And of course the question why such small fixed buffers like e[40], in 
jseng-duk.c.
Anything wrong with making this 80, or something... maybe snprintf 
instead...

Regards, Geoff.


  reply	other threads:[~2019-08-30 19:23 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 [this message]
2019-08-30 21:26         ` Karl Dahlke
2019-08-30 22:08         ` Karl Dahlke
2019-08-31 19:05           ` Geoff McLane
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=f976515e-a41d-df69-8a5c-b2c7b54496dd@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).