message
stringlengths
6
474
diff
stringlengths
8
5.22k
Fixup ctime test.
@@ -1000,6 +1000,7 @@ void testbound_selftest(void) tb_assert( v && strcmp(v, "1ww2ww3") == 0); free(v); +#ifndef USE_WINSOCK v = macro_process(store, NULL, "it is ${ctime 123456}"); tb_assert( v && strcmp(v, "it is Fri Jan 2 10:17:36 1970") == 0); free(v); @@ -1013,6 +1014,7 @@ void testbound_selftest(void) v = macro_process(store, NULL, "it is ${ctime $t1}"); tb_assert( v && strcmp(v, "it is Fri Jan 2 10:17:36 1970") == 0); free(v); +#endif /* WINSOCK */ r = macro_assign(store, "x", "1"); tb_assert(r);
flash_encryption: Fix next spi boot crypt counter value after a plaintext flash
@@ -264,8 +264,8 @@ static esp_err_t encrypt_flash_contents(uint32_t spi_boot_crypt_cnt, bool flash_ /* Set least significant 0-bit in spi_boot_crypt_cnt */ int ffs_inv = __builtin_ffs((~spi_boot_crypt_cnt) & 0x7); /* ffs_inv shouldn't be zero, as zero implies spi_boot_crypt_cnt == 0xFF */ - uint32_t new_spi_boot_crypt_cnt = spi_boot_crypt_cnt + (1 << (ffs_inv - 1)); - ESP_LOGD(TAG, "SPI_BOOT_CRYPT_CNT 0x%x -> 0x%x", spi_boot_crypt_cnt, new_spi_boot_crypt_cnt); + uint32_t new_spi_boot_crypt_cnt = (1 << (ffs_inv - 1)); + ESP_LOGD(TAG, "SPI_BOOT_CRYPT_CNT 0x%x -> 0x%x", spi_boot_crypt_cnt, new_spi_boot_crypt_cnt + spi_boot_crypt_cnt); esp_efuse_write_field_blob(ESP_EFUSE_SPI_BOOT_CRYPT_CNT, &new_spi_boot_crypt_cnt, 3);
usb.h: define some stlink usb pid macros, stop copypasting. ease v1/v2/v2.1/v3 identification and supported devices filtering
@@ -29,6 +29,24 @@ extern "C" { #define STLINK_USB_PID_STLINK_V3S_PID 0x374f #define STLINK_USB_PID_STLINK_V3_2VCP_PID 0x3753 +#define STLINK_V1_USB_PID(pid) ((pid) == STLINK_USB_PID_STLINK ) + +#define STLINK_V2_USB_PID(pid) ((pid) == STLINK_USB_PID_STLINK_32L || \ + (pid) == STLINK_USB_PID_STLINK_32L_AUDIO || \ + (pid) == STLINK_USB_PID_STLINK_NUCLEO) + +#define STLINK_V2_1_USB_PID(pid) ( (pid) == STLINK_USB_PID_STLINK_V2_1 ) + +#define STLINK_V3_USB_PID(pid) ((pid) == STLINK_USB_PID_STLINK_V3_USBLOADER || \ + (pid) == STLINK_USB_PID_STLINK_V3E_PID || \ + (pid) == STLINK_USB_PID_STLINK_V3S_PID || \ + (pid) == STLINK_USB_PID_STLINK_V3_2VCP_PID ) + +#define STLINK_SUPPORTED_USB_PID(pid) ( STLINK_V1_USB_PID(pid) || \ + STLINK_V2_USB_PID(pid) || \ + STLINK_V2_1_USB_PID(pid) || \ + STLINK_V3_USB_PID(pid)) + #define STLINK_SG_SIZE 31 #define STLINK_CMD_SIZE 16
TASH: Add cond and endcond for whole APIs There is no testcase for TASH. But actually, user needs these APIs. Before making testcase, let's mark cond..endcond.
* language governing permissions and limitations under the License. * ****************************************************************************/ +///@cond /** * @defgroup TASH SHELL * @brief Provides APIs for shell (TASH - TinyAra SHell) @@ -88,7 +89,6 @@ int tash_cmd_install(const char *str, TASH_CMD_CALLBACK cb, int thread_exec); void tash_cmdlist_install(const tash_cmdlist_t list[]); /** - * @cond * @internal */ /** @@ -97,9 +97,6 @@ void tash_cmdlist_install(const tash_cmdlist_t list[]); * @return On success, 0 is returned. On failure, negative value is returned. */ int tash_start(void); -/** - * @endcond - */ #if defined(CONFIG_TASH_COMMAND_INTERFACE) /** @@ -129,3 +126,4 @@ int tash_get_cmdpair(char *str, TASH_CMD_CALLBACK *cb, int index); #endif /*CONFIG_TASH_COMMAND_INTERFACE */ #endif /*__APPS_INCLUDE_SHELL_TASH_H*/ +///@endcond
doc: fix OPENSSL_VERSION_NUMBER length in the synopsis The number has 8 digits (not 9). It is a single integer `0xMNN00PP0L`.
@@ -41,7 +41,7 @@ OpenSSL_version_num, OPENSSL_info Deprecated: /* from openssl/opensslv.h */ - #define OPENSSL_VERSION_NUMBER 0xnnnnnnnnnL + #define OPENSSL_VERSION_NUMBER 0xnnnnnnnnL /* from openssl/crypto.h */ unsigned long OpenSSL_version_num();
Move safer_memcmp to psa_crypto_core.h Same change as made by Steven Cooreman, although not yet merged.
#include "mbedtls/gcm.h" #include "mbedtls/error.h" -/* Constant-time buffer comparison. This is duplication of code from - * psa_crypto.c, but has nowhere private I can put it for the minute. Really - belongs in the constant time module, when that gets implemented */ -static inline int safer_memcmp( const uint8_t *a, const uint8_t *b, size_t n ) -{ - size_t i; - unsigned char diff = 0; - - for( i = 0; i < n; i++ ) - diff |= a[i] ^ b[i]; - - return( diff ); -} - - static psa_status_t psa_aead_setup( mbedtls_psa_aead_operation_t *operation, const psa_key_attributes_t *attributes, @@ -1014,7 +999,8 @@ psa_status_t mbedtls_psa_aead_verify( mbedtls_psa_aead_operation_t *operation, { *plaintext_length = finish_output_size; - if( do_tag_check && safer_memcmp(tag, check_tag, tag_length) != 0 ) + if( do_tag_check && + mbedtls_psa_safer_memcmp(tag, check_tag, tag_length) != 0 ) { status = PSA_ERROR_INVALID_SIGNATURE; }
cache: add key for cache path
@@ -26,6 +26,7 @@ struct _cacheHandle { KeySet * modules; Key * cacheParent; + Key * cachePath; Plugin * resolver; Plugin * cacheStorage; }; @@ -40,17 +41,20 @@ int elektraCacheOpen (Plugin * handle, Key * errorKey ELEKTRA_UNUSED) ch->modules = ksNew (0, KS_END); elektraModulesInit (ch->modules, 0); ch->cacheParent = keyNew ("user/elektracache", KEY_CASCADING_NAME, KEY_VALUE, "other.mmap", KEY_END); + ch->cachePath = keyNew (0, KEY_END); - KeySet * resolverConfig = ksNew (5, keyNew ("user/path", KEY_VALUE, "/.cache/cache.mmap", KEY_END), KS_END); + KeySet * resolverConfig = ksNew (5, keyNew ("user/path", KEY_VALUE, "/.cache/elektracache/tmp", KEY_END), KS_END); ch->resolver = elektraPluginOpen (KDB_RESOLVER, ch->modules, resolverConfig, ch->cacheParent); if (!ch->resolver) { elektraModulesClose (ch->modules, 0); ksDel (ch->modules); keyDel (ch->cacheParent); + keyDel (ch->cachePath); elektraFree (ch); return ELEKTRA_PLUGIN_STATUS_ERROR; } + ch->resolver->global = elektraPluginGetGlobalKeySet (handle); KeySet * mmapstorageConfig = ksNew (0, KS_END); ch->cacheStorage = elektraPluginOpen (KDB_CACHE_STORAGE, ch->modules, mmapstorageConfig, ch->cacheParent); @@ -60,9 +64,11 @@ int elektraCacheOpen (Plugin * handle, Key * errorKey ELEKTRA_UNUSED) elektraModulesClose (ch->modules, 0); ksDel (ch->modules); keyDel (ch->cacheParent); + keyDel (ch->cachePath); elektraFree (ch); return ELEKTRA_PLUGIN_STATUS_ERROR; } + ch->cacheStorage->global = elektraPluginGetGlobalKeySet (handle); elektraPluginSetData (handle, ch); return ELEKTRA_PLUGIN_STATUS_SUCCESS; @@ -81,6 +87,7 @@ int elektraCacheClose (Plugin * handle, Key * errorKey ELEKTRA_UNUSED) elektraModulesClose (ch->modules, 0); ksDel (ch->modules); keyDel (ch->cacheParent); + keyDel (ch->cachePath); elektraFree (ch); elektraPluginSetData (handle, 0); @@ -113,8 +120,11 @@ int elektraCacheGet (Plugin * handle ELEKTRA_UNUSED, KeySet * returned, Key * pa CacheHandle * ch = elektraPluginGetData (handle); ch->resolver->kdbGet (ch->resolver, returned, ch->cacheParent); - ELEKTRA_LOG_DEBUG ("cacheParent name: %s", keyName (ch->cacheParent)); - ELEKTRA_LOG_DEBUG ("cacheParent value: %s", keyString (ch->cacheParent)); + keySetName (ch->cachePath, keyString (ch->cacheParent)); + keySetBaseName (ch->cachePath, "some/deeper/dir/cache.mmap"); + + ELEKTRA_LOG_DEBUG ("cachePath name: %s", keyName (ch->cachePath)); + ELEKTRA_LOG_DEBUG ("cachePath value: %s", keyString (ch->cachePath)); return ELEKTRA_PLUGIN_STATUS_NO_UPDATE; }
chat-hook: fix another poke-import issue
=/ sty=state-10 :* %10 (remake-map ;;((tree [path ship]) +<.arc)) - ;;(? +<-.arc) + ;;(? +>-.arc) (remake-map ;;((tree [path ?]) +>+.arc)) == :_ sty
session_client DOC clarification
@@ -548,6 +548,8 @@ int nc_session_ntf_thread_running(const struct nc_session *session); /** * @brief Receive NETCONF RPC reply. * + * @note This function can be called in a single thread only. + * * @param[in] session NETCONF session from which the function gets data. It must be the * client side session object. * @param[in] rpc Original RPC this should be the reply to.
change incorrectly documented output types
@@ -21,6 +21,7 @@ _swaymsg_ [options...] [message] *-p, --pretty* Use pretty output even when not using a tty. + Not available for all message types. *-q, --quiet* Sends the IPC message but does not print the response from sway. @@ -60,20 +61,20 @@ _swaymsg_ [options...] [message] _swaymsg -- mark --add test_ instead of _swaymsg mark --add test_. *get\_workspaces* - Gets a JSON-encoded list of workspaces and their status. + Gets a list of workspaces and their status. *get\_inputs* - Gets a JSON-encoded list of current inputs. + Gets a list of current inputs. *get\_outputs* - Gets a JSON-encoded list of current outputs. + Gets a list of current outputs. *get\_tree* Gets a JSON-encoded layout tree of all open windows, containers, outputs, workspaces, and so on. *get\_seats* - Gets a JSON-encoded list of all seats, + Gets a list of all seats, its properties and all assigned devices. *get\_marks* @@ -83,7 +84,7 @@ _swaymsg_ [options...] [message] Get a JSON-encoded configuration for swaybar. *get\_version* - Get JSON-encoded version information for the running instance of sway. + Get version information for the running instance of sway. *get\_binding\_modes* Gets a JSON-encoded list of currently configured binding modes. @@ -92,7 +93,7 @@ _swaymsg_ [options...] [message] Gets JSON-encoded info about the current binding state. *get\_config* - Gets a JSON-encoded copy of the current configuration. + Gets a copy of the current configuration. Doesn't expand includes. *send\_tick* Sends a tick event to all subscribed clients.
dill: stop sending extra arvo move
[~ ..^$] :: this lets lib/helm send %heft a la |mass :: - =/ not=note-dill - ?:(?=([%crud %hax-heft ~] p.task) [%heft ~] p.task) - [[u.hey.all %slip %d not]~ ..^$] + =? p.task ?=([%crud %hax-heft ~] p.task) [%heft ~] + :: + $(hen u.hey.all, wrapped-task p.task) :: a %sunk notification from %jail comes in on an unfamiliar duct :: ?: ?=(%sunk -.task)
Catch error out on NULL condition for churl_init_download.
@@ -108,6 +108,8 @@ static void process_request(ClientContext* client_context, char *uri) print_http_headers(client_context->http_headers); client_context->handle = churl_init_download(uri, client_context->http_headers); + if (client_context->handle == NULL) + elog(ERROR, "Unsuccessful connection to uri: %s", uri); memset(buffer, 0, RAW_BUF_SIZE); resetStringInfo(&(client_context->the_rest_buf));
separate artifacts for each build_type
@@ -40,7 +40,7 @@ jobs: - uses: actions/upload-artifact@v2 if: failure() with: - name: build-artifact-ubuntu18 + name: build-artifact-ubuntu18-${{ matrix.build_type }} path: builddir/meson-logs/ build_fedora: @@ -79,7 +79,7 @@ jobs: - uses: actions/upload-artifact@v2 if: failure() with: - name: build-artifact-fedora-latest + name: build-artifact-fedora-latest-${{ matrix.build_type }} path: builddir/meson-logs/ checkoss:
I updated FAQ 23 with the latest list of compilers to use when building VisIt. This resolves
</ul> <h2>23. Which compilers can be used to build VisIt? </h2> -<p>The following compilers can be used to build VisIt on the listed platforms, though this is not an exhaustive list and newer versions of these compilers often work. In general, any g++ 4.x series compiler will build VisIt just fine. Earlier versions of g++ will also usually work. </p> +<p>The following compilers can be used to build VisIt on the listed platforms, though this is not an exhaustive list and newer versions of these compilers often work.</p> <table class="table table-striped" border="0" align="center" cellpadding="3" cellspacing="1"> <tbody> <tr> <th width="15%">Platform </th> <th width="65%">Compiler</th> </tr> - <tr> - <td>AIX 5.3</td> - <td>xlC </td> - </tr> <tr> <td>Linux</td> - <td>g++ 4.0 or later</td> + <td>g++ 4.4 or later, g++ 4.8 or later when building FastBit</td> </tr> <tr> <td>Windows XP,Vista,7</td> - <td>Microsoft Visual Studio .Net 2003, or .Net 2005 (Visual Studio 2010 support coming)</td> + <td>Microsoft Visual Studio 2012</td> + </tr> + <tr> + <td>MacOS X 10.8.5</td> + <td>g++ 4.2 or later</td> </tr> <tr> - <td>MacOS X 10.4-10.6</td> - <td>g++ 4.0 or later</td> + <td>MacOS X 10.11.6</td> + <td>LLVM 7.3.0 (clang-703.0.29)</td> </tr> </tbody> </table>
libcupsfilters: Small fixes on previous commit.
@@ -2650,7 +2650,7 @@ cfCreatePPDFromIPP2(char *buffer, /* I - Filename buffer */ cupsFilePrintf(fp, "*ColorModel RGB/%s: \"\"\n", (human_readable2 ? human_readable2 : "Color")); - if (!default_color) + if (!defattr) default_color = "RGB"; /* Apparently some printers only advertise color support, so make sure @@ -2669,7 +2669,7 @@ cfCreatePPDFromIPP2(char *buffer, /* I - Filename buffer */ } } - if (default_pagesize != NULL) { + if (default_pagesize != NULL && (!default_color || !defattr)) { /* Here we are dealing with a cluster, if the default cluster color is not supplied we set it Gray*/ if (default_cluster_color != NULL) {
'h2o_multithread_send_request()' is not used, so remove it
typedef struct st_h2o_multithread_receiver_t h2o_multithread_receiver_t; typedef struct st_h2o_multithread_queue_t h2o_multithread_queue_t; -typedef struct st_h2o_multithread_request_t h2o_multithread_request_t; typedef void (*h2o_multithread_receiver_cb)(h2o_multithread_receiver_t *receiver, h2o_linklist_t *messages); -typedef void (*h2o_multithread_response_cb)(h2o_multithread_request_t *req); struct st_h2o_multithread_receiver_t { h2o_multithread_queue_t *queue; @@ -44,12 +42,6 @@ typedef struct st_h2o_multithread_message_t { h2o_linklist_t link; } h2o_multithread_message_t; -struct st_h2o_multithread_request_t { - h2o_multithread_message_t super; - h2o_multithread_receiver_t *source; - h2o_multithread_response_cb cb; -}; - typedef struct st_h2o_sem_t { pthread_mutex_t _mutex; pthread_cond_t _cond; @@ -85,10 +77,6 @@ void h2o_multithread_unregister_receiver(h2o_multithread_queue_t *queue, h2o_mul * sends a message (or set message to NULL to just wake up the receiving thread) */ void h2o_multithread_send_message(h2o_multithread_receiver_t *receiver, h2o_multithread_message_t *message); -/** - * sends a request - */ -void h2o_multithread_send_request(h2o_multithread_receiver_t *receiver, h2o_multithread_request_t *req); /** * create a thread */
Fixed rendering of %ire %url speeches to be slightly more consistent with regular %url.
$url :_ ~ =+ ful=(apix:en-purl:html url.sep) - =+ pef=(weld (fall pre "") "/") + =+ pef=(fall pre "") + :: clean up prefix if needed. + =? pef =((scag 1 (flop pef)) " ") + (scag (dec (lent pef)) pef) + =. pef (weld "/" pef) =. wyd (sub wyd +((lent pef))) :: account for prefix. :: if the full url fits, just render it. ?: (gte wyd (lent ful)) :(weld pef " " ful)
Fix: get_min_convex_successor to return minimum convex successor that is directly connected to current scc
@@ -1660,7 +1660,9 @@ int *get_convex_successors(int scc_id, PlutoProg *prog, num_successors = 0; for (i = scc_id + 1; i < num_sccs; i++) { + if (is_convex_scc(scc_id, i, ddg, prog)) { + printf("SCC %d and %d are convex\n", scc_id, i); if (convex_successors == NULL) { convex_successors = (int *)malloc(num_sccs * sizeof(int)); } @@ -1959,7 +1961,11 @@ int get_min_convex_successor(int scc_id, PlutoProg *prog) { /* TODO: Fix this by iterating over the list of convex successors and look for an SCC that has atleast one dimension that is not coloured */ else { - min_scc_id = convex_successors[0]; + for (i = 0; i < num; i++) { + min_scc_id = convex_successors[i]; + if (ddg_sccs_direct_connected(prog->ddg, prog, scc_id, min_scc_id)) + break; + } free(convex_successors); return min_scc_id; } @@ -2014,6 +2020,7 @@ int get_next_min_vertex_scc_cluster(int scc_id, PlutoProg *prog, !ddg_sccs_direct_connected(prog->ddg, prog, scc_id, min_scc)) { printf("[FCG Colouring]: No Convex Successor for Scc %d\n", scc_id); } else { + printf("Min Convex Successor of SCC %d: %d\n", scc_id, min_scc); assert(ddg_sccs_direct_connected(prog->ddg, prog, scc_id, min_scc)); v = get_min_vertex_from_lp_sol(scc_id, min_scc, prog, num_discarded, discarded_list);
Removed clang compiler
@@ -5,10 +5,6 @@ os: - linux - osx -compiler: - - gcc - - clang - addons: apt: packages: @@ -20,7 +16,6 @@ addons: - swig - python3-numpy - # Installs system level dependencies before_install: - if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then brew update ; fi
Zork: remove pd_snk_is_vbus_provided Zork uses CONFIG_USB_PD_VBUS_DETECT_TCPC and ppc_is_vbus_present() doesn't exist. BRANCH=none TEST=none
@@ -77,11 +77,6 @@ int pd_set_power_supply_ready(int port) return EC_SUCCESS; } -int pd_snk_is_vbus_provided(int port) -{ - return ppc_is_vbus_present(port); -} - int board_vbus_source_enabled(int port) { return ppc_is_sourcing_vbus(port);
union BUGFIX clear invalid subvalues Fixes
@@ -73,7 +73,11 @@ union_store_type(const struct ly_ctx *ctx, struct lysc_type *type, struct lyd_va ret = type->plugin->store(ctx, type, value, value_len, 0, subvalue->format, subvalue->prefix_data, subvalue->hints, subvalue->ctx_node, &subvalue->value, unres, err); - LY_CHECK_RET((ret != LY_SUCCESS) && (ret != LY_EINCOMPLETE), ret); + if ((ret != LY_SUCCESS) && (ret != LY_EINCOMPLETE)) { + /* clear any leftover/freed garbage */ + memset(&subvalue->value, 0, sizeof subvalue->value); + return ret; + } if (resolve && (ret == LY_EINCOMPLETE)) { /* we need the value resolved */
Changed reverse for loop so it can deal with uint32_t.
@@ -2449,8 +2449,7 @@ ins_agent_key_val (GLogItem * logitem, uint32_t numdate) { static int clean_old_data_by_date (uint32_t numdate) { uint32_t *dates = NULL; - uint32_t len = 0; - int idx; + uint32_t idx, len = 0; if (ht_get_size_dates () < conf.keep_last) return 1; @@ -2459,7 +2458,7 @@ clean_old_data_by_date (uint32_t numdate) { /* If currently parsed date is in the set of dates, keep inserting it. * We count down since more likely the currently parsed date is at the last pos */ - for (idx = len - 1; idx >= 0; --idx) { + for (idx = len ; idx-- > 0 ; ) { if (dates[idx] == numdate) { free (dates); return 1;
[kernel] add a default allocation of _jacobianWrenchTwist since _jacobianMGyrtwist is always present. Correct the size of _jacobianMGyrtwist
@@ -400,8 +400,14 @@ void NewtonEulerDS::init() _wrench.reset(new SiconosVector(_n)); _mGyr.reset(new SiconosVector(3,0.0)); + /** The follwing jacobian are always allocated since we have always + * Gyroscopical forces that has non linear forces + * This should be remove if the integration is explicit or _nullifyMGyr(false) is set to true ? + */ + + _jacobianMGyrtwist.reset(new SimpleMatrix(3, _n)); + _jacobianWrenchTwist.reset(new SimpleMatrix(_n, _n)); - _jacobianMGyrtwist.reset(new SimpleMatrix(_n, _n)); //We initialize _z with a null vector of size 1, since z is required in plug-in functions call. _z.reset(new SiconosVector(1)); @@ -963,7 +969,7 @@ void NewtonEulerDS::computeJacobianvForces(double time) { //computeJacobianMGyrtwistByFD(time,_q,_twist); computeJacobianMGyrtwist(time); - *_jacobianWrenchTwist -= *_jacobianMGyrtwist; + _jacobianWrenchTwist->setBlock(3,0,-1.0 * *_jacobianMGyrtwist); } } // std::cout << "_jacobianWrenchTwist : "<< std::endl; @@ -1000,7 +1006,7 @@ void NewtonEulerDS::computeJacobianMGyrtwist(double time) cross_product(omega, Iei, omega_Iei); cross_product(ei, Iomega, ei_Iomega); for (int j = 0; j < 3; j++) - _jacobianMGyrtwist->setValue(3 + j, 3 + i, ei_Iomega.getValue(j) + omega_Iei.getValue(j)); + _jacobianMGyrtwist->setValue(j, 3 + i, ei_Iomega.getValue(j) + omega_Iei.getValue(j)); } // Check if Jacobian is valid. Warning to the transpose operation in // _jacobianMGyrtwist->setValue(3 + j, 3 + i, ei_Iomega.getValue(j) + omega_Iei.getValue(j));
Flesh out changed_predicate_spec. Discovered that there is no way for an image to transition from changed to not changed. Added a test to document this behavior by saving an image and verifying that `changed?` still returns true.
RSpec.describe Magick::Image, "#changed?" do - it "works" do - skip 'image is initially changed' + it "returns true when a new image is instantiated" do + image = described_class.new(2, 2) - image = described_class.new(20, 20) + expect(image.changed?).to be(true) + end + + it "returns false after an image is loaded from disk" do + image = described_class.read(FLOWER_HAT).first expect(image.changed?).to be(false) - image.pixel_color(0, 0, 'red') + end + + it "returns true when a pixel in the image was changed" do + image = described_class.read(FLOWER_HAT).first + + image.import_pixels(0, 0, 1, 1, "RGB", [45, 98, 156]) + + expect(image.changed?).to be(true) + end + + it "still returns true after it has been persisted" do + image = described_class.read(FLOWER_HAT).first + + image.import_pixels(0, 0, 1, 1, "RGB", [45, 98, 156]) + image.write("./tmp/test_changed_predicate.jpg") + expect(image.changed?).to be(true) end end
GTest macros define a local 'listener' object that shadows the global listener object, rename it (and make it a function local).
@@ -19,7 +19,7 @@ using namespace std; #define TOKEN "6d084bbf6a9644ef83f40a77c9e34580-c2d379e0-4408-4325-9b4d-2a7d78131e14-7322" -EventDecoderListener listener; +EventDecoderListener eventDecoderListener; void Configure(ILogConfiguration& config) { @@ -73,10 +73,10 @@ void SendEvents(ILogger* pLogger, uint8_t eventCount, std::chrono::milliseconds TEST(BondDecoderTests, BasicTest) { // Register listeners for HTTP OK and ERROR - auto dbgEvents = { EVT_HTTP_OK, EVT_HTTP_ERROR }; - for (auto dbgEvt : dbgEvents) + const auto dbgEvents = { EVT_HTTP_OK, EVT_HTTP_ERROR }; + for (const auto& dbgEvt : dbgEvents) { - LogManager::AddEventListener(dbgEvt, listener); + LogManager::AddEventListener(dbgEvt, eventDecoderListener); } // Set config settings @@ -92,8 +92,8 @@ TEST(BondDecoderTests, BasicTest) LogManager::FlushAndTeardown(); // Unregister listeners - for (auto dbgEvt : dbgEvents) + for (const auto& dbgEvt : dbgEvents) { - LogManager::RemoveEventListener(dbgEvt, listener); + LogManager::RemoveEventListener(dbgEvt, eventDecoderListener); } }
vcl: validate vep handle when copying sessions on fork When copying sessions from parent on fork, we should validate vep handle in order to EPOLL_CTL_DEL in vcl_session_cleanup correctly when child exit. Type: fix
@@ -800,6 +800,34 @@ vls_share_sessions (vls_worker_t * vls_parent_wrk, vls_worker_t * vls_wrk) /* *INDENT-ON* */ } +static void +vls_validate_veps (vcl_worker_t *wrk) +{ + vcl_session_t *s; + u32 session_index, wrk_index; + + pool_foreach (s, wrk->sessions) + { + if (s->vep.vep_sh != ~0) + { + vcl_session_handle_parse (s->vep.vep_sh, &wrk_index, &session_index); + s->vep.vep_sh = vcl_session_handle_from_index (session_index); + } + if (s->vep.next_sh != ~0) + { + vcl_session_handle_parse (s->vep.next_sh, &wrk_index, + &session_index); + s->vep.next_sh = vcl_session_handle_from_index (session_index); + } + if (s->vep.prev_sh != ~0) + { + vcl_session_handle_parse (s->vep.prev_sh, &wrk_index, + &session_index); + s->vep.prev_sh = vcl_session_handle_from_index (session_index); + } + } +} + void vls_worker_copy_on_fork (vcl_worker_t * parent_wrk) { @@ -829,6 +857,9 @@ vls_worker_copy_on_fork (vcl_worker_t * parent_wrk) /* *INDENT-ON* */ vls_wrk->vls_pool = pool_dup (vls_parent_wrk->vls_pool); + /* Validate vep's handle */ + vls_validate_veps (wrk); + vls_share_sessions (vls_parent_wrk, vls_wrk); }
Expand public doctype allocation test
@@ -143,6 +143,8 @@ static unsigned long dummy_handler_flags = 0; #define DUMMY_UNPARSED_ENTITY_DECL_HANDLER_FLAG (1UL << 11) #define DUMMY_START_NS_DECL_HANDLER_FLAG (1UL << 12) #define DUMMY_END_NS_DECL_HANDLER_FLAG (1UL << 13) +#define DUMMY_START_DOCTYPE_DECL_HANDLER_FLAG (1UL << 14) +#define DUMMY_END_DOCTYPE_DECL_HANDLER_FLAG (1UL << 15) static void XMLCALL @@ -292,6 +294,22 @@ dummy_default_handler(void *UNUSED_P(userData), int UNUSED_P(len)) {} +static void XMLCALL +dummy_start_doctype_decl_handler(void *UNUSED_P(userData), + const XML_Char *UNUSED_P(doctypeName), + const XML_Char *UNUSED_P(sysid), + const XML_Char *UNUSED_P(pubid), + int UNUSED_P(has_internal_subset)) +{ + dummy_handler_flags |= DUMMY_START_DOCTYPE_DECL_HANDLER_FLAG; +} + +static void XMLCALL +dummy_end_doctype_decl_handler(void *UNUSED_P(userData)) +{ + dummy_handler_flags |= DUMMY_END_DOCTYPE_DECL_HANDLER_FLAG; +} + /* * Character & encoding tests. */ @@ -5579,10 +5597,24 @@ START_TEST(test_alloc_parse_public_doctype) "<doc></doc>"; int i; #define MAX_ALLOC_COUNT 10 - /* int repeat = 0 */ + int repeat = 0; for (i = 0; i < MAX_ALLOC_COUNT; i++) { + /* Repeat certain counts to defeat cached allocations */ + if (i == 4 && repeat == 4) { + i -= 2; + repeat++; + } + else if ((i == 2 && repeat < 3) || + (i == 3 && repeat == 3)) { + i--; + repeat++; + } allocation_count = i; + dummy_handler_flags = 0; + XML_SetDoctypeDeclHandler(parser, + dummy_start_doctype_decl_handler, + dummy_end_doctype_decl_handler); if (_XML_Parse_SINGLE_BYTES(parser, text, strlen(text), XML_TRUE) != XML_STATUS_ERROR) break; @@ -5592,6 +5624,9 @@ START_TEST(test_alloc_parse_public_doctype) fail("Parse succeeded despite failing allocator"); if (i == MAX_ALLOC_COUNT) fail("Parse failed at maximum allocation count"); + if (dummy_handler_flags != (DUMMY_START_DOCTYPE_DECL_HANDLER_FLAG | + DUMMY_END_DOCTYPE_DECL_HANDLER_FLAG)) + fail("Doctype handler functions not called"); } #undef MAX_ALLOC_COUNT END_TEST
Fix edge case bug in numlen, dropping use of math.h functions (Specifically, numlen when called with INT_MIN gave an incorrect result, because abs(INT_MIN) == INT_MIN < 0.)
@@ -12,11 +12,12 @@ int wrap(int i, int max) { } int numlen(int n) { - if (n == 0) { - return 1; + int j = n <= 0 ? 1 : 0; + while (n) { + j++; + n /= 10; } - // Account for the '-' in negative numbers. - return log10(abs(n)) + (n > 0 ? 1 : 2); + return j; } uint32_t parse_color(const char *color) {
Minor bug in Node Port installation.
@@ -138,6 +138,11 @@ set_target_properties(${target} # Include directories # +execute_process( + COMMAND npm install + WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} +) + execute_process( COMMAND node -p "require('node-addon-api').include" WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
Removes RSA constants This commit removes the RSA constants MBEDTLS_RSA_PUBLIC and MBEDTLS_RSA_PRIVATE because they are now superfluous given that the mode parameter has been removed.
/* * RSA constants */ -#define MBEDTLS_RSA_PUBLIC 0 /**< Request private key operation. */ -#define MBEDTLS_RSA_PRIVATE 1 /**< Request public key operation. */ #define MBEDTLS_RSA_PKCS_V15 0 /**< Use PKCS#1 v1.5 encoding. */ #define MBEDTLS_RSA_PKCS_V21 1 /**< Use PKCS#1 v2.1 encoding. */
Remove usage of clap-core
@@ -53,7 +53,7 @@ if (${CLAP_BUILD_TESTS}) macro(clap_compile_cpp SUFFIX EXT STDC STDCPP) add_executable(clap-compile-${SUFFIX} EXCLUDE_FROM_ALL src/main.${EXT}) - target_link_libraries(clap-compile-${SUFFIX} clap-core) + target_link_libraries(clap-compile-${SUFFIX} clap) set_target_properties(clap-compile-${SUFFIX} PROPERTIES C_STANDARD ${STDC} CXX_STANDARD ${STDCPP}) @@ -77,7 +77,7 @@ if (${CLAP_BUILD_TESTS}) clap_compile_cpp(cpp20 cc 17 20) add_library(clap-plugin-template MODULE EXCLUDE_FROM_ALL src/plugin-template.c) - target_link_libraries(clap-plugin-template PRIVATE clap-core) + target_link_libraries(clap-plugin-template PRIVATE clap) set_target_properties(clap-plugin-template PROPERTIES C_STANDARD 11) if(CMAKE_SYSTEM_NAME STREQUAL "Linux")
doc: small formatting improvement in src/plugins/template/README.md
@@ -30,7 +30,7 @@ cd src/plugins ../../scripts/copy-template yourplugin ``` -Then update the README.md of your newly created plugin: +Then update the `README.md` of your newly created plugin: - enter your full name+email in `infos/author` - make sure `status`, `placements`, and other clauses conform to
actions: enable jni plugin
@@ -8,8 +8,7 @@ env: BUILD_TYPE: RelWithDebInfo # Unfortunately the tests for the Xerces plugin fail: https://travis-ci.org/ElektraInitiative/libelektra/jobs/483331657#L3740 # The curlget tests fail: https://github.com/ElektraInitiative/libelektra/issues/3382 - # The tests fail with jni: https://github.com/ElektraInitiative/libelektra/issues/3747 - PLUGINS: 'ALL;-xerces;-curlget;-jni' + PLUGINS: 'ALL;-xerces;-curlget' BINDINGS: 'ALL;-rust' # Skip homebrew cleanup to avoid issues with removal of packages HOMEBREW_NO_INSTALL_CLEANUP: 1
win32: AllocConsole if AttachConsole fails; This may help retrieve stdout when running lovr outside of cmd.
@@ -42,9 +42,15 @@ void lovrPlatformSleep(double seconds) { } void lovrPlatformOpenConsole() { - if (AttachConsole(ATTACH_PARENT_PROCESS)) { + if (!AttachConsole(ATTACH_PARENT_PROCESS)) { + if (GetLastError() != ERROR_ACCESS_DENIED) { + if (!AllocConsole()) { + return; + } + } + } + freopen("CONOUT$", "w", stdout); freopen("CONIN$", "r", stdin); freopen("CONOUT$", "w", stderr); } -}
component/bt: Fix bug: AVRC remote_bda error when disconnect
@@ -201,7 +201,7 @@ static void handle_rc_disconnect (tBTA_AV_RC_CLOSE *p_rc_close) btc_rc_vb.rc_handle = 0; btc_rc_vb.rc_connected = FALSE; - memset(btc_rc_vb.rc_addr, 0, sizeof(BD_ADDR)); + memcpy(btc_rc_vb.rc_addr, p_rc_close->peer_addr, sizeof(BD_ADDR)); memset(btc_rc_vb.rc_notif, 0, sizeof(btc_rc_vb.rc_notif)); btc_rc_vb.rc_features = 0;
Adapt telemetry to work with native configuration
@@ -16,10 +16,13 @@ luos_telemetry = {"telemetry_type": "luos_engine_build", "system": sys.platform, "unix_time": env.get("UNIX_TIME"), "platform": env.get("PIOPLATFORM"), - "mcu": env.get("BOARD_MCU"), - "f_cpu": env.get("BOARD_F_CPU"), "project_path": env.get("PROJECT_DIR")} +if (env.get("BOARD_MCU") != None): + luos_telemetry["mcu"] = env.get("BOARD_MCU") +if (env.get("BOARD_F_CPU") != None): + luos_telemetry["f_cpu"] = env.get("BOARD_F_CPU") + try: luos_telemetry["framework"] = env.get("PIOFRAMEWORK")[0] except:
Support format parameter in newTextureData;
@@ -113,7 +113,8 @@ int l_lovrDataNewTextureData(lua_State* L) { if (lua_type(L, 1) == LUA_TNUMBER) { int width = luaL_checknumber(L, 1); int height = luaL_checknumber(L, 2); - textureData = lovrTextureDataGetBlank(width, height, 0x0, FORMAT_RGBA); + TextureFormat format = luaL_checkoption(L, 3, "rgba", TextureFormats); + textureData = lovrTextureDataGetBlank(width, height, 0x0, format); } else { Blob* blob = luax_readblob(L, 1, "Texture"); textureData = lovrTextureDataFromBlob(blob);
raspberrypi4-64.conf: Uboot configuration and drop armstub We drop armstub configuration because the new firmware includes them.
@@ -19,10 +19,16 @@ RPI_KERNEL_DEVICETREE = " \ SDIMG_KERNELIMAGE ?= "kernel8.img" SERIAL_CONSOLES ?= "115200;ttyS0" -MACHINE_FEATURES_append = " armstub vc4graphics" +UBOOT_MACHINE = "rpi_4_config" +MACHINE_FEATURES_append = " vc4graphics" + VC4DTBO ?= "vc4-fkms-v3d" -ARMSTUB ?= "armstub8-gic.bin" +# When u-boot is enabled we need to use the "Image" format and the "booti" +# command to load the kernel +KERNEL_IMAGETYPE_UBOOT ?= "Image" +# "zImage" not supported on arm64 and ".gz" images not supported by bootloader yet KERNEL_IMAGETYPE_DIRECT ?= "Image" +KERNEL_BOOTCMD ?= "booti" RPI_EXTRA_CONFIG ?= "\n# RPi4 64bit has some limitation - see https://github.com/raspberrypi/linux/commit/cdb78ce891f6c6367a69c0a46b5779a58164bd4b\ntotal_mem=1024\narm_64bit=1"
Fix file handle leak (issue
@@ -206,6 +206,7 @@ char *ReadFromProcess(const char *command, unsigned timeout_ms) /* Wait for data (or a timeout). */ rc = select(fds[0] + 1, &fs, NULL, &fs, &tv); if(rc == 0) { + close(fds[0]); /* Timeout */ Warning(_("timeout: %s did not complete in %u milliseconds"), command, timeout_ms); @@ -227,6 +228,7 @@ char *ReadFromProcess(const char *command, unsigned timeout_ms) rc = read(fds[0], &buffer[buffer_size], BLOCK_SIZE); buffer_size += (rc > 0) ? rc : 0; } while(rc > 0); + close(fds[0]); break; } }
Fix compilation in Visual studio
@@ -1099,9 +1099,9 @@ int LMS7_Device::SetNormalizedGain(bool dir_tx, size_t chan,double gain) { const int gain_total = 27 + 12 + 31; if (dir_tx) - SetGain(dir_tx,chan,63*gain+0.49); + return SetGain(dir_tx,chan,63*gain+0.49); else - SetGain(dir_tx,chan,gain*gain_total+0.49); + return SetGain(dir_tx,chan,gain*gain_total+0.49); } int LMS7_Device::SetGain(bool dir_tx, size_t chan, unsigned gain)
Move declarations of lapack_complex_custom types outside the extern C fixes
#include <stdlib.h> -#ifdef __cplusplus -extern "C" { -#endif - -/*----------------------------------------------------------------------------*/ -#ifndef lapack_int -#define lapack_int int -#endif - -#ifndef lapack_logical -#define lapack_logical lapack_int -#endif - -/* f2c, hence clapack and MacOS Accelerate, returns double instead of float - * for sdot, slange, clange, etc. */ -#if defined(LAPACK_F2C) - typedef double lapack_float_return; -#else - typedef float lapack_float_return; -#endif - /* Complex types are structures equivalent to the * Fortran complex types COMPLEX(4) and COMPLEX(8). * @@ -88,6 +67,29 @@ extern "C" { #endif /* LAPACK_COMPLEX_CUSTOM */ + +#ifdef __cplusplus +extern "C" { +#endif + +/*----------------------------------------------------------------------------*/ +#ifndef lapack_int +#define lapack_int int +#endif + +#ifndef lapack_logical +#define lapack_logical lapack_int +#endif + +/* f2c, hence clapack and MacOS Accelerate, returns double instead of float + * for sdot, slange, clange, etc. */ +#if defined(LAPACK_F2C) + typedef double lapack_float_return; +#else + typedef float lapack_float_return; +#endif + + /* Callback logical functions of one, two, or three arguments are used * to select eigenvalues to sort to the top left of the Schur form. * The value is selected if function returns TRUE (non-zero). */
driver/mcpwm: add an option to capture on both edges. However, The functionality of capturing on both edges is alternatively done with passing in the two flags ORed together: MCPWM_NEG_EDGE|MCPWM_POS_EDGE closes closes
@@ -83,4 +83,5 @@ typedef enum { typedef enum { MCPWM_NEG_EDGE = BIT(0), /*!<Capture the negative edge*/ MCPWM_POS_EDGE = BIT(1), /*!<Capture the positive edge*/ + MCPWM_BOTH_EDGE = BIT(1)|BIT(0), /*!<Capture both edges*/ } mcpwm_capture_on_edge_t;
doc: update KMAC doc to not say that the `KEY\' parameter needs to be set before the init call
@@ -47,8 +47,10 @@ The default value is 0. =back -The "custom" and "key" parameters must be set before EVP_MAC_init(). +The "custom" parameter must be set as part of or before the EVP_MAC_init() call. The "xof" and "size" parameters can be set at any time before EVP_MAC_final(). +The "key" parameter is set as part of the EVP_MAC_init() call, but can be +set before it instead. =head1 EXAMPLES
Fix HttpClient SendRequestAsync bugs * potential fix potential fix * pr feedback * move to while loop * pr feedback * rename
@@ -32,6 +32,9 @@ class WinInetRequestWrapper HINTERNET m_hWinInetRequest {nullptr}; SimpleHttpRequest* m_request; BYTE m_buffer[1024] {0}; + DWORD m_bufferUsed {0}; + std::vector<uint8_t> m_bodyBuffer; + bool m_readingData {false}; bool isCallbackCalled {false}; bool isAborted {false}; public: @@ -316,20 +319,15 @@ class WinInetRequestWrapper void onRequestComplete(DWORD dwError) { - std::unique_ptr<SimpleHttpResponse> response(new SimpleHttpResponse(m_id)); - - std::vector<uint8_t> & m_bodyBuffer = response->m_body; - DWORD m_bufferUsed = 0; - if (dwError == ERROR_SUCCESS) { // If looking good so far, try to fetch the response body first. // It might potentially be another async operation which will // trigger INTERNET_STATUS_REQUEST_COMPLETE again. m_bodyBuffer.insert(m_bodyBuffer.end(), m_buffer, m_buffer + m_bufferUsed); - do { - m_bufferUsed = 0; + while (!m_readingData || m_bufferUsed != 0) { BOOL bResult = ::InternetReadFile(m_hWinInetRequest, m_buffer, sizeof(m_buffer), &m_bufferUsed); + m_readingData = true; if (!bResult) { dwError = GetLastError(); if (dwError == ERROR_IO_PENDING) { @@ -339,6 +337,7 @@ class WinInetRequestWrapper // must stay valid and writable until the next // INTERNET_STATUS_REQUEST_COMPLETE callback comes // (that's why those are member variables). + LOG_TRACE("InternetReadFile() failed: ERROR_IO_PENDING. Waiting for INTERNET_STATUS_REQUEST_COMPLETE to be called again"); return; } LOG_WARN("InternetReadFile() failed: %d", dwError); @@ -346,11 +345,14 @@ class WinInetRequestWrapper } m_bodyBuffer.insert(m_bodyBuffer.end(), m_buffer, m_buffer + m_bufferUsed); - } while (m_bufferUsed == sizeof(m_buffer)); + } } + std::unique_ptr<SimpleHttpResponse> response(new SimpleHttpResponse(m_id)); + // SUCCESS with no IO_PENDING means we're done with the response body: try to parse the response headers. if (dwError == ERROR_SUCCESS) { + response->m_body = m_bodyBuffer; response->m_result = HttpResult_OK; uint32_t value = 0; @@ -564,4 +566,3 @@ bool HttpClient_WinInet::IsMsRootCheckRequired() #pragma warning(pop) #endif // HAVE_MAT_DEFAULT_HTTP_CLIENT // clang-format on -
cpeng: change to not add padding
@@ -92,17 +92,13 @@ public: virtual int run(opae::afu_test::afu *afu, __attribute__((unused)) CLI::App *app) { log_ = spdlog::get(this->name()); - if (chunk_ % CACHELINE_SZ) { - log_->error("chunk size must be cacheline aligned"); - return 1; - } ofs_cpeng cpeng; // Initialize cpeng driver ofs_cpeng_init(&cpeng, afu->handle()->c_type()); if (ofs_cpeng_wait_for_hps_ready(&cpeng, timeout_usec_)) { log_->warn("HPS is not ready"); - return 2; + return 1; } if (soft_reset_) { @@ -115,18 +111,10 @@ public: std::ifstream inp(filename_, std::ios::binary | std::ios::ate); size_t sz = inp.tellg(); inp.seekg(0, std::ios::beg); - uint32_t padding = 0; + // if chunk_ CLI arg is 0, use the file size // otherwise, use the smaller of chunk_ and file size size_t chunk = chunk_ ? std::min(static_cast<size_t>(chunk_), sz) : sz; - // If sz and chunk are equal then we have a one shot transfer - // equal to the file size. Let's round up to make it cacheline aligned. - // Padding will be the difference of - // cacheline aligned size (sz) and chunk (file size) - if (sz == chunk) { - sz = ((sz + CACHELINE_SZ) & ~(CACHELINE_SZ-1)); - padding = sz - chunk; - } shared_buffer::ptr_t buffer(0); try { buffer = shared_buffer::allocate(afu->handle(), chunk); @@ -136,7 +124,7 @@ public: auto hugepage_sz = chunk <= MB(2) ? "2MB" : "1GB"; log_->error("might need {} hugepages reserved", hugepage_sz); } - return 3; + return 1; } // get a char* of the buffer so we can read into it every chunk iteration auto ptr = reinterpret_cast<char*>(const_cast<uint8_t*>(buffer->c_type())); @@ -145,32 +133,22 @@ public: log_->info("starting copy of file:{}, size: {}, chunk size: {}", filename_, sz, chunk); uint32_t n_chunks = 0; - // set the data req. limit to 512 (default is 1k) ofs_cpeng_set_data_req_limit(&cpeng, 0b10); while (written < sz) { inp.read(ptr, chunk); - if (padding){ - memset(ptr+chunk, 0, padding); - written += padding; - } if (ofs_cpeng_copy_chunk( &cpeng, buffer->io_address(), destination_offset_ + written, chunk, timeout_usec_)) { log_->warn("copy chunk, dma_status: {:x}", ofs_cpeng_dma_status(&cpeng)); if (dmastatus_err(&cpeng)) { - return 4; + return 2; } } - ++n_chunks; written += chunk; - - if (sz-written < chunk){ - padding = ((written + chunk) & ~(chunk-1)) - written; - chunk = sz-written; - } + chunk = std::min(chunk, sz-written); } log_->info("transerred file in {} chunk(s)", n_chunks); ofs_cpeng_image_complete(&cpeng);
io: redo cmake formatting
@@ -2,10 +2,7 @@ set (SOURCES "${CMAKE_CURRENT_SOURCE_DIR}/io.c") set (LIBRARY_NAME elektra-io) -add_lib (io - SOURCES ${SOURCES} - LINK_ELEKTRA elektra-kdb elektra-invoke -) +add_lib (io SOURCES ${SOURCES} LINK_ELEKTRA elektra-kdb elektra-invoke) configure_file ("${CMAKE_CURRENT_SOURCE_DIR}/${LIBRARY_NAME}.pc.in" "${CMAKE_CURRENT_BINARY_DIR}/${LIBRARY_NAME}.pc" @ONLY)
resgroup: remove a misplaced return command
@@ -1238,7 +1238,6 @@ ResourceGroupGetQueryMemoryLimit(void) * RESGROUP_BYPASS_MODE_MEMORY_LIMIT_ON_QE chunk, * we should make sure query_mem + misc mem <= chunk. */ - return bytesInChunk * RESGROUP_BYPASS_MODE_MEMORY_LIMIT_ON_QE / 2; return Min(bytesInMB, bytesInChunk * RESGROUP_BYPASS_MODE_MEMORY_LIMIT_ON_QE / 2); }
parser xml BUGFIX check for empty input Refs cesnet/netopeer2#1201
@@ -979,6 +979,12 @@ lydxml_env_netconf_rpc(struct lyxml_ctx *xmlctx, struct lyd_node **envp, uint32_ assert(envp && !*envp); + if (xmlctx->status != LYXML_ELEMENT) { + /* nothing to parse */ + assert(xmlctx->status == LYXML_END); + goto cleanup; + } + /* parse "rpc" */ r = lydxml_envelope(xmlctx, "rpc", "urn:ietf:params:xml:ns:netconf:base:1.0", 0, envp); LY_CHECK_ERR_GOTO(r, rc = r, cleanup); @@ -1027,6 +1033,12 @@ lydxml_env_netconf_notif(struct lyxml_ctx *xmlctx, struct lyd_node **envp, uint3 assert(envp && !*envp); + if (xmlctx->status != LYXML_ELEMENT) { + /* nothing to parse */ + assert(xmlctx->status == LYXML_END); + goto cleanup; + } + /* parse "notification" */ r = lydxml_envelope(xmlctx, "notification", "urn:ietf:params:xml:ns:netconf:notification:1.0", 0, envp); LY_CHECK_ERR_GOTO(r, rc = r, cleanup); @@ -1453,6 +1465,12 @@ lydxml_env_netconf_reply(struct lyxml_ctx *xmlctx, struct lyd_node **envp, uint3 assert(envp && !*envp); + if (xmlctx->status != LYXML_ELEMENT) { + /* nothing to parse */ + assert(xmlctx->status == LYXML_END); + goto cleanup; + } + /* parse "rpc-reply" */ r = lydxml_envelope(xmlctx, "rpc-reply", "urn:ietf:params:xml:ns:netconf:base:1.0", 0, envp); LY_CHECK_ERR_GOTO(r, rc = r, cleanup);
Fixed input multi select
@@ -30,7 +30,7 @@ const ScriptEventBlock = ({ command, value = {}, onChange }) => { if (updateFn) { newValue = updateFn(newValue); } - if (Array.isArray(value[key])) { + if (Array.isArray(value[key]) && index !== undefined) { return onChange({ [key]: value[key].map((v, i) => { if (i !== index) { @@ -76,7 +76,7 @@ const ScriptEventBlock = ({ command, value = {}, onChange }) => { ? [].concat([], value[field.key]) : value[field.key]; - const renderInput = (index = 0) => { + const renderInput = index => { const inputValue = field.multiple ? fieldValue[index] : fieldValue; return field.type === "textarea" ? ( <textarea
Use rd instead rmdir to avoid collision with rmdir.exe from cygwin or msys Original idea by Mladen Turk
@@ -461,10 +461,10 @@ libclean: -del /Q /F $(LIBS) libcrypto.* libssl.* ossl_static.pdb clean: libclean - -rmdir /Q /S $(HTMLDOCS1_BLDDIRS) - -rmdir /Q /S $(HTMLDOCS3_BLDDIRS) - -rmdir /Q /S $(HTMLDOCS5_BLDDIRS) - -rmdir /Q /S $(HTMLDOCS7_BLDDIRS) + -rd /Q /S $(HTMLDOCS1_BLDDIRS) + -rd /Q /S $(HTMLDOCS3_BLDDIRS) + -rd /Q /S $(HTMLDOCS5_BLDDIRS) + -rd /Q /S $(HTMLDOCS7_BLDDIRS) {- join("\n\t", map { "-del /Q /F $_" } @PROGRAMS) -} {- join("\n\t", map { "-del /Q /F $_" } @MODULES) -} {- join("\n\t", map { "-del /Q /F $_" } @SCRIPTS) -} @@ -474,7 +474,7 @@ clean: libclean -del /Q /S /F engines\*.lib engines\*.exp -del /Q /S /F apps\*.lib apps\*.rc apps\*.res apps\*.exp -del /Q /S /F test\*.exp - -rmdir /Q /S test\test-runs + -rd /Q /S test\test-runs distclean: clean -del /Q /F configdata.pm
filter_nightfall: capitalize flag in CMakeLists
@@ -213,7 +213,7 @@ option(FLB_FILTER_LUA_USE_MPACK "Enable mpack on the lua filter" Yes) option(FLB_FILTER_RECORD_MODIFIER "Enable record_modifier filter" Yes) option(FLB_FILTER_TENSORFLOW "Enable tensorflow filter" No) option(FLB_FILTER_GEOIP2 "Enable geoip2 filter" Yes) -option(FLB_FILTER_Nightfall "Enable Nightfall filter" Yes) +option(FLB_FILTER_NIGHTFALL "Enable Nightfall filter" Yes) if(DEFINED FLB_NIGHTLY_BUILD AND NOT "${FLB_NIGHTLY_BUILD}" STREQUAL "") FLB_DEFINITION_VAL(FLB_NIGHTLY_BUILD ${FLB_NIGHTLY_BUILD})
mmapstorage: mmap to last known location in memory
@@ -523,7 +523,7 @@ static int readMmapHeader (FILE * fp, MmapHeader * mmapHeader) static void updatePointers (MmapHeader * mmapHeader, char * dest) { char * source = mmapHeader->mmapAddr; - ptrdiff_t ptrDiff = ((char *)dest - (char *)source); // TODO: might be problematic if larger than PTRDIFF_MAX + ssize_t ptrDiff = ((char)dest - (char)source); // TODO: might be problematic if larger than PTRDIFF_MAX // KeySet * ks = (KeySet *)(dest + SIZEOF_MMAPHEADER); @@ -540,7 +540,7 @@ static void updatePointers (MmapHeader * mmapHeader, char * dest) for (size_t j = 0; j < ks->size; ++j) { - ks->array[j] = (Key *)((char *)ks->array[j] + ptrDiff); + ks->array[j] = (Key *)((char *)(ks->array[j]) + ptrDiff); } } @@ -549,9 +549,9 @@ static void updatePointers (MmapHeader * mmapHeader, char * dest) { key = (Key *)keyPtr; keyPtr += SIZEOF_KEY; - key->data.v = (void *)((char *)key->data.v + ptrDiff); - key->key = ((char *)key->key + ptrDiff); - key->meta = (KeySet *)((char *)key->meta + ptrDiff); + key->data.v = (void *)((char *)(key->data.v) + ptrDiff); + key->key = ((char *)(key->key) + ptrDiff); + key->meta = (KeySet *)((char *)(key->meta) + ptrDiff); } // char * ksArrayPtr = (((char *)ksPtr) + SIZEOF_KEYSET); @@ -655,7 +655,7 @@ int elektraMmapstorageGet (Plugin * handle, KeySet * returned, Key * parentKey) char * mappedRegion = MAP_FAILED; ELEKTRA_LOG_WARNING ("MMAP addr to map: %p", (void *)mmapHeader.mmapAddr); - mappedRegion = mmapMapFile ((void *)0, fp, sbuf.st_size, MAP_PRIVATE, parentKey, errnosave); + mappedRegion = mmapMapFile (mmapHeader.mmapAddr, fp, sbuf.st_size, MAP_PRIVATE | MAP_FIXED, parentKey, errnosave); ELEKTRA_LOG_WARNING ("mappedRegion ptr: %p", (void *)mappedRegion); if (mappedRegion == MAP_FAILED) @@ -673,13 +673,13 @@ int elektraMmapstorageGet (Plugin * handle, KeySet * returned, Key * parentKey) updatePointers (&mmapHeader, mappedRegion); mmapToKeySet (mappedRegion, returned); - // KeySet * new = ksDeepDup (returned); - // returned->array = new->array; - // returned->size = new->size; - // returned->alloc = new->alloc; - // returned->cursor = 0; - // returned->current = 0; - // returned->flags = 0; + KeySet * new = ksDeepDup (returned); + returned->array = new->array; + returned->size = new->size; + returned->alloc = new->alloc; + returned->cursor = 0; + returned->current = 0; + returned->flags = 0; // m_output_keyset (returned);
sys/log: Fix endianess in CBOR pretty-printing
#include "base64/hex.h" #if MYNEWT_VAL(LOG_VERSION) > 2 #include "tinycbor/cbor.h" +#include "tinycbor/compilersupport_p.h" #endif #if MYNEWT_VAL(LOG_VERSION) > 2 @@ -66,7 +67,7 @@ log_shell_cbor_reader_get16(struct cbor_decoder_reader *d, int offset) (void)log_read_body(cbr->log, cbr->dptr, &val, offset, sizeof(val)); - return val; + return cbor_ntohs(val); } static uint32_t @@ -77,7 +78,7 @@ log_shell_cbor_reader_get32(struct cbor_decoder_reader *d, int offset) (void)log_read_body(cbr->log, cbr->dptr, &val, offset, sizeof(val)); - return val; + return cbor_ntohl(val); } static uint64_t @@ -88,7 +89,7 @@ log_shell_cbor_reader_get64(struct cbor_decoder_reader *d, int offset) (void)log_read_body(cbr->log, cbr->dptr, &val, offset, sizeof(val)); - return val; + return cbor_ntohll(val); } static uintptr_t
Libunit: fixing read buffer leakage. If shared queue is empty, allocated read buffer should be explicitly released. Found by Coverity (CID 363943). The issue was introduced in
@@ -4948,6 +4948,7 @@ nxt_unit_dequeue_request(nxt_unit_ctx_t *ctx) rc = nxt_unit_app_queue_recv(lib->shared_port, rbuf); if (rc != NXT_UNIT_OK) { + nxt_unit_read_buf_release(ctx, rbuf); goto done; }
wifi test: Fix compile issue for wifi MQTT test
@@ -109,8 +109,8 @@ const char *testPublishMsg[MQTT_PUBLISH_TOTAL_MSG_COUNT] = {"Hello test", }; static uWifiTestPrivate_t gHandles = { -1, -1, NULL, -1 }; -static const uint32_t gNetStatusMaskAllUp = U_WIFI_STATUS_MASK_IPV4_UP | - U_WIFI_STATUS_MASK_IPV6_UP; +static const uint32_t gNetStatusMaskAllUp = U_WIFI_NET_STATUS_MASK_IPV4_UP | + U_WIFI_NET_STATUS_MASK_IPV6_UP; static volatile bool mqttSessionDisconnected = false; @@ -135,7 +135,7 @@ static void wifiConnectionCallback(int32_t wifiHandle, (void)pBssid; (void)disconnectReason; (void)pCallbackParameter; - if (status == U_WIFI_CON_STATUS_CONNECTED) { + if (status == U_WIFI_NET_CON_STATUS_CONNECTED) { uPortLog(LOG_TAG "Connected Wifi connId: %d, bssid: %s, channel: %d\n", connId, pBssid, @@ -171,8 +171,8 @@ static void wifiNetworkStatusCallback(int32_t wifiHandle, (void)statusMask; (void)pCallbackParameter; uPortLog(LOG_TAG "Network status IPv4 %s, IPv6 %s\n", - ((statusMask & U_WIFI_STATUS_MASK_IPV4_UP) > 0) ? "up" : "down", - ((statusMask & U_WIFI_STATUS_MASK_IPV6_UP) > 0) ? "up" : "down"); + ((statusMask & U_WIFI_NET_STATUS_MASK_IPV4_UP) > 0) ? "up" : "down", + ((statusMask & U_WIFI_NET_STATUS_MASK_IPV6_UP) > 0) ? "up" : "down"); gNetStatusMask = statusMask; } @@ -485,7 +485,7 @@ static void startWifi(void) // Connect to wifi network if (0 != uWifiNetStationConnect(gHandles.wifiHandle, U_PORT_STRINGIFY_QUOTED(U_WIFI_TEST_CFG_SSID), - U_SHORT_RANGE_WIFI_AUTH_WPA_PSK, + U_WIFI_NET_AUTH_WPA_PSK, U_PORT_STRINGIFY_QUOTED(U_WIFI_TEST_CFG_WPA2_PASSPHRASE))) { testError = U_WIFI_TEST_ERROR_CONNECT;
Declare callbacks static It was a typo, "static" was missing.
@@ -330,7 +330,7 @@ scrcpy(const struct scrcpy_options *options) { av_log_set_callback(av_log_callback); - const struct stream_callbacks stream_cbs = { + static const struct stream_callbacks stream_cbs = { .on_eos = stream_on_eos, }; stream_init(&s->stream, s->server.video_socket, &stream_cbs, NULL);
fix: delete BoatIotSdkDeInit(); in test_001CreateWallet_0002CreateOneTimeWalletFailureNullConfig
@@ -115,7 +115,6 @@ START_TEST(test_001CreateWallet_0002CreateOneTimeWalletFailureNullConfig) /* 3-2. verify the global variables that be affected */ ck_assert(g_boat_iot_sdk_context.wallet_list[0].is_used == false); - BoatIotSdkDeInit(); } END_TEST
Simplify process of retrieving hull noun from eth response.
++ registry (map @p hull) :: ++ hull - $: pilot=address - child-count=@ud - pub-key=@ - key-rev=@ud + $: owner=address + spawn-count=@ud + encryption-key=@ + authentication-key=@ + key-revision=@ud sponsor=@p escape=(unit @p) + spawn-proxy=address + transfer-proxy=address == :: -++ ship-state - $% [%locked until=@da completed=@da] - [%living ~] +++ eth-type + |% + ++ hull + :~ %address :: owner + %bool :: active + %uint :: spawnCount + [%bytes-n 32] :: encryptionKey + [%bytes-n 32] :: authenticationKey + %uint :: keyRevisionNumber + %uint :: sponsor + %bool :: escapeRequested + %uint :: escapeRequestedTo + %address :: spawnProxy + %address :: transferProxy + == + -- +:: +++ eth-noun + |% + ++ hull + $: owner=address + active=? + spawn-count=@ud + encryption-key=octs + authentication-key=octs + key-revision=@ud + sponsor=@ud + escape-requested=? + escape-to=@ud + spawn-proxy=address + transfer-proxy=address + == + -- == :: :: constants
coverity API usage errors (PRINTF_ARGS)
@@ -397,7 +397,7 @@ int http_server_get_asn1_req(const ASN1_ITEM *it, ASN1_VALUE **preq, log_message(prog, LOG_ERR, "Error parsing request"); } else if (ppath != NULL && (*ppath = OPENSSL_strdup(url)) == NULL) { log_message(prog, LOG_ERR, - "Out of memory allocating %d bytes", strlen(url) + 1); + "Out of memory allocating %zu bytes", strlen(url) + 1); ASN1_item_free(req, it); goto fatal; }
Fix kconfig warnings * quote string defaults for Kconfig values to eliminate warnings * don't add \ in default for LV_TICK_CUSTOM_SYS_TIME_EXPR (tho its needed on linux and MacOS) as I can't test on Windows
@@ -112,19 +112,19 @@ menu "LVGL configuration" config LV_MEM_CUSTOM_INCLUDE string prompt "Header to include for the custom memory function" - default stdlib.h + default "stdlib.h" depends on LV_MEM_CUSTOM config LV_MEM_CUSTOM_ALLOC string prompt "Wrapper to malloc" - default malloc + default "malloc" depends on LV_MEM_CUSTOM config LV_MEM_CUSTOM_FREE string prompt "Wrapper to free" - default free + default "free" depends on LV_MEM_CUSTOM config LV_MEM_SIZE_BYTES @@ -286,13 +286,13 @@ menu "LVGL configuration" config LV_TICK_CUSTOM_INCLUDE string prompt "Header for the system time function" - default Arduino.h + default "Arduino.h" depends on LV_TICK_CUSTOM config LV_TICK_CUSTOM_SYS_TIME_EXPR string prompt "Expression evaluating to current system time in ms" - default "(millis())" + default "millis()" depends on LV_TICK_CUSTOM endmenu
Add new dependencies for source installation for debian and ubuntu. Ethan will have to translate these to redhat and sles when he attempts to build packages on next release
@@ -13,7 +13,9 @@ Build and install from sources is possible. However, the source build for AOMP #### Debian or Ubuntu Packages ``` - sudo apt-get install cmake g++-5 g++ pkg-config libpci-dev libnuma-dev libelf-dev libffi-dev git python libopenmpi-dev gawk mesa-common-dev + sudo apt-get install cmake g++-5 g++ pkg-config libpci-dev libnuma-dev libelf-dev libffi-dev git python libopenmpi-dev gawk mesa-common-dev flex texinfo libbison-dev bison flex libbabletrace-dev + + sudo pip install CppHeaderParser argparse ``` #### SLES-15-SP1 Packages
framesync64/autotest: checking that exactly 1 frame is received
/* - * Copyright (c) 2007 - 2015 Joseph Gaeddert + * Copyright (c) 2007 - 2022 Joseph Gaeddert * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal @@ -35,23 +35,21 @@ static int callback(unsigned char * _header, void * _userdata) { //printf("callback invoked, payload valid: %s\n", _payload_valid ? "yes" : "no"); - int * frame_recovered = (int*) _userdata; + int * frames_recovered = (int*) _userdata; - *frame_recovered = _header_valid && _payload_valid; + *frames_recovered += _header_valid && _payload_valid ? 1 : 0; return 0; } -// // AUTOTEST : test simple recovery of frame in noise -// void autotest_framesync64() { unsigned int i; - int frame_recovered = 0; + int frames_recovered = 0; // create objects framegen64 fg = framegen64_create(); - framesync64 fs = framesync64_create(callback,(void*)&frame_recovered); + framesync64 fs = framesync64_create(callback,(void*)&frames_recovered); if (liquid_autotest_verbose) { framesync64_print(fs); @@ -69,8 +67,8 @@ void autotest_framesync64() // try to receive the frame framesync64_execute(fs, frame, LIQUID_FRAME64_LEN); - // check to see that frame was recovered - CONTEND_EQUALITY( frame_recovered, 1 ); + // check to see that exactly one frame was recovered + CONTEND_EQUALITY( frames_recovered, 1 ); // parse statistics framedatastats_s stats = framesync64_get_framedatastats(fs);
Calculate transaction hash with price and limit
@@ -254,6 +254,8 @@ func (tx *Tx) CalculateTxHash() []byte { digest.Write(txBody.Recipient) binary.Write(digest, binary.LittleEndian, txBody.Amount) digest.Write(txBody.Payload) + binary.Write(digest, binary.LittleEndian, txBody.Limit) + binary.Write(digest, binary.LittleEndian, txBody.Price) digest.Write(txBody.Sign) return digest.Sum(nil) } @@ -271,6 +273,8 @@ func (tx *Tx) Clone() *Tx { Recipient: Clone(tx.Body.Recipient).([]byte), Amount: tx.Body.Amount, Payload: Clone(tx.Body.Payload).([]byte), + Limit: tx.Body.Limit, + Price: tx.Body.Price, Sign: Clone(tx.Body.Sign).([]byte), } res := &Tx{
Add TLS 1.3 signing curve check
@@ -850,9 +850,18 @@ int tls12_check_peer_sigalg(SSL *s, uint16_t sig, EVP_PKEY *pkey) } #ifndef OPENSSL_NO_EC if (pkeyid == EVP_PKEY_EC) { + EC_KEY *ec = EVP_PKEY_get0_EC_KEY(pkey); + if (SSL_IS_TLS13(s)) { + /* For TLS 1.3 check curve matches signature algorithm */ + int curve = EC_GROUP_get_curve_name(EC_KEY_get0_group(ec)); + if (curve != lu->curve) { + SSLerr(SSL_F_TLS12_CHECK_PEER_SIGALG, SSL_R_WRONG_CURVE); + return 0; + } + } else { unsigned char curve_id[2], comp_id; /* Check compression and curve matches extensions */ - if (!tls1_set_ec_id(curve_id, &comp_id, EVP_PKEY_get0_EC_KEY(pkey))) + if (!tls1_set_ec_id(curve_id, &comp_id, ec)) return 0; if (!s->server && !tls1_check_ec_key(s, curve_id, &comp_id)) { SSLerr(SSL_F_TLS12_CHECK_PEER_SIGALG, SSL_R_WRONG_CURVE); @@ -874,11 +883,14 @@ int tls12_check_peer_sigalg(SSL *s, uint16_t sig, EVP_PKEY *pkey) SSL_R_ILLEGAL_SUITEB_DIGEST); return 0; } - } else + } else { return 0; } - } else if (tls1_suiteb(s)) + } + } + } else if (tls1_suiteb(s)) { return 0; + } #endif /* Check signature matches a type we sent */
unescape: direct assignation for one byte, no need for memcpy()
@@ -209,6 +209,9 @@ int flb_unescape_string_utf8(const char *in_buf, int sz, char *out_buf) out_buf[count_out] = ch; esc_out = 1; } + else if (esc_out == 1) { + out_buf[count_out] = temp[0]; + } else { memcpy(&out_buf[count_out], temp, esc_out); }
apps/bttester: Fix search attribute by handle
@@ -1884,7 +1884,7 @@ static u8_t foreach_get_attrs(u16_t handle, struct gatt_attr *gatt_attr; char uuid_buf[BLE_UUID_STR_LEN]; - if (handle < foreach->start_handle && handle > foreach->end_handle) { + if (handle < foreach->start_handle || handle > foreach->end_handle) { return 0; }
Try 32 bit and 64 bit builds for windows.
@@ -7,6 +7,7 @@ configuration: - Debug platform: - x64 +- x86 environment: matrix: - arch: Win64 @@ -15,7 +16,7 @@ matrix: # skip unsupported combinations init: - - call "C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Auxiliary\Build\vcvars32.bat" + - call "C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Auxiliary\Build\vcvarsall.bat" install: - set JANET_BUILD=%appveyor_repo_commit:~0,7% @@ -26,7 +27,7 @@ install: - build_win all - refreshenv # We need to reload vcvars after refreshing - - call "C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Auxiliary\Build\vcvars32.bat" + - call "C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Auxiliary\Build\vcvarsall.bat" - build_win test-install - set janet_outname=%appveyor_repo_tag_name% - if "%janet_outname%"=="" set janet_outname=v1.4.0
Do not check definition of a macro and use it in a single condition The condition evaluation in #if conditions does not tolerate this if the macro is not defined. Fixes
#ifndef OPENSSL_NO_SECURE_MEMORY # if defined(_WIN32) # include <windows.h> -# if defined(WINAPI_FAMILY_PARTITION) \ - && !WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP | WINAPI_PARTITION_SYSTEM) +# if defined(WINAPI_FAMILY_PARTITION) +# if !WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP | WINAPI_PARTITION_SYSTEM) /* * While VirtualLock is available under the app partition (e.g. UWP), * the headers do not define the API. Define it ourselves instead. @@ -39,6 +39,7 @@ VirtualLock( ); # endif # endif +# endif # include <stdlib.h> # include <assert.h> # if defined(OPENSSL_SYS_UNIX)
print additional warning if the capture file doesn't contain enough EAPOL M1 frames to calculate nonce-error-corrections
@@ -580,6 +580,13 @@ if(proberequestcount == 0) "That makes it hard to recover the PSK.\n"); } +if(eapolm1count <= 1) + { + printf("\nWarning: missing frames!\n" + "This dump file doesn't contain enough EAPOL M1 frames.\n" + "That makes it impossible to calculate nonce-error-correction values.\n"); + } + if(zeroedtimestampcount > 0) { printf("\nWarning: missing timestamps!\n"
Don't use legacy provider if not available in test_ssl_old If we've been configured with no-legacy then we should not attempt to load the legacy provider.
@@ -104,7 +104,12 @@ subtest 'test_ss' => sub { }; note('test_ssl -- key U'); -testssl("keyU.ss", $Ucert, $CAcert, "default", srctop_file("test","default-and-legacy.cnf")); +my $configfile = srctop_file("test","default-and-legacy.cnf"); +if (disabled("legacy")) { + $configfile = srctop_file("test","default.cnf"); +} + +testssl("keyU.ss", $Ucert, $CAcert, "default", $configfile); unless ($no_fips) { testssl("keyU.ss", $Ucert, $CAcert, "fips", srctop_file("test","fips-and-base.cnf")); @@ -329,7 +334,7 @@ sub testssl { my @CA = $CAtmp ? ("-CAfile", $CAtmp) : ("-CApath", bldtop_dir("certs")); my @providerflags = ("-provider", $provider); - if ($provider eq "default") { + if ($provider eq "default" && !disabled("legacy")) { push @providerflags, "-provider", "legacy"; }
Prevent incorrect "compiler does not support snmalloc" warning The warning was unnecessarily being emitted when USE_SNMALLOC=on
@@ -70,9 +70,11 @@ if (OE_SGX) add_subdirectory(switchless_worksleep) add_subdirectory(switchless_one_tcs) - if (COMPILER_SUPPORTS_SNMALLOC AND NOT USE_SNMALLOC) + if (COMPILER_SUPPORTS_SNMALLOC) + if (NOT USE_SNMALLOC) # Do not build that test if we are already using snmalloc for all other tests add_subdirectory(snmalloc) + endif () else () message("The C++ compiler cannot compile snmalloc. Skipping snmalloc test.") endif ()
OcConfigurationLib: Fix incorrect default for SetApfsTrimTimeout
/// KernelSpace quirks. /// #define OC_KERNEL_QUIRKS_FIELDS(_, __) \ - _(INT64 , SetApfsTrimTimeout , , FALSE , ()) \ + _(INT64 , SetApfsTrimTimeout , , -1 , ()) \ _(BOOLEAN , AppleCpuPmCfgLock , , FALSE , ()) \ _(BOOLEAN , AppleXcpmCfgLock , , FALSE , ()) \ _(BOOLEAN , AppleXcpmExtraMsrs , , FALSE , ()) \
GA: Test CMake installation.
@@ -54,3 +54,16 @@ jobs: working-directory: ${{runner.workspace}}/build shell: bash run: cmake --build . --target install + + - name: Test CMake Installation + working-directory: ${{runner.workspace}}/test/pkg + shell: bash + run: | + mkdir build && cd build + if [ "$RUNNER_OS" == "Windows" ]; then + cmake -DCMAKE_PREFIX_PATH=C:/tinyspline .. + else + cmake -DCMAKE_PREFIX_PATH=~/tinyspline .. + fi + cmake --build . + ctest
fix double assignment by
@@ -142,7 +142,7 @@ static void mi_page_thread_free_collect(mi_page_t* page) mi_thread_free_t tfree; mi_thread_free_t tfreex; do { - tfreex = tfree = page->thread_free; + tfree = page->thread_free; head = mi_tf_block(tfree); tfreex = mi_tf_set_block(tfree,NULL); } while (!mi_atomic_compare_exchange((volatile uintptr_t*)&page->thread_free, tfreex, tfree));
Update: narsese_to_english.py: removal of additional colon
@@ -59,7 +59,7 @@ def narseseToEnglish(line): COLOR = MAGENTA elif line.startswith("Input:"): COLOR = GREEN - elif line.startswith("Derived:") or line.startswith("Revised:"):: + elif line.startswith("Derived:") or line.startswith("Revised:"): COLOR = YELLOW elif line.startswith("Answer:") or line.startswith("^") or "decision expectation" in line: COLOR = BOLD + RED
More edits to INSTALL.
@@ -29,7 +29,7 @@ simulate the examples in this repository. > vplanet vpl.in > python makeplot.py png - These commands require less than 1 minute and to create 2 png figures + These commands require less than 1 minute and should create 2 png figures identical to those in the examples/EarthInterior directory. 5. If you did encounter errors, it is probably because either a) vplanet is not
Add toggle for test case count in descriptions
@@ -43,6 +43,7 @@ class BaseTarget(metaclass=ABCMeta): case_description: Short description of the test case. This may be automatically generated using the class, or manually set. dependencies: A list of dependencies required for the test case. + show_test_count: Toggle for inclusion of `count` in the test description. target_basename: Basename of file to write generated tests to. This should be specified in a child class of BaseTarget. test_function: Test function which the class generates cases for. @@ -53,6 +54,7 @@ class BaseTarget(metaclass=ABCMeta): count = 0 case_description = "" dependencies = [] # type: List[str] + show_test_count = True target_basename = "" test_function = "" test_name = "" @@ -78,16 +80,19 @@ class BaseTarget(metaclass=ABCMeta): """Create a test case description. Creates a description of the test case, including a name for the test - function, a case number, and a description the specific test case. - This should inform a reader what is being tested, and provide context - for the test case. + function, an optional case count, and a description of the specific + test case. This should inform a reader what is being tested, and + provide context for the test case. Returns: Description for the test case. """ + if self.show_test_count: return "{} #{} {}".format( self.test_name, self.count, self.case_description ).strip() + else: + return "{} {}".format(self.test_name, self.case_description).strip() def create_test_case(self) -> test_case.TestCase:
Fix diagnostics build
@@ -1396,9 +1396,10 @@ void compress_block( #if !defined(ASTCENC_DIAGNOSTICS) lowest_correl = prepare_block_statistics(bsd->texel_count, blk, ewb); - block_skip_two_plane = lowest_correl > ctx.config.tune_two_plane_early_out_limit; #endif + block_skip_two_plane = lowest_correl > ctx.config.tune_two_plane_early_out_limit; + // next, test the four possible 1-partition, 2-planes modes for (int i = 0; i < 4; i++) {
sse2: add WASM implementation oy simde_mm_{or,xor,sqrt}_pd Partially fixes
@@ -996,6 +996,8 @@ simde_mm_xor_pd (simde__m128d a, simde__m128d b) { #if defined(SIMDE_VECTOR_SUBSCRIPT_OPS) r_.i32f = a_.i32f ^ b_.i32f; + #elif defined(SIMDE_WASM_SIMD128_NATIVE) + r_.wasm_v128 = wasm_v128_xor(a_.wasm_v128, b_.wasm_v128); #elif defined(SIMDE_ARM_NEON_A32V7_NATIVE) r_.neon_i64 = veorq_s64(a_.neon_i64, b_.neon_i64); #else @@ -4142,6 +4144,8 @@ simde_mm_or_pd (simde__m128d a, simde__m128d b) { #if defined(SIMDE_VECTOR_SUBSCRIPT_OPS) r_.i32f = a_.i32f | b_.i32f; + #elif defined(SIMDE_WASM_SIMD128_NATIVE) + r_.wasm_v128 = wasm_v128_or(a_.wasm_v128, b_.wasm_v128); #elif defined(SIMDE_ARM_NEON_A32V7_NATIVE) r_.neon_i64 = vorrq_s64(a_.neon_i64, b_.neon_i64); #else @@ -5146,6 +5150,8 @@ simde_mm_sqrt_pd (simde__m128d a) { #if defined(SIMDE_ARM_NEON_A64V8_NATIVE) r_.neon_f64 = vsqrtq_f64(a_.neon_f64); + #elif defined(SIMDE_WASM_SIMD128_NATIVE) + r_.wasm_v128 = wasm_f64x2_sqrt(a_.wasm_v128); #elif defined(simde_math_sqrt) SIMDE_VECTORIZE for (size_t i = 0 ; i < (sizeof(r_.f64) / sizeof(r_.f64[0])) ; i++) {
[autobuild] move some checks to the top Moved some generic checks from the middle of the "feature checks" to the top.
@@ -150,6 +150,29 @@ AC_CHECK_TYPES([socklen_t], dnl Checks for library functions. AC_FUNC_FORK +dnl openssl on solaris needs -lsocket -lnsl +AC_SEARCH_LIBS([socket], [socket]) +AC_SEARCH_LIBS([gethostbyname], [nsl socket]) + +dnl On Haiku accept() and friends are in libnetwork +AC_SEARCH_LIBS([accept], [network]) + +dnl clock_gettime() needs -lrt with glibc < 2.17, and possibly other platforms +AC_SEARCH_LIBS([clock_gettime], [rt]) + +dnl need dlopen/-ldl to load plugins (when not on windows) +save_LIBS=$LIBS +LIBS= +AC_SEARCH_LIBS([dlopen], [dl], [ + AC_CHECK_HEADERS([dlfcn.h], [ + DL_LIB=$LIBS + AC_DEFINE([HAVE_LIBDL], [1], [libdl]) + AC_DEFINE([HAVE_DLFCN_H], [1]) + ]) +]) +LIBS=$save_LIBS +AC_SUBST([DL_LIB]) + dnl prepare pkg-config usage below if test -z "$PKG_CONFIG"; then AC_PATH_PROG([PKG_CONFIG], [pkg-config], [no]) @@ -408,30 +431,6 @@ if test "$WITH_ATTR" != no; then fi fi -dnl openssl on solaris needs -lsocket -lnsl -AC_SEARCH_LIBS([socket], [socket]) -AC_SEARCH_LIBS([gethostbyname], [nsl socket]) - -dnl On Haiku accept() and friends are in libnetwork -AC_SEARCH_LIBS([accept], [network]) - -dnl clock_gettime() needs -lrt with glibc < 2.17, and possibly other platforms -AC_SEARCH_LIBS([clock_gettime], [rt]) - -save_LIBS=$LIBS -AC_SEARCH_LIBS([dlopen], [dl], [ - AC_CHECK_HEADERS([dlfcn.h], [ - if test "$ac_cv_search_dlopen" != no; then - test "$ac_cv_search_dlopen" = "none required" || DL_LIB="$ac_cv_search_dlopen" - fi - - AC_DEFINE([HAVE_LIBDL], [1], [libdl]) - AC_DEFINE([HAVE_DLFCN_H], [1]) - ]) -]) -LIBS=$save_LIBS -AC_SUBST([DL_LIB]) - dnl Check for valgrind AC_MSG_NOTICE([----------------------------------------]) AC_MSG_CHECKING([for valgrind])
client session BUFIX invalid read
@@ -1161,7 +1161,9 @@ parse_rpc_error(struct ly_ctx *ctx, struct lyxml_elem *xml, struct nc_err *err) WRN("<rpc-error> <error-message> duplicated."); } else { err->message_lang = lyxml_get_attr(iter, "xml:lang", NULL); - if (!err->message_lang) { + if (err->message_lang) { + err->message_lang = lydict_insert(ctx, err->message_lang, 0); + } else { VRB("<rpc-error> <error-message> without the recommended \"xml:lang\" attribute."); } err->message = lydict_insert(ctx, (iter->content ? iter->content : ""), 0);
Get rid of Parser:pay_attention_to_indentation Since this method can only be safely called in a single place, we should probably inline it instead.
@@ -43,15 +43,6 @@ function Parser:init(lexer) self:advance(); self:advance() end -function Parser:pay_attention_to_suspicious_indentation(open_tok, close_tok) - local d1 = assert(self.indent_of_token[open_tok]) - local d2 = assert(self.indent_of_token[close_tok]) - if d1 > d2 then - table.insert(self.mismatched_indentation, open_tok) - table.insert(self.mismatched_indentation, close_tok) - end -end - function Parser:advance() local tok, err repeat @@ -98,7 +89,13 @@ function Parser:e(name, open_tok) local tok = self:try(name) if tok then if open_tok then - self:pay_attention_to_suspicious_indentation(open_tok, tok) + -- Pay attention to suspicious indentation + local d1 = assert(self.indent_of_token[open_tok]) + local d2 = assert(self.indent_of_token[tok]) + if d1 > d2 then + table.insert(self.mismatched_indentation, open_tok) + table.insert(self.mismatched_indentation, tok) + end end return tok else
Configure: pick up options from older 'config' These options were coded in util/perl/OpenSSL/config.pm, but that got removed when the OpenSSL::config::main() function was removed. We're not putting them back, but in 'Configure'.
@@ -205,6 +205,11 @@ my $apitable = { "0.9.8" => 908, }; +# For OpenSSL::config::get_platform +my %guess_opts = (); + +my $dryrun = 0; + our %table = (); our %config = (); our %withargs = (); @@ -834,6 +839,22 @@ while (@argvcopy) # No longer an automatic choice $auto_threads = 0 if ($1 eq "threads"); } + elsif (/^-d$/) # From older 'config' + { + $config{build_type} = "debug"; + } + elsif (/^-v$/) # From older 'config' + { + $guess_opts{verbose} = 1; + } + elsif (/^-w$/) # From older 'config' + { + $guess_opts{nowait} = 1; + } + elsif (/^-t$/) # From older 'config' + { + $dryrun = 1; + } elsif (/^--strict-warnings$/) { # Pretend that our strict flags is a C flag, and replace it @@ -1069,7 +1090,7 @@ if (grep { /-rpath\b/ } ($user{LDFLAGS} ? @{$user{LDFLAGS}} : ()) # If no target was given, try guessing. unless ($target) { - my %system_config = OpenSSL::config::get_platform(%config, %user); + my %system_config = OpenSSL::config::get_platform(%guess_opts, %user); # The $system_config{disable} is used to populate %disabled with # entries that aren't already there. @@ -1201,6 +1222,8 @@ if ($target) { &usage unless $target; +exit 0 if $dryrun; # From older 'config' + $config{target} = $target; my %target = resolve_config($target);
Tweak the check that a ciphersuite has not changed since the HRR
@@ -1615,8 +1615,9 @@ static int tls_early_post_process_client_hello(SSL *s, int *pal) al = SSL_AD_HANDSHAKE_FAILURE; goto err; } - if (s->hello_retry_request && s->s3->tmp.new_cipher != NULL - && s->s3->tmp.new_cipher->id != cipher->id) { + if (s->hello_retry_request + && (s->s3->tmp.new_cipher == NULL + || s->s3->tmp.new_cipher->id != cipher->id)) { /* * A previous HRR picked a different ciphersuite to the one we * just selected. Something must have changed.
Improve alignment of expected vs. got error test results. It is easier to compare the error messages when they start at the same column.
<p>Test speed improvements. Mount <id>tmpfs</id> in <file>Vagrantfile</file> instead <file>test.pl</file>. Preserve contents of C unit test build directory between <file>test.pl</file> executions. Improve efficiency of code generation.</p> </release-item> + <release-item> + <p>Improve alignment of expected vs. actual error test results.</p> + </release-item> + <release-item> <p>Add time since the beginning of the run to each test statement.</p> </release-item>
[stat_cache] FAM: improve handling modified file
@@ -169,6 +169,28 @@ static handler_t stat_cache_handle_fdevent(server *srv, void *_fce, int revent) } fam_dir_entry *fam_dir = scf->dirs->data; + if (fe.filename[0] != '/') { + switch(fe.code) { + case FAMCreated: + /* file created in monitored dir modifies dir */ + ++fam_dir->version; + break; + case FAMChanged: + /* file changed in monitored dir does not modify dir */ + ++fam_dir->version; /* however, current impl here needs this */ + break; + case FAMDeleted: + case FAMMoved: + /* file deleted or moved in monitored dir modifies dir, + * but FAM provides separate notification for that */ + ++fam_dir->version; + break; + default: + break; + } + continue; + } + switch(fe.code) { case FAMChanged: case FAMDeleted:
Remove symlinks, newt should find packages
export PATH=$HOME/bin:$PATH pwd -ln -s ci/mynewt_targets targets -ln -s ci/mynewt_keys keys - -for target in $(ls targets); do +for target in $(ls ci/mynewt_targets); do newt build $target [[ $? -ne 0 ]] && exit 1 done
feat(kscan_mock): Increase max number of events This is necessary for testing a large number of events (e.g. every key code) within a single build/pass. The u8_t limitation became apparent during end-to-end testing of
@@ -18,7 +18,7 @@ LOG_MODULE_DECLARE(zmk, CONFIG_ZMK_LOG_LEVEL); struct kscan_mock_data { kscan_callback_t callback; - u8_t event_index; + u32_t event_index; struct k_delayed_work work; struct device *dev; };
opae.io: print raw value in dfh walk
@@ -169,7 +169,7 @@ class walk_action(base_action): offset = 0 if args.offset is None else args.offset for offset, dfh in utils.dfh_walk(offset=offset): - print('offset: 0x{:04x}'.format(offset)) + print('offset: 0x{:04x}, value: 0x{:04x}'.format(offset, dfh.value)) print(' dfh: {}'.format(dfh)) if args.show_uuid: print(' uuid: {}'.format(utils.read_guid(offset+0x8)))
vmm_clone_active_pdir() works when the parent is not the root vmm
@@ -1201,8 +1201,11 @@ vmm_page_directory_t* vmm_clone_active_pdir() { VAS_PRINTF("vmm_clone_active_pdir [P 0x%08x] [V 0x%08x]\n", phys_new_pd, virt_new_pd); uint32_t* new_page_tables = &virt_new_pd->table_pointers; - // Copy the allocation state of the parent directory - memcpy(_vmm_state_bitmap(virt_new_pd), _vmm_state_bitmap(active_pd), sizeof(address_space_page_bitmap_t)); + // Copy the allocation state of the kernel directory + // TODO(PT): Why are we not copying the allocation state of the parent of this task? + // It looks as though this function currently always copies the kernel directory instead of the parent directory + memcpy(_vmm_state_bitmap(virt_new_pd), _vmm_state_bitmap(kernel_vmm_pd), sizeof(address_space_page_bitmap_t)); + // But clear the allocation state of fixed-mappings that we'll allocate now for (uint32_t page_addr = 0xff800000; page_addr < 0xff800000 + (0x1000*1024); page_addr += PAGING_PAGE_SIZE) { vmm_bitmap_unset_addr(virt_new_pd, page_addr); @@ -1241,8 +1244,8 @@ vmm_page_directory_t* vmm_clone_active_pdir() { continue; } - printf("table %d is NOT present in kernel dir, will copy (table 0x%08x)\n", i, kernel_page_table_with_flags); - NotImplemented(); + // TODO(PT): Revisit me and test with a parent and child that has some mappings set up + //printf("table %d is NOT present in kernel dir, will copy (table 0x%08x)\n", i, kernel_page_table_with_flags); /* uint32_t* source_page_table = _get_phys_page_table_pointer_from_table_idx(source_vmm_dir, i);
Makefile.am: Add missing key in case openssl > 1.1.0 File: Makefile.am Notes: fix missing test keys Credit: Laurent Stacul
@@ -30,6 +30,9 @@ EXTRA_DIST = \ key_dsa_wrong.pub \ key_ecdsa \ key_ecdsa.pub \ + signed_key_ecdsa \ + signed_key_ecdsa.pub \ + signed_key_ecdsa-cert.pub \ key_ed25519 \ key_ed25519.pub \ key_ed25519_encrypted \
set /oc/con not observable
@@ -903,6 +903,9 @@ main(void) if (init < 0) return init; + oc_resource_t *con_resource = oc_core_get_resource_by_index(OCF_CON, 0); + oc_resource_set_observable(con_resource, false); + display_device_uuid(); PRINT("OCF server \"Rules Test Server\" running, waiting on incomming " "connections.\n");
Update yfm for ya make to 2.13.7
@@ -8,9 +8,9 @@ ENDIF() DECLARE_EXTERNAL_HOST_RESOURCES_BUNDLE( YFM_TOOL - sbr:1463039419 FOR WIN32 - sbr:1463039076 FOR DARWIN - sbr:1463038804 FOR LINUX + sbr:1465426870 FOR WIN32 + sbr:1465426588 FOR DARWIN + sbr:1465426088 FOR LINUX ) END()
Debugging aid for cmake variables
@@ -478,6 +478,12 @@ if( HAVE_FORTRAN ) ) endif() +############################################################################### +# Debugging aid. Print all known CMake variables +# get_cmake_property(_variableNames VARIABLES) +# foreach( _variableName ${_variableNames} ) +# ecbuild_info(" ${_variableName}=${${_variableName}}") +# endforeach() ############################################################################### # finalize
OpenAL fallback for Unix;
@@ -149,7 +149,13 @@ if (WIN32) include_directories(deps/openal-soft/include) set(LOVR_OPENAL OpenAL32) elseif(NOT EMSCRIPTEN) - pkg_search_module(OPENAL REQUIRED openal) + pkg_search_module(OPENAL openal-soft) + if (NOT OPENAL_FOUND) + pkg_search_module(OPENAL openal) + if (NOT OPENAL_FOUND) + message(FATAL_ERROR "OpenAL not found.") + endif() + endif() include_directories(${OPENAL_INCLUDE_DIRS}) string(REPLACE ";" " " OPENAL_LDFLAGS_STR "${OPENAL_LDFLAGS}") set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} ${OPENAL_LDFLAGS_STR}")
poked github
@@ -210,7 +210,6 @@ int main(int argc,char **argv) config.transfer_function_method=ccl_boltzmann_class; ccl_parameters params = ccl_parameters_create(OC, OB, OK, NREL, NMAS, MNU, W0, WA, HH, NORMPS, NS,-1,-1,-1,-1,NULL,NULL, &status); - //printf("in sample run w0=%1.12f, wa=%1.12f\n", W0, WA); // Initialize cosmology object given cosmo params ccl_cosmology *cosmo=ccl_cosmology_create(params,config);
Add test-arena to make file.
@@ -29,6 +29,8 @@ yarac_SOURCES = args.c args.h common.h yarac.c yarac_LDADD = -Llibyara/.libs -lyara test_alignment_SOURCES = tests/test-alignment.c +test_arena_SOURCES = tests/test-arena.c +test_arena_LDADD = libyara/.libs/libyara.a test_atoms_SOURCES = tests/test-atoms.c tests/util.c libyara/atoms.c test_atoms_LDADD = libyara/.libs/libyara.a test_rules_SOURCES = tests/test-rules.c tests/util.c @@ -52,7 +54,9 @@ test_re_split_LDADD = libyara/.libs/libyara.a TESTS = $(check_PROGRAMS) TESTS_ENVIRONMENT = TOP_SRCDIR=$(top_srcdir) -check_PROGRAMS = test-alignment \ +check_PROGRAMS = \ + test-arena \ + test-alignment \ test-atoms \ test-api \ test-rules \
Add coveralls support to TravisCI file
@@ -25,9 +25,12 @@ before_install: # - dvipng install: python setup.py install script: - - python tests/run_tests.py --debug --detailed-errors --verbose --process-restartworker + - python tests/run_tests.py --debug --detailed-errors --verbose --process-restartworker --with-coverage --cover-package=pyccl - make check-cpp +after_success: + - coveralls + # Check why the note creation process crashes # - make -C doc/0000-ccl_note #after_success:
[core] perf: buffer_align_size() identity if align use identity if requested size is already aligned to BUFFER_PIECE_SIZE
@@ -77,12 +77,11 @@ void buffer_move(buffer *b, buffer *src) { tmp = *src; *src = *b; *b = tmp; } -#define BUFFER_PIECE_SIZE 64 +#define BUFFER_PIECE_SIZE 64uL /*(must be power-of-2)*/ static size_t buffer_align_size(size_t size) { - size_t align = BUFFER_PIECE_SIZE - (size % BUFFER_PIECE_SIZE); - /* overflow on unsinged size_t is defined to wrap around */ - if (size + align < size) return size; - return size + align; + size_t aligned = (size + BUFFER_PIECE_SIZE-1) & ~(BUFFER_PIECE_SIZE-1); + force_assert(aligned >= size); + return aligned; } /* make sure buffer is at least "size" big. discard old data */
[README.md] Fix blockquote in README.md Blockquote in README.md misses a ` character. This commit fixes it.
@@ -125,7 +125,7 @@ To check all pre-defined configurations, type as follows: ##### 1.1 Additional Configuration (optional) After basic configuration by [1. Configuration](#1-configuration), you can additionally modify your configuration with *menuconfig*. -``bash +```bash ./dbuild.sh menuconfig ``` > **Note**