From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-wr1-x441.google.com (mail-wr1-x441.google.com [IPv6:2a00:1450:4864:20::441]) by hurricane.the-brannons.com (Postfix) with ESMTPS id 6C468779C1 for ; Fri, 30 Aug 2019 12:23:53 -0700 (PDT) Received: by mail-wr1-x441.google.com with SMTP id j16so8015026wrr.8 for ; Fri, 30 Aug 2019 12:23:53 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=geoffair-info.20150623.gappssmtp.com; s=20150623; h=subject:to:references:from:message-id:date:user-agent:mime-version :in-reply-to:content-transfer-encoding:content-language; bh=kcVti3DD8lQRCGO1qQ6bFn+OpvO4fCcipwQcCK1LJXE=; b=bbf+L7+yMS9LXJ1IBCHZSrl5ql71pzKLefODyrKYArPcwVjUfC4Jrj8ka5n96aewKf rO9QOVTHxuHCWZH+0QP0JEulOVWp2wNi/ZQaiyBg8Zb4z3RO3LC48j355FrbYHkfuX1W dyomOhm4wx6h9cOPQGeAaVo3kZGlzj3qv2iegP9kaEF1HaWifaKfhCvX2+Xp4FPvTfd5 1kDxEfalNWlJ1b6VgdH5poAYGhE6KU/o55Hi8Huz90VTh1RCzexkxVTBixPbH13n60DA +17My6p4U9wwR3hTy/A7WMRUy7pScx6KC+NHKGrKSVMrl1JRd0Ap+aYhmwLAyQUp42hV k6nQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-transfer-encoding :content-language; bh=kcVti3DD8lQRCGO1qQ6bFn+OpvO4fCcipwQcCK1LJXE=; b=dxAMkIMdSwGNBUkcdjO2hZ3ITKQ8owXbVZ+75wmppjRT3L7WzxLhNV3wZ9bmUBJ5VU Qj/h94lhjLozEcPIBLRiFlU3sZ0yQ2oYecCgDeU+6YnJEpUzZtBphXo20lQnmU3fgGA+ Y5PTB5xulQJCgPDNa8xbBH5VHEqoC+8DC42fwCe47IWXvjVykdbEu7BcqDf9NVnuR3Qu TjbXaw+ZWZNqrz2H2kQs1PnoNn4BE7GYdpje2X5/JDpKDwekYAJ9vOCklTB6U+XP8UT8 XgatD8Sp+hs2VKoHsmW3rXs/FY9ETPHCqR9AuB9u1viGZh1C89keh5CJQGR09NkIcWIq xEiQ== X-Gm-Message-State: APjAAAX3NzGyGDTfo0H4SaxuFbYwtd6xpL8J6JBsCF89ZJGFaINFR9dA YUtfvqJtDQa71RtIQinUKcZTV8r62jA= X-Google-Smtp-Source: APXvYqyOEcKodPEjKQn89b6eotzDf0yNlx8LgB3qcLRLmX1j8C2xJCvoIt8mx4YWMI1Pe/c5A1asOw== X-Received: by 2002:a5d:4708:: with SMTP id y8mr1681928wrq.318.1567193029621; Fri, 30 Aug 2019 12:23:49 -0700 (PDT) Received: from [192.168.1.16] (lfbn-idf2-1-265-150.w82-123.abo.wanadoo.fr. [82.123.105.150]) by smtp.googlemail.com with ESMTPSA id c9sm4613187wrv.40.2019.08.30.12.23.48 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 30 Aug 2019 12:23:48 -0700 (PDT) Subject: Re: [edbrowse-dev] Threads (fwd) To: Edbrowse-dev@lists.the-brannons.com References: <313edde4-d7d6-23d0-fb07-65d5558fb64f@geoffair.info> <20190729170518.eklhad@comcast.net> From: Geoff McLane Message-ID: Date: Fri, 30 Aug 2019 21:23:47 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.8.0 X-BeenThere: edbrowse-dev@edbrowse.org List-Id: Edbrowse Development List MIME-Version: 1.0 In-Reply-To: <20190729170518.eklhad@comcast.net> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit Content-Language: en-US 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.