message
stringlengths
6
474
diff
stringlengths
8
5.22k
Fixed loading wheel on mobile UI The loading wheel correctly disapears when the loading is completed on the mobile search UI.
@@ -13,6 +13,12 @@ AjaxFranceLabs.PrevisualizeResultWidget = AjaxFranceLabs.ResultWidget.extend({ afterRequest : function() { var data = this.manager.response, elm = $(this.elm),self=this; + + if (!this.isMobile) + elm.find('.doc_list').empty(); + else + elm.find('.doc_list .bar-loader').remove(); + var querySolr = getParamValue('query', decodeURIComponent(window.location.search)); this._super(); var self = this;
Use more general sizeof to get arch "bitness"
@@ -211,10 +211,10 @@ util_files = files( 'src/mesa/util/os_time.c', ) -if target_machine.cpu_family() == 'x86_64' +if cc.sizeof('void*') == 8 pre_args += '-DMANGOHUD_ARCH="64bit"' endif -if target_machine.cpu_family() == 'x86' +if cc.sizeof('void*') == 4 pre_args += '-DMANGOHUD_ARCH="32bit"' endif
Update badge locations
@@ -14,11 +14,11 @@ Agnostic Cloud Provider Azure -[![Nightly Testing Status](https://oe-jenkins-dev.westeurope.cloudapp.azure.com/buildStatus/icon?job=Nightly&subject=Azure%20Regression%20Testing)](https://oe-jenkins-dev.westeurope.cloudapp.azure.com/job/Nightly/) -[![Build Status](https://oe-jenkins-dev.westeurope.cloudapp.azure.com/job/pipelines/job/Azure-Windows-Badge/badge/icon?subject=Azure-Windows)](https://oe-jenkins-dev.westeurope.cloudapp.azure.com/job/pipelines/job/Azure-Windows-Badge/) -[![Nightly Libcxx Testing Status](https://oe-jenkins-dev.westeurope.cloudapp.azure.com/buildStatus/icon?job=OpenEnclave-libcxx-tests&subject=Azure%20libcxx%20testing)](https://oe-jenkins-dev.westeurope.cloudapp.azure.com/job/OpenEnclave-libcxx-tests/) -[![Build Status](https://oe-jenkins-dev.westeurope.cloudapp.azure.com/job/pipelines/job/Azure-Linux-Badge/badge/icon?subject=Azure-Linux)](https://oe-jenkins-dev.westeurope.cloudapp.azure.com/job/pipelines/job/Azure-Linux-Badge/) -[![Packages Build Status](https://oe-jenkins-dev.westeurope.cloudapp.azure.com/buildStatus/icon?job=OpenEnclave-nightly-packages&subject=Azure%20Package%20build)](https://oe-jenkins-dev.westeurope.cloudapp.azure.com/job/OpenEnclave-nightly-packages/) +[![Nightly Regression](https://oe-jenkins-dev.westeurope.cloudapp.azure.com/job/OpenEnclave/job/Nightly/badge/icon?subject=Azure%20Regression%20Testing)](https://oe-jenkins-dev.westeurope.cloudapp.azure.com/job/OpenEnclave/job/Nightly/) +[![Azure Windows](https://oe-jenkins-dev.westeurope.cloudapp.azure.com/job/OpenEnclave/job/Azure-Windows-Badge/badge/icon?subject=Azure-Windows)](https://oe-jenkins-dev.westeurope.cloudapp.azure.com/job/OpenEnclave/job/Azure-Windows-Badge/) +[![Nightly Libcxx](https://oe-jenkins-dev.westeurope.cloudapp.azure.com/job/OpenEnclave/job/OpenEnclave-libcxx-tests/badge/icon?subject=Azure%20libcxx%20testing)](https://oe-jenkins-dev.westeurope.cloudapp.azure.com/job/OpenEnclave/job/OpenEnclave-libcxx-tests/) +[![Azure Linux](https://oe-jenkins-dev.westeurope.cloudapp.azure.com/job/OpenEnclave/job/Azure-Linux-Badge/badge/icon?subject=Azure-Linux)](https://oe-jenkins-dev.westeurope.cloudapp.azure.com/job/OpenEnclave/job/Azure-Linux-Badge/) +[![Nightly Packages](https://oe-jenkins-dev.westeurope.cloudapp.azure.com/job/OpenEnclave/job/OpenEnclave-nightly-packages/badge/icon?subject=Azure%20Package%20build)](https://oe-jenkins-dev.westeurope.cloudapp.azure.com/job/OpenEnclave/job/OpenEnclave-nightly-packages/) Introduction
decision: add new possible solution for value transformations
@@ -73,10 +73,9 @@ Plugins relying on change tracking plugins (e.g. notification plugins) will howe ## Assumptions -1. -2. False positives for change tracking algorithms are only a minor problem. -3. There is no reason to modify or delete existing `meta:/` keys. -4. Newly generated `meta:/...` keys can +1. False positives for change tracking algorithms are only a minor problem. +2. There is no reason to modify or delete existing `meta:/` keys. +3. Newly generated `meta:/...` keys can - either stay and get permanently stored during `kdbSet` - or be written as `meta:/generated/...`. The `meta:/generated/...` metakeys are never stored and are automatically removed during `kdbSet` before `storage` is called. @@ -123,6 +122,16 @@ Something similar could be done for the value of a key as well. We could also introduce a new phase between before/after storage exclusively for transformations. Then we can just do a "fake" call to that phase to get back the transient names for change tracking. +### Call value transformation plugin(s) when `keySetValue` / `keySetString` is called + +After a value has been set by the user, call the transformation plugin. +We could store those callbacks as metakeys, i.e. `meta:/generated/transformation/value/callback/#1`. + +In `keySetRaw` we then call all those callbacks. +We also need to provide a simple API to plugins to register such callbacks for a key. + +As the transformations will be applied before `kdbSet`, this will elimate lots of possible false positives in changetracking. + ## Decision ## Rationale
improve SSL leak fix redis/hiredis#896 Free SSL object when redisSSLConnect fails but avoid doing that for callers of redisInitiateSSL who are supposed to manager their own SSL object.
@@ -351,7 +351,6 @@ static int redisSSLConnect(redisContext *c, SSL *ssl) { } hi_free(rssl); - SSL_free(ssl); return REDIS_ERR; } @@ -393,7 +392,11 @@ int redisInitiateSSLWithContext(redisContext *c, redisSSLContext *redis_ssl_ctx) } } - return redisSSLConnect(c, ssl); + if (redisSSLConnect(c, ssl) != REDIS_OK) { + goto error; + } + + return REDIS_OK; error: if (ssl)
change NVME pblock
resize_pblock pblock_action -remove CLOCKREGION_X3Y4:CLOCKREGION_X5Y4 resize_pblock pblock_action -remove CLOCKREGION_X3Y3:CLOCKREGION_X3Y3 -resize_pblock pblock_snap -add CLOCKREGION_X3Y3:CLOCKREGION_X5Y3 - +resize_pblock pblock_snap -add CLOCKREGION_X3Y3:CLOCKREGION_X5Y4 +resize_pblock pblock_snap -add CLOCKREGION_X4Y0:CLOCKREGION_X5Y2 set_property parent pblock_snap [get_pblocks b_baseimg] # add NVME area to SNAP
http: golf out an assignment
@@ -48,8 +48,7 @@ struct event_t { BPF_PERF_OUTPUT(events); int trace_receive_request(struct pt_regs *ctx) { - struct event_t ev = {}; - ev.type = HTTP_EVENT_RECEIVE_REQ; + struct event_t ev = { .type = HTTP_EVENT_RECEIVE_REQ }; bpf_usdt_readarg(1, ctx, &ev.conn_id); bpf_usdt_readarg(2, ctx, &ev.req_id); bpf_usdt_readarg(3, ctx, &ev.http_version); @@ -58,8 +57,7 @@ int trace_receive_request(struct pt_regs *ctx) { } int trace_receive_request_header(struct pt_regs *ctx) { - struct event_t ev = {}; - ev.type = HTTP_EVENT_RECEIVE_REQ_HDR; + struct event_t ev = { .type = HTTP_EVENT_RECEIVE_REQ_HDR }; void *pos = NULL; bpf_usdt_readarg(1, ctx, &ev.conn_id); bpf_usdt_readarg(2, ctx, &ev.req_id);
docs: remove chapter numbers and make them common to both targets
@@ -14,9 +14,9 @@ Hardware description The {IDF_TARGET_NAME} has a number of eFuses which can store system and user parameters. Each eFuse is a one-bit field which can be programmed to 1 after which it cannot be reverted back to 0. Some of system parameters are using these eFuse bits directly by hardware modules and have special place (for example EFUSE_BLK0). -.. only:: esp32 +For more details, see Chapter eFuse Controller of `{IDF_TARGET_NAME} Technical Reference Manual <{IDF_TARGET_TRM_EN_URL}>`_. Some eFuse bits are available for user applications. - For more details see `{IDF_TARGET_NAME} Technical Reference Manual <{IDF_TARGET_TRM_EN_URL}>`_ in part 21 eFuse controller. Some eFuse bits are available for user applications. +.. only:: esp32 ESP32 has 4 eFuse blocks each of the size of 256 bits (not all bits are available): @@ -27,8 +27,6 @@ Some of system parameters are using these eFuse bits directly by hardware module .. only:: esp32s2 - For more details see `{IDF_TARGET_NAME} Technical Reference Manual <{IDF_TARGET_TRM_EN_URL}>`_. Some eFuse bits are available for user applications. - {IDF_TARGET_NAME} has 11 eFuse blocks each of the size of 256 bits (not all bits are available):
ks: Remove unused keyCompareByNameCase
@@ -533,51 +533,6 @@ static int keyCompareByName (const void * p1, const void * p2) return ret; } -/** - * @brief Compare by unescaped name only, ignoring case - * - * @internal - * - * @param p1 - * @param p2 - * - * @return - */ -static int keyCompareByNameCase (const void * p1, const void * p2) -{ - Key * key1 = *(Key **) p1; - Key * key2 = *(Key **) p2; - const void * name1 = key1->key + key1->keySize; - const void * name2 = key2->key + key2->keySize; - size_t const nameSize1 = key1->keyUSize; - size_t const nameSize2 = key2->keyUSize; - int ret = 0; - if (nameSize1 == nameSize2) - { - ret = elektraMemCaseCmp (name1, name2, nameSize2); - } - else - { - if (nameSize1 < nameSize2) - { - ret = elektraMemCaseCmp (name1, name2, nameSize1); - if (ret == 0) - { - ret = -1; - } - } - else - { - ret = elektraMemCaseCmp (name1, name2, nameSize2); - if (ret == 0) - { - ret = 1; - } - } - } - return ret; -} - /** * @brief Compare only the owner of two keys (not the name) *
fixed bug in status output on AP-LESS handshake
@@ -1673,7 +1673,7 @@ if(eapauth->type == EAPOL_KEY) { if((statusout & STATUS_EAPOL) == STATUS_EAPOL) { - printtimenet(macfrx->addr1, macfrx->addr1); + printtimenet(macfrx->addr2, macfrx->addr1); apzeiger = getessid(macfrx->addr1); if(apzeiger != NULL) {
Handle rto of 1 ms
@@ -2383,7 +2383,9 @@ sctp_timer_start(int t_type, struct sctp_inpcb *inp, struct sctp_tcb *stcb, } rndval = sctp_select_initial_TSN(&inp->sctp_ep); jitter = rndval % to_ticks; + if (to_ticks > 1) { to_ticks >>= 1; + } if (jitter < (UINT32_MAX - to_ticks)) { to_ticks += jitter; } else {
SOVERSION bump to version 2.28.8
@@ -66,7 +66,7 @@ set(LIBYANG_VERSION ${LIBYANG_MAJOR_VERSION}.${LIBYANG_MINOR_VERSION}.${LIBYANG_ # set version of the library set(LIBYANG_MAJOR_SOVERSION 2) set(LIBYANG_MINOR_SOVERSION 28) -set(LIBYANG_MICRO_SOVERSION 7) +set(LIBYANG_MICRO_SOVERSION 8) set(LIBYANG_SOVERSION_FULL ${LIBYANG_MAJOR_SOVERSION}.${LIBYANG_MINOR_SOVERSION}.${LIBYANG_MICRO_SOVERSION}) set(LIBYANG_SOVERSION ${LIBYANG_MAJOR_SOVERSION})
Fix issues reported by static analysis.
@@ -8484,8 +8484,9 @@ GetDDRCapacities( NVDIMM_ENTRY(); - if (NULL == pDDRRawCapacity) { - NVDIMM_DBG("A pointer is null."); + if (pDDRRawCapacity == NULL || + (pDDRInaccessibleCapacity != NULL && (pDDRCacheCapacity == NULL || pDDRVolatileCapacity == NULL))) { + NVDIMM_DBG("Invalid parameter"); goto Finish; }
Only send custom extensions where we have received one in the ClientHello We already did this for ServerHello and EncryptedExtensions. We should be doing it for Certificate and HelloRetryRequest as well.
@@ -181,11 +181,10 @@ int custom_ext_add(SSL *s, int context, WPACKET *pkt, X509 *x, size_t chainidx, if ((context & (SSL_EXT_TLS1_2_SERVER_HELLO | SSL_EXT_TLS1_3_SERVER_HELLO - | SSL_EXT_TLS1_3_ENCRYPTED_EXTENSIONS)) != 0) { - /* - * For ServerHello/EncryptedExtensions only send extensions present - * in ClientHello. - */ + | SSL_EXT_TLS1_3_ENCRYPTED_EXTENSIONS + | SSL_EXT_TLS1_3_CERTIFICATE + | SSL_EXT_TLS1_3_HELLO_RETRY_REQUEST)) != 0) { + /* Only send extensions present in ClientHello. */ if (!(meth->ext_flags & SSL_EXT_FLAG_RECEIVED)) continue; }
Yajl: Naive approach for generating empty arrays
@@ -93,8 +93,7 @@ static int elektraGenOpenValue (yajl_gen g, const Key * next) ELEKTRA_LOG_DEBUG ("next: \"%.*s\"", (int) last.size, last.current); - const char * meta = keyString (keyGetMeta (next, "array")); - if (*meta == '\0') + if (!strcmp (last.current, "###empty_array")) { ELEKTRA_LOG_DEBUG ("GEN empty array in value"); yajl_gen_array_open (g); @@ -204,8 +203,8 @@ int elektraGenEmpty (yajl_gen g, KeySet * returned, Key * parentKey) { Key * toCheck = keyDup (parentKey); - const char * meta = keyString (keyGetMeta (ksTail (returned), "array")); - if (*meta == '\0') + keyAddBaseName (toCheck, "###empty_array"); + if (!strcmp (keyName (ksTail (returned)), keyName (toCheck))) { ELEKTRA_LOG_DEBUG ("GEN empty array (got %s)", keyName (ksTail (returned))); yajl_gen_array_open (g); @@ -251,6 +250,32 @@ int elektraGenWriteFile (yajl_gen g, Key * parentKey) return 1; /* success */ } +static void elektraCheckForEmptyArray (KeySet * ks) +{ + Key * curr = 0; + ksRewind (ks); + + while ((curr = ksNext (ks)) != 0) + { + ELEKTRA_LOG_DEBUG ("WALK: %s", keyName (curr)); + const char * meta = keyString (keyGetMeta (curr, "array")); + if (*meta == '\0') + { + cursor_t cursor = ksGetCursor (ks); + + Key * k = keyNew (keyName (curr), KEY_END); + keyAddBaseName (k, "###empty_array"); + + ELEKTRA_LOG_DEBUG ("Add empty array: %s", keyName (k)); + + ksAppendKey (ks, k); + keyDel (k); + + ksSetCursor (ks, cursor); + } + } +} + int elektraYajlSet (Plugin * handle ELEKTRA_UNUSED, KeySet * returned, Key * parentKey) { #if YAJL_MAJOR == 1 @@ -261,6 +286,8 @@ int elektraYajlSet (Plugin * handle ELEKTRA_UNUSED, KeySet * returned, Key * par yajl_gen_config (g, yajl_gen_beautify, 1); #endif + elektraCheckForEmptyArray (returned); + if (ksGetSize (returned) == 1 && !strcmp (keyName (parentKey), keyName (ksHead (returned))) && keyGetValueSize (ksHead (returned)) > 1) {
Docker: Remove PEGTL source code from image
@@ -125,8 +125,10 @@ RUN cd /tmp \ # PEGTL ARG PEGTL_VERSION=2.7.1 -RUN git clone --branch ${PEGTL_VERSION} --depth 1 https://github.com/taocpp/PEGTL.git \ - && cp -R PEGTL/include/tao /usr/local/include +RUN cd /tmp \ + && git clone --branch ${PEGTL_VERSION} --depth 1 https://github.com/taocpp/PEGTL.git \ + && cp -R PEGTL/include /usr/local/include \ + && rm -rf PEGTL # YAEP ARG YAEP_VERSION=550de4cc5600d5f6109c7ebcfbacec51bf80d8d3
sdcard_image-rpi.bbclass: Remove SDIMG_COMPRESSION Using SDIMG_COMPRESSION variable to choose compression type for produced images is deprecated. IMAGE_FSTYPES should be used instead. This patch removes any response to SDIMG_COMPRESSION within sdcard_image-rpi.bbclass
@@ -64,13 +64,6 @@ do_image_rpi_sdimg[recrdeps] = "do_build" # SD card image name SDIMG = "${IMGDEPLOYDIR}/${IMAGE_NAME}.rootfs.rpi-sdimg" -# Compression method to apply to SDIMG after it has been created. Supported -# compression formats are "gzip", "bzip2" or "xz". The original .rpi-sdimg file -# is kept and a new compressed file is created if one of these compression -# formats is chosen. If SDIMG_COMPRESSION is set to any other value it is -# silently ignored. -#SDIMG_COMPRESSION ?= "" - # Additional files and/or directories to be copied into the vfat partition from the IMAGE_ROOTFS. FATPAYLOAD ?= "" @@ -177,19 +170,6 @@ IMAGE_CMD_rpi-sdimg () { else dd if=${SDIMG_ROOTFS} of=${SDIMG} conv=notrunc seek=1 bs=$(expr 1024 \* ${BOOT_SPACE_ALIGNED} + ${IMAGE_ROOTFS_ALIGNMENT} \* 1024) fi - - # Optionally apply compression - case "${SDIMG_COMPRESSION}" in - "gzip") - gzip -k9 "${SDIMG}" - ;; - "bzip2") - bzip2 -k9 "${SDIMG}" - ;; - "xz") - xz -k "${SDIMG}" - ;; - esac } ROOTFS_POSTPROCESS_COMMAND += " rpi_generate_sysctl_config ; "
On interface deletion - make sure any vlan qinq table is cleared
@@ -342,6 +342,7 @@ ethernet_delete_interface (vnet_main_t * vnm, u32 hw_if_index) if (vlan_table->vlans[idx].qinqs) { pool_put_index (em->qinq_pool, vlan_table->vlans[idx].qinqs); + vlan_table->vlans[idx].qinqs = 0; } } pool_put_index (em->vlan_pool, main_intf->dot1q_vlans); @@ -355,6 +356,7 @@ ethernet_delete_interface (vnet_main_t * vnm, u32 hw_if_index) if (vlan_table->vlans[idx].qinqs) { pool_put_index (em->qinq_pool, vlan_table->vlans[idx].qinqs); + vlan_table->vlans[idx].qinqs = 0; } } pool_put_index (em->vlan_pool, main_intf->dot1ad_vlans);
Added latest schema changes
@@ -429,6 +429,18 @@ Describes settings for the trace capture device. <td>complexType</td> <td>0..*</td> </tr> + <tr> + <th>Attributes</th> + <th>Description</th> + <th>Type</th> + <th>Use</th> + </tr> + <tr> + <td>type</td> + <td>Trace capture type: parallel or HSSTP.</td> + <td>xs:string</td> + <td>required</td> + </tr> </table> \delim
fix new 2019 crash when deleting asset history when the Evaluation Manager is on by turning the EM off while deleting asset history.
@@ -86,6 +86,19 @@ houdiniEngine_deleteHistory(string $node) // deletes it for all the objects parented under the asset, then deletes the asset string $assetNode = $upstreamAssets[0]; + if($assetNode == "") { + print "Error: the selected node does not appear to have asset history: use the regular Delete History.\n"; + return 0; + } + + // in 2019, if we do the delete history with the evaluationManager on + // it crashes in some EM operations on idle, so we go back to DG mode + string $prevEMMode = "off"; + if(`about -apiVersion` >= 20190000) { + string $emMode[] = `evaluationManager -q -mode`; + $prevEMMode = $emMode[0]; + evaluationManager -mode "off"; + } // unparent children of asset (history asset should not have any) string $children[] = `listRelatives -c -f $assetNode`; @@ -119,6 +132,9 @@ houdiniEngine_deleteHistory(string $node) delete -ch $object; delete_all_upstream_assets($assetNode); delete $assetNode; + if( $prevEMMode != "off") { + evaluationManager -mode $prevEMMode; + } return 0; }
Fix NULL pointer in picoquicdemo
@@ -691,7 +691,9 @@ int quic_client(const char* ip_address_text, int server_port, /* Wait for packets */ if (ret == 0) { + if (config->multipath_alternative_ip != NULL) { picoquic_store_text_addr(&loop_cb.client_alt_address, config->multipath_alternative_ip, 0); + } loop_cb.cnx_client = cnx_client; loop_cb.force_migration = force_migration; @@ -971,8 +973,8 @@ int main(int argc, char** argv) (void)WSA_START(MAKEWORD(2, 2), &wsaData); #endif picoquic_config_init(&config); - memcpy(option_string, "A:d:u:f:1", 9); - ret = picoquic_config_option_letters(option_string + 9, sizeof(option_string) - 9, NULL); + memcpy(option_string, "A:u:f:1", 7); + ret = picoquic_config_option_letters(option_string + 7, sizeof(option_string) - 7, NULL); if (ret == 0) { /* Get the parameters */
FIPS Checksums CI: use separate directories for the checkouts
@@ -9,16 +9,19 @@ jobs: run: | sudo apt-get update sudo apt-get -yq --no-install-suggests --no-install-recommends --force-yes install unifdef - - uses: actions/checkout@v2 - with: - ref: ${{ github.event.pull_request.base.sha }} - name: create build dirs run: | mkdir ./build-pristine + mkdir ./source-pristine mkdir ./build + mkdir ./source mkdir ./artifact + - uses: actions/checkout@v2 + with: + ref: ${{ github.event.pull_request.base.sha }} + path: source-pristine - name: config pristine - run: ../config enable-fips && perl configdata.pm --dump + run: ../source-pristine/config enable-fips && perl configdata.pm --dump working-directory: ./build-pristine - name: make build_generated pristine run: make -s build_generated @@ -28,9 +31,9 @@ jobs: working-directory: ./build-pristine - uses: actions/checkout@v2 with: - clean: false + path: source - name: config - run: ../config enable-fips && perl configdata.pm --dump + run: ../source/config enable-fips && perl configdata.pm --dump working-directory: ./build - name: make build_generated run: make -s build_generated @@ -38,9 +41,11 @@ jobs: - name: make fips-checksums run: make fips-checksums working-directory: ./build - - name: update checksums pristine - run: touch providers/fips.checksum.new && make update-fips-checksums - working-directory: ./build-pristine + - name: update checksums + run: | + cp -a build-pristine/providers/fips.module.sources.new source/providers/fips.module.sources + cp -a build-pristine/providers/fips-sources.checksums.new source/providers/fips-sources.checksums + cp -a build-pristine/providers/fips.checksum.new source/providers/fips.checksum - name: make diff-fips-checksums run: make diff-fips-checksums && touch ../artifact/fips_unchanged || ( touch ../artifact/fips_changed ; echo FIPS CHANGED ) working-directory: ./build
tools/ci/docker/linux/Dockerfile: add libv4l-dev
@@ -245,11 +245,12 @@ RUN apt-get update -qq && DEBIAN_FRONTEND="noninteractive" apt-get install -y -q libasound2-dev libasound2-dev:i386 \ libc6-dev-i386 \ libcurl4-openssl-dev \ - libncurses5-dev \ libmad0-dev:i386 \ + libncurses5-dev \ libpulse-dev libpulse-dev:i386 \ libpython2.7 \ libtinfo5 \ + libv4l-dev libv4l-dev:i386 \ libx11-dev libx11-dev:i386 \ libxext-dev libxext-dev:i386 \ linux-headers-generic \
Upgrade tarketSdkVersion to 29 This fixes a lint warning.
apply plugin: 'com.android.application' android { - compileSdkVersion 27 + compileSdkVersion 29 defaultConfig { applicationId "com.genymobile.scrcpy" minSdkVersion 21 - targetSdkVersion 27 + targetSdkVersion 29 versionCode 9 versionName "1.8" testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
use strstr to find part of essid (option: -E)
@@ -381,17 +381,18 @@ hcx_t *zeigerhcx; FILE *fhhcx; long int c; long int rw = 0; -int essid_len; - char essidoutname[PATH_MAX +1]; -essid_len = strlen(essidname); +char essidstr[34]; + snprintf(essidoutname, PATH_MAX, "%s.hccapx", essidname); c = 0; while(c < hcxrecords) { zeigerhcx = hcxdata +c; - if(memcmp(essidname, zeigerhcx->essid, essid_len) == 0) + memset(&essidstr, 0, 34); + memcpy(&essidstr, zeigerhcx->essid, zeigerhcx->essid_len); + if(strstr(essidstr, essidname) != NULL) { if((fhhcx = fopen(essidoutname, "ab")) == NULL) {
docs/library/pyb.DAC: Fix typo in markup to balance quotes.
@@ -79,7 +79,7 @@ Methods .. method:: DAC.init(bits=8, \*, buffering=None) Reinitialise the DAC. *bits* can be 8 or 12. *buffering* can be - ``None``, ``False`` or ``True`; see above constructor for the meaning + ``None``, ``False`` or ``True``; see above constructor for the meaning of this parameter. .. method:: DAC.deinit()
Verify data flashed when automation is enabled If automation is enabled then read back every page written to verify the contents are correct. This allows devices with worn out flash to be detected.
@@ -110,10 +110,28 @@ static error_t target_flash_program_page(uint32_t addr, const uint8_t *buf, uint return ERROR_WRITE; } + if (config_get_automation_allowed()) { + // Verify data flashed if in automation mode + while (write_size > 0) { + uint8_t rb_buf[16]; + uint32_t verify_size = MIN(write_size, sizeof(rb_buf)); + if (!swd_read_memory(addr, rb_buf, verify_size)) { + return ERROR_ALGO_DATA_SEQ; + } + if (memcmp(buf, rb_buf, verify_size) != 0) { + return ERROR_WRITE; + } + addr += verify_size; + buf += verify_size; + size -= verify_size; + write_size -= verify_size; + } + } else { addr += write_size; buf += write_size; size -= write_size; } + } return ERROR_SUCCESS; }
[catboost] add todo for quantized pool interface
@@ -39,6 +39,7 @@ namespace NCB { // in column 5 will be present in `Chunks[1]`. // THashMap<size_t, size_t> TrueFeatureIndexToLocalIndex; + // TODO(yazevnul): replace with native C++ `TPoolQuantizationSchema` NIdl::TPoolQuantizationSchema QuantizationSchema; TVector<EColumn> ColumnTypes; TDeque<TVector<TChunkDescription>> Chunks;
There is no displacement expression function
@@ -2182,11 +2182,6 @@ smallest neighbor Function: ``smallest_neighbor()`` : ``smallest_neighbor(expr0) neighbor average Function: ``neighbor_average()`` : ``neighbor_average(expr0)`` No description available. -.. _Displacement_Expression_Function: - -Displacement Function: ``displacement()`` : ``displacement(expr0)`` - No description available. - .. _Expression_Compatibility_Gotchas: Expression Compatibility Gotchas
Configure JAVA_HOME correctly for Cooja
@@ -100,7 +100,6 @@ RUN export uid=1000 gid=1000 && \ USER user # Environment variables -ENV JAVA_HOME /usr/lib/jvm/default-java ENV HOME /home/user ENV CONTIKI_NG ${HOME}/contiki-ng ENV COOJA ${CONTIKI_NG}/tools/cooja @@ -113,6 +112,7 @@ RUN echo "#!/bin/bash\nant -Dbasedir=${COOJA} -f ${COOJA}/build.xml run" > ${HOM # Make sure we're using Java 8 for Cooja RUN sudo update-java-alternatives --set /usr/lib/jvm/java-1.8.0-openjdk-i386 +ENV JAVA_HOME /usr/lib/jvm/java-8-openjdk-i386/ # Download, build and install Renode RUN git clone --quiet https://github.com/renode/renode.git \
Implement ++peek so the app can by scried
wipe:(open:watcher +.act) == :: +++ peek-x + |= pax=path + ^- (unit (unit [%noun *])) + ?. ?=([@ *] pax) ~ + =+ eye=(~(get by eyes) i.pax) + ?~ eye [~ ~] + :: /name: all logs + :: + ?~ t.pax ``[%noun logs.u.eye] + :: /name/num: most recent num logs + :: + =+ num=(slaw %ud i.t.pax) + ?^ num ``[%noun (scag u.num logs.u.eye)] + :: /name/debug: debug information + :: + ?. ?=(%debug i.t.pax) ~ + =- ``[%noun -] + =, u.eye + :* node=(en-purl:html node) + last=last-heard-block + lent=(lent logs) + time=poll-timer + == +:: ++ peer |= pax=path ^- (quip move _+>)
py/gc: Reduce code size by specialising VERIFY_MARK_AND_PUSH macro. This macro is written out explicitly in the two locations that it is used and then the code is optimised, opening possibilities for further optimisations and reducing code size: unix: -48 minimal CROSS=1: -32 stm32: -32
@@ -203,24 +203,6 @@ bool gc_is_locked(void) { #endif #endif -// ptr should be of type void* -#define VERIFY_MARK_AND_PUSH(ptr) \ - do { \ - if (VERIFY_PTR(ptr)) { \ - size_t _block = BLOCK_FROM_PTR(ptr); \ - if (ATB_GET_KIND(_block) == AT_HEAD) { \ - /* an unmarked head, mark it, and push it on gc stack */ \ - TRACE_MARK(_block, ptr); \ - ATB_HEAD_TO_MARK(_block); \ - if (MP_STATE_MEM(gc_sp) < &MP_STATE_MEM(gc_stack)[MICROPY_ALLOC_GC_STACK_SIZE]) { \ - *MP_STATE_MEM(gc_sp)++ = _block; \ - } else { \ - MP_STATE_MEM(gc_stack_overflow) = 1; \ - } \ - } \ - } \ - } while (0) - STATIC void gc_drain_stack(void) { while (MP_STATE_MEM(gc_sp) > MP_STATE_MEM(gc_stack)) { // pop the next block off the stack @@ -236,7 +218,20 @@ STATIC void gc_drain_stack(void) { void **ptrs = (void**)PTR_FROM_BLOCK(block); for (size_t i = n_blocks * BYTES_PER_BLOCK / sizeof(void*); i > 0; i--, ptrs++) { void *ptr = *ptrs; - VERIFY_MARK_AND_PUSH(ptr); + if (VERIFY_PTR(ptr)) { + // Mark and push this pointer + size_t childblock = BLOCK_FROM_PTR(ptr); + if (ATB_GET_KIND(childblock) == AT_HEAD) { + // an unmarked head, mark it, and push it on gc stack + TRACE_MARK(childblock, ptr); + ATB_HEAD_TO_MARK(childblock); + if (MP_STATE_MEM(gc_sp) < &MP_STATE_MEM(gc_stack)[MICROPY_ALLOC_GC_STACK_SIZE]) { + *MP_STATE_MEM(gc_sp)++ = childblock; + } else { + MP_STATE_MEM(gc_stack_overflow) = 1; + } + } + } } } } @@ -337,10 +332,19 @@ void gc_collect_start(void) { void gc_collect_root(void **ptrs, size_t len) { for (size_t i = 0; i < len; i++) { void *ptr = ptrs[i]; - VERIFY_MARK_AND_PUSH(ptr); + if (VERIFY_PTR(ptr)) { + // Mark and push this pointer + size_t block = BLOCK_FROM_PTR(ptr); + if (ATB_GET_KIND(block) == AT_HEAD) { + // an unmarked head, mark it, and push it on gc stack + TRACE_MARK(block, ptr); + ATB_HEAD_TO_MARK(block); + *MP_STATE_MEM(gc_sp)++ = block; gc_drain_stack(); } } + } +} void gc_collect_end(void) { gc_deal_with_stack_overflow();
bluetooth:Fix invalid memory access in gatt server deinit
@@ -2712,9 +2712,11 @@ int bt_gatt_server_deinitialize(void) gatt_server_list = NULL; #else bt_gatt_server_s *serv = (bt_gatt_server_s *)sq_peek(&gatt_server_list); + bt_gatt_server_s *curr_serv = NULL; while (serv) { - bt_gatt_server_destroy(serv); + curr_serv = serv; serv = (bt_gatt_server_s *)sq_next(serv); + bt_gatt_server_destroy(curr_serv); } #endif
NthElements Note: mandatory check (NEED_CHECK) was skipped
@@ -639,3 +639,13 @@ template <class It> std::pair<It, It> MinMaxElement(It first, It last) { return std::minmax_element(first, last); } + +template <class TIterator, class TGenerator> +void Generate(TIterator first, TIterator last, TGenerator generator) { + std::generate(first, last, generator); +} + +template <class TIterator, class TSize, class TGenerator> +void GenerateN(TIterator first, TSize count, TGenerator generator) { + std::generate_n(first, count, generator); +}
same code, a little organization
@@ -51,13 +51,13 @@ EOS return ::Rack::Builder.parse_file filename end - def call - if ARGV[0] =~ /(\-\?)|(help)|(\?)|(h)|(\-h)$/ - return print_help + def filename_argument + return ((ARGV[-2].to_s[0] != '-' || ARGV[-2].to_s == '-warmup' || ARGV[-2].to_s == '-v' || ARGV[-2].to_s == '-q' || (ARGV[-2].to_s[0] == '-' && ARGV[-2].to_i.to_s == ARGV[-2].to_s)) && ARGV[-1].to_s[0] != '-' && ARGV[-1]) end + def get_app_opts app, opt = nil, nil - filename = ((ARGV[-2].to_s[0] != '-' || ARGV[-2].to_s == '-warmup' || ARGV[-2].to_s == '-v' || ARGV[-2].to_s == '-q' || (ARGV[-2].to_s[0] == '-' && ARGV[-2].to_i.to_s == ARGV[-2].to_s)) && ARGV[-1].to_s[0] != '-' && ARGV[-1]) + filename = filename_argument if filename app, opt = try_file filename; unless opt @@ -70,17 +70,19 @@ EOS unless opt puts "WARNING: Ruby application not found#{ filename ? " - missing both #{filename} and config.ru" : " - missing config.ru"}." - if ARGV.index('-www') && ARGV[ARGV.index('-www') + 1] + if Iodine::DEFAULT_HTTP_ARGS[:public] puts " Running only static file service." opt = ::Rack::Server::Options.new.parse!([]) else puts "For help run:" puts " iodine -?" - return + exit(0); end end + return app, opt + end - if ARGV.index('-warmup') + def perform_warmup # load anything marked with `autoload`, since autoload isn't thread safe nor fork friendly. Iodine.run do Module.constants.each do |n| @@ -97,6 +99,16 @@ EOS end end end + + def call + if ARGV[0] =~ /(\-\?)|(help)|(\?)|(h)|(\-h)$/ + return print_help + end + + app, opt = get_app_opts + + perform_warmup if ARGV.index('-warmup') + Iodine::Rack.run(app, opt) end
libppd: In IPP-attr-to-PPD-option auto mapper consider "ColorMode" also with prefix This way we also cover "cupsColorMode" for example which appears in auto-generated PPDs for driverless IPP printers (in case we cannot print directly to the printer but only have access via a CUPS queue).
@@ -2233,7 +2233,7 @@ ppdCacheAssignPresets(ppd_file_t *ppd, } /* - * Color/Gray - print-color-mode + * Color/Monochrome - print-color-mode */ /* If we have a color device, check whether this option sets mono or @@ -2257,7 +2257,7 @@ ppdCacheAssignPresets(ppd_file_t *ppd, properties->sets_color = 1; } else if (strcasecmp(o, "ColorModel") == 0 || - strcasecmp(o, "ColorMode") == 0 || + strcasestr(o, "ColorMode") || strcasecmp(o, "OutputMode") == 0 || strcasecmp(o, "PrintoutMode") == 0 || strcasecmp(o, "ARCMode") == 0 || /* Sharp */ @@ -2394,7 +2394,7 @@ ppdCacheAssignPresets(ppd_file_t *ppd, } /* Generic enumerated choice option and choice names */ else if (strcasecmp(o, "ColorModel") == 0 || - strcasecmp(o, "ColorMode") == 0 || + strcasestr(o, "ColorMode") || strcasecmp(o, "OutputMode") == 0 || /* HPLIP hpcups */ strcasecmp(o, "PrintoutMode") == 0 || /* Foomatic */ strcasecmp(o, "PrintQuality") == 0 ||
Ensure we use a dgram mem BIO for the DTLS record layer
@@ -1893,6 +1893,9 @@ int ssl_set_new_record_layer(SSL_CONNECTION *s, int version, && level != OSSL_RECORD_PROTECTION_LEVEL_NONE) epoch = DTLS_RECORD_LAYER_get_r_epoch(&s->rlayer) + 1; /* new epoch */ + if (SSL_CONNECTION_IS_DTLS(s)) + s->rrlnext = BIO_new(BIO_s_dgram_mem()); + else s->rrlnext = BIO_new(BIO_s_mem()); if (s->rrlnext == NULL) {
MIPS: fix inline assembly for FPU
@@ -999,7 +999,7 @@ do { \ #define write_32bit_cp0_set1_register(register,value) \ __asm__ __volatile__( \ - "ctc0\t%0,"STR(register)"\n\t" \ + "ctc0\t%0,$"STR(register)"\n\t" \ "nop" \ : : "r" (value)); @@ -1037,14 +1037,14 @@ do { \ __asm__ __volatile__( \ ".set\tpush\n\t" \ ".set\treorder\n\t" \ - "cfc1\t%0,"STR(source)"\n\t" \ + "cfc1\t%0,$"STR(source)"\n\t" \ ".set\tpop" \ : "=r" (__res)); \ __res;}) #define write_32bit_cp1_register(register,value) \ __asm__ __volatile__( \ - "ctc1\t%0,"STR(register)"\n\t" \ + "ctc1\t%0,$"STR(register)"\n\t" \ "nop" \ : : "r" (value));
Fix indentation in encode_coding_tree.c Fixes indentation of a for loop that was causing a misleading indentation warning on GCC. Fixes
@@ -707,18 +707,22 @@ static uint8_t inline intra_mode_encryption(encoder_state_t * const state, const uint8_t nb_elems[3] = {17, 8, 8}; - if(intra_pred_mode == 26 || intra_pred_mode == 10) /* for correct chroma Inra prediction mode */ + if (intra_pred_mode == 26 || intra_pred_mode == 10) { + // correct chroma intra prediction mode return intra_pred_mode; - else { + + } else { uint8_t keybits, scan_dir, elem_idx=0; keybits = ff_get_key(&state->tile->dbs_g, 5); scan_dir = SCAN_DIAG; - if (intra_pred_mode > 5 && intra_pred_mode < 15 ) + if (intra_pred_mode > 5 && intra_pred_mode < 15) { scan_dir = SCAN_VER; - if (intra_pred_mode > 21 && intra_pred_mode < 31 ) + } + if (intra_pred_mode > 21 && intra_pred_mode < 31) { scan_dir = SCAN_HOR; + } for (int i = 0; i < nb_elems[scan_dir]; i++) { if (intra_pred_mode == sets[scan_dir][i]) {
BugID:17731385:[WhiteScan] solve null pointer check after deref
@@ -820,13 +820,15 @@ static int iotx_mc_mask_pubInfo_from(iotx_mc_client_t *c, uint16_t msgId) /* return: 0, success; NOT 0, fail; */ static int iotx_mc_push_pubInfo_to(iotx_mc_client_t *c, int len, unsigned short msgId, iotx_mc_pub_info_t **node) { - int list_number = list_entry_number(&c->list_pub_wait_ack); + int list_number; if (!c || !node) { mqtt_err("the param of c is error!"); return FAIL_RETURN; } + list_number = list_entry_number(&c->list_pub_wait_ack); + if ((len < 0) || (len > c->buf_size_send)) { mqtt_err("the param of len is error!"); return FAIL_RETURN;
sys/console: NLIP output was not passing through NLIP output was not passing through when g_console_silence_non_nlip was set
@@ -170,7 +170,10 @@ console_write(const char *str, int cnt) if (console_lock(timeout) != OS_OK) { return; } - + if (cnt >= 2 && str[0] == CONSOLE_NLIP_DATA_START1 && + str[1] == CONSOLE_NLIP_DATA_START2) { + g_is_output_nlip = 1; + } /* If the byte string is non nlip and we are silencing non nlip bytes, * do not let it go out on the console */
Fix MSCV compile error due to function order
@@ -738,39 +738,6 @@ ASTCENC_SIMD_INLINE vfloat4 sqrt(vfloat4 a) return vfloat4(_mm_sqrt_ps(a.m)); } -/** - * @brief Return the dot product for the full 4 lanes, returning scalar. - */ -static inline float dot(vfloat4 a, vfloat4 b) -{ -#if (ASTCENC_SSE >= 41) && (ASTCENC_ISA_INVARIANCE == 0) - return _mm_cvtss_f32(_mm_dp_ps(a.m, b.m, 0xFF)); -#else - alignas(16) float av[4]; - alignas(16) float bv[4]; - storea(a, av); - storea(b, bv); - return av[0] * bv[0] + av[1] * bv[1] + av[2] * bv[2] + av[3] * bv[3]; -#endif -} - -/** - * @brief Return the dot product for the full 4 lanes, returning vector. - */ -ASTCENC_SIMD_INLINE vfloat4 dotv(vfloat4 a, vfloat4 b) -{ -#if (ASTCENC_SSE >= 41) && (ASTCENC_ISA_INVARIANCE == 0) - return vfloat4(_mm_dp_ps(a.m, b.m, 0xFF)); -#else - alignas(16) float av[4]; - alignas(16) float bv[4]; - storea(a, av); - storea(b, bv); - float s = av[0] * bv[0] + av[1] * bv[1] + av[2] * bv[2] + av[3] * bv[3]; - return vfloat4(s); -#endif -} - /** * @brief Return lanes from @c b if MSB of @c cond is set, else @c a. */ @@ -810,6 +777,23 @@ ASTCENC_SIMD_INLINE void storea(vfloat4 a, float* p) _mm_store_ps(p, a.m); } +/** + * @brief Return the dot product for the full 4 lanes, returning vector. + */ +ASTCENC_SIMD_INLINE vfloat4 dot(vfloat4 a, vfloat4 b) +{ +#if (ASTCENC_SSE >= 41) && (ASTCENC_ISA_INVARIANCE == 0) + return vfloat4(_mm_dp_ps(a.m, b.m, 0xFF)); +#else + alignas(16) float av[4]; + alignas(16) float bv[4]; + storea(a, av); + storea(b, bv); + float s = av[0] * bv[0] + av[1] * bv[1] + av[2] * bv[2] + av[3] * bv[3]; + return vfloat4(s); +#endif +} + /** * @brief Return a integer value for a float vector, using truncation. */
make fix for fpgadiag CLI change
@@ -45,7 +45,7 @@ class Nlb3Mode(bc.BistMode): bc.load_gbs(gbs_path, bus_num) for test, param in self.executables.items(): print "Running fpgadiag {} test...\n".format(test) - cmd = "fpgadiag {}".format(param) + cmd = "fpgadiag -B {} {}".format(bus_num, param) try: subprocess.check_call(cmd, shell=True) except subprocess.CalledProcessError as e:
fix Dictionary export filter function in unity3d editor lib but not in runtime lib which cause compile er
@@ -1934,6 +1934,30 @@ namespace SLua } } + if (mi.DeclaringType.IsGenericType && mi.DeclaringType.GetGenericTypeDefinition() == typeof(Dictionary<,>)) + { + if (mi.MemberType == MemberTypes.Constructor) + { + ConstructorInfo constructorInfo = mi as ConstructorInfo; + var parameterInfos = constructorInfo.GetParameters(); + if (parameterInfos.Length > 0) + { + if (typeof(System.Collections.IEnumerable).IsAssignableFrom(parameterInfos[0].ParameterType)) + { + return true; + } + } + } + else if (mi.MemberType == MemberTypes.Method) + { + var methodInfo = mi as MethodInfo; + if (methodInfo.Name == "TryAdd" || methodInfo.Name == "Remove" && methodInfo.GetParameters().Length == 2) + { + return true; + } + } + } + return mi.IsDefined(typeof(DoNotToLuaAttribute), false); }
socketfuzzer/vulnserver_cov: check for failing malloc()
@@ -24,6 +24,9 @@ void handleData1(char *data, int len) { /* Third message is heap overflow */ void handleData2(char *data, int len) { char *buff = malloc(8); + if (!buff) { + abort(); + } bzero(buff, 8); memcpy(buff, data, len); printf("# vulnserver_cov: Handledata2: %s\n", buff);
add resizeaspectmouse
@@ -315,6 +315,7 @@ static Button buttons[] = { { ClkClientWin, MODKEY, Button1, movemouse, {0} }, { ClkClientWin, MODKEY, Button2, togglefloating, {0} }, { ClkClientWin, MODKEY, Button3, resizemouse, {0} }, + { ClkClientWin, MODKEY | ShiftMask, Button3, resizeaspectmouse, {0} }, { ClkTagBar, 0, Button1, dragtag, {0} }, { ClkTagBar, 0, Button5, viewtoright, {0} }, { ClkTagBar, MODKEY, Button4, shiftview, {.i = -1 } },
slist: validate separator position to avoid buffer overflow
@@ -95,6 +95,10 @@ int flb_slist_split_string(struct mk_list *list, const char *str, if (end < 0) { end = len - i; } + else if (end == i) { + i++; + continue; + } p_init = (char *) str + i; p_end = p_init + end - 1; @@ -103,6 +107,7 @@ int flb_slist_split_string(struct mk_list *list, const char *str, while (*p_init == ' ') { p_init++; } + while (*p_end == ' ' && p_end >= p_init) { p_end--; }
wip: start building embed at bot-elitebgs.cpp
@@ -17,10 +17,6 @@ void embed_from_json(char *str, size_t len, void *p_embed) using namespace discord::channel::embed; dati *embed = (dati*)p_embed; - add_field(embed, "bla", "blu", false); - add_field(embed, "bli", "blo", false); - add_field(embed, "blia", "blyat", false); - struct sized_buffer **docs = NULL; int total, page, pages, pagingCounter; bool hasPrevPage, hasNextPage; @@ -50,24 +46,25 @@ void embed_from_json(char *str, size_t len, void *p_embed) if(!docs) return; /* early return if no docs found */ struct sized_buffer **faction_presence = NULL; - struct sized_buffer government = {0}, - name = {0}, - name_lower = {0}, - updated_at = {0}; + char government[512], + name[512], + updated_at[512]; for (size_t i=0; docs[i]; ++i) { json_scanf(docs[i]->start, docs[i]->size, "[faction_presence]%L" - "[government]%T" - "[name]%T" - "[name_lower]%T" - "[updated_at]%T", + "[government]%s" + "[name]%s" + "[updated_at]%s", &faction_presence, - &government, - &name, - &name_lower, - &updated_at); + government, + name, + updated_at); + + add_field(embed, "Government", government, true); + add_field(embed, "Name", name, true); + add_field(embed, "Updated at", updated_at, true); if (faction_presence) { struct sized_buffer system_name = {0}, @@ -208,10 +205,11 @@ void on_command( strncpy(new_embed.title, msg->content, sizeof(new_embed.title)); new_embed.timestamp = orka_timestamp_ms(); + new_embed.color = 15844367; //gold + change_footer(&new_embed, "Made with Orka", NULL, NULL); - message::create::params params = { - .embed = &new_embed - }; + message::create::params params = {0}; + params.embed = &new_embed; message::create::run(client, msg->channel_id, &params, NULL);
Corrected lines of s2n_errno.c for LGTM.
@@ -163,9 +163,9 @@ const char *s2n_strerror(int error, const char *lang) return no_such_language; } - for (int i = 0; i < (sizeof(EN) / sizeof(struct s2n_error_translation)); i++) { - if (EN[i].errno_value == error) { - return EN[i].str; + for (int i = 0; i < (sizeof(S2N_ERROR_EN) / sizeof(struct s2n_error_translation)); i++) { + if (S2N_ERROR_EN[i].errno_value == error) { + return S2N_ERROR_EN[i].str; } }
Fix Python 3.8 warning
@@ -167,7 +167,7 @@ def emitCfg(opts, cfg): # We assume that all bare .tcl files are part of Qsys # and ignore them in Quartus flows. To get a .tcl # file in Quartus, use QI:<path to>.tcl. - if (tag is not 'SOURCE_TCL_SCRIPT_FILE'): + if (tag != 'SOURCE_TCL_SCRIPT_FILE'): print('set_global_assignment -name {0} "{1}{2}"' .format(tag, rel_prefix, c))
Fix wrapper regression
%std_exceptions(carto::Bitmap::Bitmap) %std_exceptions(carto::Bitmap::CreateFromCompressed) %ignore carto::Bitmap::Bitmap(const unsigned char*, std::size_t); -%ignore carto::Bitmap::Bitmap(const unsigned char*, unsigned int, unsigned int, ColorFormat::ColorFormat, unsigned int); +%ignore carto::Bitmap::Bitmap(const unsigned char*, unsigned int, unsigned int, ColorFormat::ColorFormat, int); %ignore carto::Bitmap::getPixelData; %rename(getPixelData) carto::Bitmap::getPixelDataPtr; %ignore carto::Bitmap::CreateFromCompressed(const unsigned char*, std::size_t);
Fix cross-build linux->mingw
#include <winsock2.h> #include <ws2tcpip.h> #include <iphlpapi.h> -#include <Mswsock.h> -#include <Windows.h> +#include <mswsock.h> +#include <windows.h> #include "user_environment.h" typedef CRITICAL_SECTION userland_mutex_t; #if WINVER < 0x0600
Fix a memory corruption issue in u3_sung(). Senior nouns were being wrongly unified and freed, breaking untracked junior references. This change should also be applied to the maintenance branch.
@@ -586,6 +586,8 @@ _sang_x(u3_noun a, u3_noun b) } /* _sung_one(): pick a unified pointer for identical (a) and (b). +** +** Assumes exclusive access to noun memory. */ static void _sung_one(u3_noun* a, u3_noun* b) @@ -609,11 +611,19 @@ _sung_one(u3_noun* a, u3_noun* b) if ( _(asr_o) && _(bsr_o) ) { // - // both are senior, so we address them on a higher road - // if possible. + // we can't unify on an inner road, because we can't + // track junior nouns that point into that road. this + // is just an implementation issue -- we could set use + // counts to 0 without actually freeing. but the system + // would have to be actually designed for this. + // + // the commented-out code was installed for quite some + // time in a released system... // - u3R = u3to(u3_road, u3R->par_p); - continue; + // u3R = u3to(u3_road, u3R->par_p); + // continue; + // + return; } if ( _(asr_o) && !_(bsr_o) ){
OcAcpiLib: Fix SSDT dumping
@@ -91,7 +91,7 @@ AcpiGetTableName ( TmpFile->Close (TmpFile); } - AsciiSPrint (&Name[4], NameSize - 4, "-%u", (UINT32) Index); + AsciiSPrint (&Name[4], NameSize - 4, "-%u", (UINT32) (Index + 1)); } EFI_STATUS
enforcement of NodeConcerned filtering into reception.
@@ -144,8 +144,6 @@ void Recep_GetData(volatile unsigned char *data) Transmit_SendAck(); } MsgAlloc_InvalidMsg(); - if (crc + 1 == 0xFFFF) - *data++; } ctx.data_cb = Recep_GetHeader; } @@ -245,9 +243,12 @@ uint8_t Recep_NodeConcerned(header_t *header) } break; case BROADCAST: - case MULTICAST: + if (header->target == BROADCAST_VAL) + { return true; + } break; + case MULTICAST: // For now Multicast is disabled default: return false; break;
UEFI: get the guest entry address explicitly Previously with the help from gcc, __builtin_return_address(0) is used as the guest entry address, but it can't work well with gcc 7.3 and leads to the guest unable to return to UEFI correctly. Let's get it explicitly. Acked-by: Eddie Dong
EFI_SYSTEM_TABLE *sys_table; EFI_BOOT_SERVICES *boot; EFI_RUNTIME_SERVICES *runtime; +extern const uint64_t guest_entry; static inline void hv_jump(EFI_PHYSICAL_ADDRESS hv_start, struct multiboot_info *mbi, struct efi_ctx *efi_ctx) { hv_func hf; - efi_ctx->rip = (uint64_t)__builtin_return_address(0); + efi_ctx->rip = (uint64_t)&guest_entry; /* The 64-bit entry of acrn hypervisor is 0x200 from the start * address of hv image. But due to there is multiboot header, @@ -308,6 +309,9 @@ switch_to_guest_mode(EFI_HANDLE image) asm volatile ("movq %%r15, %0" : "=r"(efi_ctx->r15)); hv_jump(CONFIG_RAM_START, mbi, efi_ctx); + asm volatile (".global guest_entry\n\t" + "guest_entry:\n\t"); + out: return err; }
lyb parser BUGFIX parse attributes with all data hints
@@ -537,7 +537,7 @@ lyb_parse_attributes(struct lylyb_ctx *lybctx, struct lyd_attr **attr) /* attr2 is always changed to the created attribute */ ret = lyd_create_attr(NULL, &attr2, lybctx->ctx, name, strlen(name), prefix, ly_strlen(prefix), module_name, - ly_strlen(module_name), value, ly_strlen(value), &dynamic, format, val_prefix_data, 0); + ly_strlen(module_name), value, ly_strlen(value), &dynamic, format, val_prefix_data, LYD_HINT_DATA); LY_CHECK_GOTO(ret, cleanup); free(prefix);
Upgrade pytest in CI jobs, include pytest-faulthander. Upgrade Python to 3.5
language: python python: - "2.7" -- "3.4" +- "3.5" os: linux env: - BUILD_TOOL=scons CC=gcc-8 CXX=g++-8 @@ -36,7 +36,7 @@ install: - source .ci/travis_install.sh before_script: -- pip install pytest pytest-cov +- pip install --upgrade pytest pytest-cov pytest-faulthandler - (cd python && python setup.py develop) - export UNITTEST_ARGS="" - 'if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then export UNITTEST_ARGS="~~[!nonportable]"; fi'
removed paypal donation link
@@ -86,10 +86,8 @@ https://marketplace.visualstudio.com/items?itemName=zerasul.genesis-code ### SUPPORT SGDK -SGDK is completly free but you can support it on Patreon or using the Paypal donation link. - -Patreon: https://www.patreon.com/SGDK<br> -Paypal donation link: https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=2SCWVXYDEEBUU +SGDK is completly free but you can support it on Patreon:<br> +Patreon: https://www.patreon.com/SGDK Thanks =) I wish you a great and happy coding time !
vere: fix use-after-free on exit in cttp
typedef struct _u3_cttp { u3_auto car_u; // driver u3_creq* ceq_u; // request list + uv_async_t nop_u; // unused handle (async close) h2o_timeout_t tim_u; // request timeout h2o_http1client_ctx_t // ctx_u; // h2o client ctx @@ -1102,6 +1103,17 @@ _cttp_io_kick(u3_auto* car_u, u3_noun wir, u3_noun cad) return ret_o; } +/* _cttp_io_exit_cb(): free cttp. +*/ +static void +_cttp_io_exit_cb(uv_handle_t* han_u) +{ + u3_cttp* ctp_u = han_u->data; + + SSL_CTX_free(ctp_u->tls_u); + c3_free(ctp_u); +} + /* _cttp_io_exit(): shut down cttp. */ static void @@ -1109,6 +1121,10 @@ _cttp_io_exit(u3_auto* car_u) { u3_cttp* ctp_u = (u3_cttp*)car_u; + // close unused handle to free [ctp_u] after h2o is done + // + uv_close((uv_handle_t*)&ctp_u->nop_u, _cttp_io_exit_cb); + // cancel requests // { @@ -1121,8 +1137,6 @@ _cttp_io_exit(u3_auto* car_u) } h2o_timeout_dispose(u3L, &ctp_u->tim_u); - SSL_CTX_free(ctp_u->tls_u); - c3_free(ctp_u); } /* u3_cttp_io_init(): initialize http client I/O. @@ -1136,6 +1150,11 @@ u3_cttp_io_init(u3_pier* pir_u) // ctp_u->ctx_u.loop = u3L; + // unused handle for async close + // + uv_async_init(u3L, &ctp_u->nop_u, 0); + ctp_u->nop_u.data = ctp_u; + // link to initialized request timeout // h2o_timeout_init(u3L, &ctp_u->tim_u, 300 * 1000);
Process GOST ClientKeyExchange message in SSL_trace Use ssl_print_hex to print message in case of GOST key exchange algorithm. CLA: trivial
@@ -1110,6 +1110,10 @@ static int ssl_print_client_keyex(BIO *bio, int indent, const SSL *ssl, if (!ssl_print_hexbuf(bio, indent + 2, "ecdh_Yc", 1, &msg, &msglen)) return 0; break; + case SSL_kGOST: + ssl_print_hex(bio, indent + 2, "GostKeyTransportBlob", msg, msglen); + msglen = 0; + break; }
revert "try to work around gcc update problems" ...as homebrew has dropped at least gcc8 now
@@ -44,11 +44,6 @@ jobs: if: github.event_name != 'pull_request' run: brew update || true - - name: unlink installed gcc to allow updating - run: | - brew unlink gcc@8 - brew unlink gcc@9 - - name: Install prerequisites run: brew install --fetch-HEAD --HEAD --only-dependencies --keep-tmp openblas
io: deprecate CGLM_NO_PRINTS_NOOP
*/ +/* DEPRECATED: CGLM_NO_PRINTS_NOOP (use CGLM_DEFINE_PRINTS) */ + #ifndef cglm_io_h #define cglm_io_h #if defined(DEBUG) || defined(_DEBUG) \ - || defined(CGLM_DEFINE_PRINTS) || defined(CGLM_LIB_SRC) + || defined(CGLM_DEFINE_PRINTS) || defined(CGLM_LIB_SRC) \ + || defined(CGLM_NO_PRINTS_NOOP) #include "common.h"
find lib in $AOMP , not old /opt/rocm/hcc2
@@ -63,7 +63,7 @@ endif CC =$(AOMP)/bin/clang++ # compiler automatically adds "libdevice/<target>/ to -L opts -LFLAGS =-L/opt/rocm/hcc2/lib +LFLAGS =-L$(AOMP)/lib # Add cudart only if we have an Nvidia sm_ target ifeq (sm_,$(findstring sm_,$(TARGETS)))
Fix comment in protocol.h
// -// Copyright 2020 Staysail Systems, Inc. <[email protected]> +// Copyright 2021 Staysail Systems, Inc. <[email protected]> // Copyright 2018 Capitar IT Group BV <[email protected]> // // This software is supplied under the terms of the MIT License, a @@ -159,9 +159,7 @@ struct nni_proto { // These flags determine which operations make sense. We use them so that // we can reject attempts to create notification fds for operations that make // no sense. Also, we can detect raw mode, thereby providing handling for -// that at the socket layer (NNG_PROTO_FLAG_RAW). Finally, we provide the -// NNI_PROTO_FLAG_NOMSGQ flag for protocols that do not use the upper write -// or upper read queues. +// that at the socket layer (NNG_PROTO_FLAG_RAW). #define NNI_PROTO_FLAG_RCV 1u // Protocol can receive #define NNI_PROTO_FLAG_SND 2u // Protocol can send #define NNI_PROTO_FLAG_SNDRCV 3u // Protocol can both send & recv
Count overhead only for allocated chunks.
@@ -347,7 +347,7 @@ heapmem_alloc(size_t size) chunk->line = line; #endif - PRINTF("%s ptr %p size %lu\n", __func__, GET_PTR(chunk), (unsigned long)size); + PRINTF("%s ptr %p size %zu\n", __func__, GET_PTR(chunk), size); return GET_PTR(chunk); } @@ -502,11 +502,11 @@ heapmem_stats(heapmem_stats_t *stats) chunk = NEXT_CHUNK(chunk)) { if(CHUNK_ALLOCATED(chunk)) { stats->allocated += chunk->size; + stats->overhead += sizeof(chunk_t); } else { coalesce_chunks(chunk); stats->available += chunk->size; } - stats->overhead += sizeof(chunk_t); } stats->available += HEAPMEM_ARENA_SIZE - heap_usage; stats->footprint = heap_usage;
fixed typo + added migration notes
@@ -7,7 +7,7 @@ COMPILER - added new TILEMAP resource (see rescomp.txt for more infos) - added Tiled TMX map and object support (TILEMAP, MAP and OBJECT resources) - added Tiled TSX tileset support (TILESET resource) - - added global RGB image support (see rescompt.txt for more infos) + - added global RGB image support (see rescomp.txt for more infos) - added .pal file and RGB image support for PALETTE resource - added extension support so you can add your own custom resource (see rescomp.txt for more infos) - better management of duplicated resources @@ -20,7 +20,7 @@ COMPILER - added support to split VGM and PCM streams in VGM file (Thanks to Vic_) - added ZGM (compressed VGM) export support (Thanks to Vic_, useful for 32X dev) * MAKEFILE - - added '-fms-extensions' flag to allow usage of anonymous embeded structures and enums + - added '-fms-extensions' flag to allow usage of anonymous embedded structures and enums - added '--register-prefix-optional,--bitwise-or' flags to help with assembly code (can use '|' as OR operator) - added 'ext.mk' and 'ext_lib.mk' files for makefile extension and customization - removed '-ggdb' flag for .s files compilation. It makes AS crashing when using 'dc.b' data declaration. @@ -36,7 +36,7 @@ LIBRARY - added new 'pool' unit for easy and fast object pool management - added new 'object' unit for easy general object implementation * VDP - - renamed many constants for better cohenrency in naming convention (ex: TILE_USERINDEX --> TILE_USER_INDEX) + - renamed many constants for better coherency in naming convention (ex: TILE_USERINDEX --> TILE_USER_INDEX) - renamed all GFX_xxx constants to VDP_xxx - added bit fields to VDPSprite structure for easier field manipulation (thanks to Carlos Aragones) - added many methods to manipulate these fields (thanks to Carlos Aragones) @@ -63,8 +63,8 @@ LIBRARY - added p16 type (short pointer for low ROM / high RAM address) * DMA - increased a bit default DMA buffer size -* added macros to create 'enum' compatible with assembly (.s) files -* documentation fixes / cleanups / updates +* added macros to create 'enum' type compatible with assembly (.s) files +* several documentation fixes / cleanups / updates * removed old deprecated units and headers (vdp_pal and vdp_dma) * general cleanup, some refactoring.. @@ -73,6 +73,11 @@ SAMPLE * added new 'platformer' sample (thanks to Gerard Gascon). * tweaked/fixed 'scaling' and 'wobble' samples (using the new fast h-int call) +SGDK 1.80 MIGRATION NOTE +* Add extra '_' character on some constantes (i.e: TILE_USERINDEX --> TILE_USER_INDEX; TILE_FONTINDEX --> TILE_FONT_INDEX; ...) +* Replace all GFX_xxx constants with VDP_xxx +* Add HINTERRUPT_CALLBACK keyword before your hint callback method (see 'scaling' sample for an example) + SGDK 1.70 (February 2022) -------------------------
simulator: fix aspect ratio;
@@ -95,7 +95,7 @@ static bool desktop_getViewAngles(uint32_t view, float* left, float* right, floa float aspect, fov; uint32_t width, height; desktop_getDisplayDimensions(&width, &height); - aspect = (float) width / 2.f / height; + aspect = (float) width / height; fov = 67.f * (float) M_PI / 180.f * .5f; *left = fov * aspect; *right = fov * aspect;
Add def for disabling fortify if desired
@@ -192,7 +192,7 @@ build_target() { build_subdir=release add cc_flags -DNDEBUG -O2 -g0 if [[ $protections_enabled != 1 ]]; then - add cc_flags -fno-stack-protector + add cc_flags -D_FORTIFY_SOURCE=0 -fno-stack-protector fi if [[ $os = mac ]]; then # todo some stripping option
cycle~: adding phase reset to dsp method
@@ -271,6 +271,7 @@ static void cycle_dsp(t_cycle *x, t_signal **sp) { cybuf_checkdsp(x->x_cybuf); x->x_conv = 1.0 / sp[0]->s_sr; + cycle_phase_reset(x); //post("cycle tabsize = %d", x->x_cycle_tabsize); dsp_add(cycle_perform, 5, x, sp[0]->s_n, sp[0]->s_vec, sp[1]->s_vec, sp[2]->s_vec);
Start apiServer early
@@ -452,6 +452,7 @@ namespace MiningForce // start API apiServer = container.Resolve<ApiServer>(); + apiServer.Start(clusterConfig); // start pools in parallel await Task.WhenAll(clusterConfig.Pools.Where(x => x.Enabled).Select(async poolConfig => @@ -480,8 +481,6 @@ namespace MiningForce payoutProcessor.Start(); } - - apiServer.Start(clusterConfig); } private static void RecoverShares(string recoveryFilename)
not gcc-4 on travis...?
@@ -28,6 +28,4 @@ script: - gem uninstall -x iodine - CC=gcc find pkg/iodine-*.gem -exec gem install {} + - gem uninstall -x iodine - - CC=gcc-4 find pkg/iodine-*.gem -exec gem install {} + - - gem uninstall -x iodine - CC=gcc-5 find pkg/iodine-*.gem -exec gem install {} +
Update contributors again.
Federico Agustin Alvarez Calzada <[email protected]> Gil Arasa Verge <[email protected]> Alberto Fulcini <[email protected]> +Ajith Ramachandran <[email protected]> Akash Joshi <[email protected]> Thomas Rory Gummerson <[email protected]>
Improve CSS parser fault tolerance, ignore invalid style name
@@ -770,11 +770,10 @@ static int CSSParser_ParseStyleValue( LCUI_CSSParserContext ctx ) if( *ctx->cur == ';' ) { ctx->target = CSS_TARGET_KEY; } - if( !ctx->style.parser ) { - return -1; - } CSSParser_EndBuffer( ctx ); + if( ctx->style.parser ) { ctx->style.parser->parse( &ctx->style, ctx->buffer ); + } DEBUG_MSG( "parse style value: %s\n", ctx->buffer ); if( *ctx->cur == '}' ) { ctx->target = CSS_TARGET_NONE;
[chainmaker][#575]add lost EXCEED_STR_MAX_LEN macro
* limitations under the License. *****************************************************************************/ #include "tcase_common.h" +#define EXCEED_STR_MAX_LEN 4097 BOAT_RESULT check_chainmaker_wallet(BoatHlchainmakerWallet *wallet_ptr) {
Add Docker building
@@ -61,6 +61,37 @@ build-windows.bat - Install [Visual Studio 2022](https://www.visualstudio.com/vs/). Visual Studio Community Edition is fine. - Open `Miningcore.sln` in Visual Studio +## Building using Docker Engine +In case you don't want to install any dependencies then you can build the app using the official Microsoft .NET SDK Docker image. + +```console +git clone https://github.com/oliverw/miningcore +cd miningcore +``` +Then build using Docker: + +```console +docker run --rm -v $(pwd):/app -w /app mcr.microsoft.com/dotnet/sdk:6.0 /bin/bash -c 'apt update && apt install libssl-dev pkg-config libboost-all-dev libsodium-dev build-essential cmake -y --no-install-recommends && cd src/Miningcore && dotnet publish -c Release --framework net6.0 -o /app/build/' +``` +It will use a Linux container, you will build a Linux executable that will not run on Windows or macOS. You can use a runtime argument (-r) to specify the type of assets that you want to publish (if they don't match the SDK container). The following examples assume you want assets that match your host operating system, and use runtime arguments to ensure that. + +For macOS: + +```console +docker run --rm -v $(pwd):/app -w /app mcr.microsoft.com/dotnet/sdk:6.0 /bin/bash -c 'apt update && apt install libssl-dev pkg-config libboost-all-dev libsodium-dev build-essential cmake -y --no-install-recommends && cd src/Miningcore && dotnet publish -c Release --framework net6.0 -o /app/build/ -r osx-x64 --self-contained false' +``` + +For Windows using Linux container: + +```console +docker run --rm -v $(pwd):/app -w /app mcr.microsoft.com/dotnet/sdk:6.0 /bin/bash -c 'apt update && apt install libssl-dev pkg-config libboost-all-dev libsodium-dev build-essential cmake -y --no-install-recommends && cd src/Miningcore && dotnet publish -c Release --framework net6.0 -o /app/build/ -r win-x64 --self-contained false' +``` + +To delete used images and containers you can run after all: +```console +docker system prune -af +``` + ## Running Miningcore ### Database setup
... and remove the patch file when successful.
@@ -17,4 +17,4 @@ oldrev=`cat .cups-upstream` newrev=`cd ../cups; git show | head -1 | awk '{print $2}'` (cd ../cups; git diff $oldrev cups ':!cups/Dependencies' ':!cups/Makefile' ':!cups/libcups2.def' ':!cups/ppd*' ':!cups/test*') >$newrev.patch -git apply $newrev.patch && (echo $newrev >.cups-upstream; git commit -a -m "Sync up libcups changes from CUPS master@$newrev") +git apply $newrev.patch && (echo $newrev >.cups-upstream; git commit -a -m "Sync up libcups changes from CUPS master@$newrev"; rm -f $newrev.patch)
hwtest/pgraph: Add DMA_NOTIFY size check.
@@ -116,6 +116,13 @@ void MthdDmaNotify::emulate_mthd() { if (extr(exp.debug[1], 20, 1)) exp.ctx_switch[1] = exp.ctx_cache[subc][1]; } + bool check_prot = true; + if (chipset.card_type >= 0x10) + check_prot = dcls != 0x30; + else if (chipset.chipset >= 5) + check_prot = dcls == 2 || dcls == 0x3d; + if (check_prot && pobj[1] < 0x1f) + nv04_pgraph_blowup(&exp, 4); } void MthdDmaGrobj::emulate_mthd() {
restores the reproducibility of the +ivory pill
:: -:::: /hoon/metal/gen +:::: /hoon/ivory/gen :: /? 310 :: :::: !: :- %say -|= $: {now/@da * bec/beak} - * - == +|= [[now=@da * bec=beak] *] :- %noun -:: :: sys: root path to boot system, `/~me/[desk]/now/sys` :: -=+ sys=`path`/(scot %p p.bec)/[q.bec]/(scot %da now)/sys -:: +=/ sys=path + /(scot %p p.bec)/[q.bec]/(scot %da now)/sys :: compiler-source: hoon source file producing compiler, `sys/hoon` :: -=+ compiler-source=.^(@t %cx (welp sys /hoon/hoon)) -:: +=/ compiler-source + .^(@t %cx (welp sys /hoon/hoon)) :: compiler-hoon: compiler as hoon expression :: +:: We parse with +ream for reproducibility. +:: ~& %ivory-parsing -=+ compiler-hoon=(ream compiler-source) +=/ compiler-hoon (ream compiler-source) ~& %ivory-parsed -:: :: arvo-source: hoon source file producing arvo kernel, `sys/arvo` :: -=+ arvo-source=.^(@t %cx (welp sys /arvo/hoon)) -:: +=/ arvo-source + .^(@t %cx (welp sys /arvo/hoon)) :: whole-hoon: arvo within compiler :: -=+ whole-hoon=`hoon`[%tsbn compiler-hoon [%tsbn [%$ 7] (ream arvo-source)]] -:: +=/ whole-hoon=hoon + :+ %tsbn compiler-hoon + :+ %tsld (ream arvo-source) + [%$ 7] :: compile the whole schmeer :: ~& %ivory-compiling -=+ whole-formula=q:(~(mint ut %noun) %noun whole-hoon) +=/ whole-formula + q:(~(mint ut %noun) %noun whole-hoon) ~& %ivory-compiled -:: :: zuse-ovo: standard library installation event :: -=/ zuse-ovo=ovum - =/ pax (weld sys /zuse) - =/ txt .^(@ %cx (weld pax /hoon)) - [/vane/zuse [%veer %$ pax txt]] +:: Arvo parses the %veer payload with +rain, so +:: we pass the empty path / for reproducibility. :: +=/ zuse-ovo=ovum + :- /vane/zuse + [%veer %$ / .^(@ %cx (weld sys /zuse/hoon))] :: installed: Arvo gate (formal instance) with %zuse installed :: +:: The :zuse-ovo event occurs at a defaulted date for reproducibility. +:: ~& %zuse-installing =/ installed - .*(0 [%7 whole-formula [%9 2 %10 [6 %1 now zuse-ovo] %0 1]]) + .* 0 + :+ %7 whole-formula + [%9 2 %10 [6 %1 *@da zuse-ovo] %0 1] ~& %zuse-installed :: :: produce a formula that evaluates :whole-formula (for jet registration),
Remove continuous resizing workaround for Windows It turns out that the workaround only worked for MacOS. Refs <https://github.com/Genymobile/scrcpy/issues/3458> Refs SDL/#1059 <https://github.com/libsdl-org/SDL/issues/1059>
@@ -306,13 +306,14 @@ sc_screen_render(struct sc_screen *screen, bool update_content_rect) { } -#if defined(__APPLE__) || defined(__WINDOWS__) +#if defined(__APPLE__) # define CONTINUOUS_RESIZING_WORKAROUND #endif #ifdef CONTINUOUS_RESIZING_WORKAROUND // On Windows and MacOS, resizing blocks the event loop, so resizing events are -// not triggered. As a workaround, handle them in an event handler. +// not triggered. On MacOS, as a workaround, handle them in an event handler +// (it does not work for Windows unfortunately). // // <https://bugzilla.libsdl.org/show_bug.cgi?id=2077> // <https://stackoverflow.com/a/40693139/1987178>
zuse: propagates fix to aes-128-siv and aes-192-siv as well
:: :: ++s2va:aes:crypto ++ s2va :: AES-128 S2V ~/ %s2va - |= {key/@H ads/(list @)} - =+ res=(maca key `16 0x0) - %^ maca key ~ - |- ^- @uxH + |= [key=@H ads=(list @)] ?~ ads (maca key `16 0x1) + =/ res (maca key `16 0x0) + %+ maca key + |- ^- [[~ @ud] @uxH] ?~ t.ads - ?: (gte (xeb i.ads) 128) - (mix i.ads res) - %+ mix - (doub res) - (mpad (met 3 i.ads) i.ads) + =/ wyt (met 3 i.ads) + ?: (gte wyt 16) + [`wyt (mix i.ads res)] + [`16 (mix (doub res) (mpad wyt i.ads))] %= $ - res %+ mix - (doub res) - (maca key ~ i.ads) ads t.ads + res (mix (doub res) (maca key ~ i.ads)) == :: :: ++s2vb:aes:crypto ++ s2vb :: AES-192 S2V ~/ %s2vb - |= {key/@I ads/(list @)} - =+ res=(macb key `16 0x0) - %^ macb key ~ - |- ^- @uxH + |= [key=@I ads=(list @)] ?~ ads (macb key `16 0x1) + =/ res (macb key `16 0x0) + %+ macb key + |- ^- [[~ @ud] @uxH] ?~ t.ads - ?: (gte (xeb i.ads) 128) - (mix i.ads res) - %+ mix - (doub res) - (mpad (met 3 i.ads) i.ads) + =/ wyt (met 3 i.ads) + ?: (gte wyt 16) + [`wyt (mix i.ads res)] + [`16 (mix (doub res) (mpad wyt i.ads))] %= $ - res %+ mix - (doub res) - (macb key ~ i.ads) ads t.ads + res (mix (doub res) (macb key ~ i.ads)) == :: :: ++s2vc:aes:crypto ++ s2vc :: AES-256 S2V
Don't remove .so files before running benchmarks
@@ -49,12 +49,10 @@ local function compile(ext, file_name) end local function benchmark(test_dir, no_lua) - -- remove temporaries from previous runs - util.shell(string.format([[ rm -f %s/*.so ]], test_dir)) - local file_names = {} for file_name in lfs.dir(test_dir) do if not string.find(file_name, "^%.") and + not string.find(file_name, "%.so$") and file_name ~= "main.lua" then table.insert(file_names, file_name) end
fix an issue that on_handshake_complete is not called; call it if encrypted data is ready for processing
@@ -1075,9 +1075,14 @@ static void proceed_handshake_picotls(h2o_socket_t *sock) h2o_socket_read_stop(sock); write_ssl_bytes(sock, wbuf.base, wbuf.off); flush_pending_ssl(sock, ret == 0 ? on_handshake_complete : proceed_handshake); + } else { + if (ret == 0 && sock->ssl->input.encrypted->size > 0) { + /* handshake complete and there's encrypted data ready for processing */ + on_handshake_complete(sock, NULL); } else { h2o_socket_read_start(sock, ret == PTLS_ERROR_IN_PROGRESS ? proceed_handshake : on_handshake_complete); } + } break; default: /* FIXME send alert in wbuf before calling the callback */
RTX5: minor optimization (osKernelResume)
@@ -388,6 +388,7 @@ static void svcRtxKernelResume (uint32_t sleep_ticks) { os_thread_t *thread; os_timer_t *timer; uint32_t delay; + uint32_t ticks; if (osRtxInfo.kernel.state != osRtxKernelSuspended) { EvrRtxKernelResumed(); @@ -395,46 +396,40 @@ static void svcRtxKernelResume (uint32_t sleep_ticks) { return; } + osRtxInfo.kernel.tick += sleep_ticks; + // Process Thread Delay list thread = osRtxInfo.thread.delay_list; if (thread != NULL) { delay = sleep_ticks; + do { if (delay >= thread->delay) { delay -= thread->delay; - osRtxInfo.kernel.tick += thread->delay; thread->delay = 1U; - do { osRtxThreadDelayTick(); - if (delay == 0U) { - break; - } - delay--; - osRtxInfo.kernel.tick++; - } while (osRtxInfo.thread.delay_list != NULL); + thread = osRtxInfo.thread.delay_list; } else { thread->delay -= delay; - osRtxInfo.kernel.tick += delay; + delay = 0U; } - } else { - osRtxInfo.kernel.tick += sleep_ticks; + } while ((thread != NULL) && (delay != 0U)); } // Process Active Timer list timer = osRtxInfo.timer.list; if (timer != NULL) { - if (sleep_ticks >= timer->tick) { - sleep_ticks -= timer->tick; - timer->tick = 1U; + ticks = sleep_ticks; do { + if (ticks >= timer->tick) { + ticks -= timer->tick; + timer->tick = 1U; osRtxInfo.timer.tick(); - if (sleep_ticks == 0U) { - break; - } - sleep_ticks--; - } while (osRtxInfo.timer.list != NULL); + timer = osRtxInfo.timer.list; } else { - timer->tick -= sleep_ticks; + timer->tick -= ticks; + ticks = 0U; } + } while ((timer != NULL) && (ticks != 0U)); } osRtxInfo.kernel.state = osRtxKernelRunning;
GPIO HAL example fix 64-bit support
@@ -46,9 +46,9 @@ static uint8_t counter; /*---------------------------------------------------------------------------*/ /* Print gpio_hal_pin_mask_t using the correct format */ #if GPIO_HAL_PIN_COUNT > 32 -#define PIN_MASK_FMT PRIx64 +#define PIN_MASK_FMT "0x%016" PRIx64 #else -#define PIN_MASK_FMT PRIx32 +#define PIN_MASK_FMT "0x%08" PRIx32 #endif /*---------------------------------------------------------------------------*/ PROCESS(gpio_hal_example, "GPIO HAL Example"); @@ -127,7 +127,7 @@ PROCESS_THREAD(gpio_hal_example, ev, data) } /* Test read */ - printf("%u: Pins are 1-%u, 2=%u, 3=%u, mask=0x%08" PIN_MASK_FMT "\n", + printf("%u: Pins are 1-%u, 2=%u, 3=%u, mask=" PIN_MASK_FMT "\n", counter & 7, gpio_hal_arch_read_pin(out_pin1), gpio_hal_arch_read_pin(out_pin2),
passwd: only build helper func when needed
@@ -50,6 +50,7 @@ static int validatepwent (struct passwd * pwd) return 0; } +#if defined(USE_GETLINE) static struct passwd * strToPasswd (char * line) { char * ptoken; @@ -85,6 +86,7 @@ static struct passwd * strToPasswd (char * line) return pwd; } +#endif static KeySet * pwentToKS (struct passwd * pwd, Key * parentKey, SortBy index) {
Fix leak in jsonReadVarRecurse().
@@ -1181,7 +1181,13 @@ jsonReadVarRecurse(JsonRead *const this) } case jsonTypeString: - FUNCTION_TEST_RETURN(VARIANT, varNewStr(jsonReadStr(this))); + { + String *const string = jsonReadStr(this); + Variant *const result = varNewStr(string); + strFree(string); + + FUNCTION_TEST_RETURN(VARIANT, result); + } case jsonTypeArrayBegin: {
Fix: RTX5 Timer template
@@ -32,7 +32,7 @@ int Init_Timers (void) { // Create one-shoot timer exec1 = 1; - tim_id1 = osTimerNew ((os_timer_func_t)&Timer1_Callback, osTimerOnce, &exec1, NULL); + tim_id1 = osTimerNew ((osTimerFunc_t)&Timer1_Callback, osTimerOnce, &exec1, NULL); if (tim_id1 != NULL) { // One-shot timer created // start timer with delay 100ms status = osTimerStart (tim_id1, 100); @@ -43,7 +43,7 @@ int Init_Timers (void) { // Create periodic timer exec2 = 2; - tim_id2 = osTimerNew((os_timer_func_t)&Timer2_Callback, osTimerPeriodic, &exec2, NULL); + tim_id2 = osTimerNew((osTimerFunc_t)&Timer2_Callback, osTimerPeriodic, &exec2, NULL); if (tim_id2 != NULL) { // Periodic timer created // start timer with periodic 1000ms interval status = osTimerStart (tim_id2, 1000);
add one more rule for 103/0/0 to map sfc
'sfc' = {typeOfFirstFixedSurface=101; typeOfSecondFixedSurface=255;} 'sfc' = {typeOfFirstFixedSurface=102; typeOfSecondFixedSurface=255;} 'hl' = {typeOfFirstFixedSurface=103; typeOfSecondFixedSurface=255;} +'sfc' = {typeOfFirstFixedSurface=103; scaleFactorOfFirstFixedSurface=0; scaledValueOfFirstFixedSurface=0; typeOfSecondFixedSurface=255;} 'sfc' = {typeOfFirstFixedSurface=103; scaleFactorOfFirstFixedSurface=0; scaledValueOfFirstFixedSurface=2; typeOfSecondFixedSurface=255;} 'sfc' = {typeOfFirstFixedSurface=103; scaleFactorOfFirstFixedSurface=0; scaledValueOfFirstFixedSurface=10; typeOfSecondFixedSurface=255;} 'ml' = {typeOfFirstFixedSurface=105; typeOfSecondFixedSurface=255;}
firinterp: adding copy() autotest
@@ -217,3 +217,35 @@ void autotest_firinterp_crcf_rnyquist_2() void autotest_firinterp_crcf_rnyquist_3() { testbench_firinterp_crcf_nyquist(LIQUID_FIRFILT_RCOS, 2, 9,0.3f); } +// test copy method +void autotest_firinterp_copy() +{ + // create base object + firinterp_crcf q0 = firinterp_crcf_create_kaiser(3, 7, 60.0f); + firinterp_crcf_set_scale(q0, 0.12345f); + + // run samples through filter + unsigned int i; + float complex buf_0[3], buf_1[3]; + for (i=0; i<20; i++) { + float complex v = randnf() + _Complex_I*randnf(); + firinterp_crcf_execute(q0, v, buf_0); + } + + // copy object + firinterp_crcf q1 = firinterp_crcf_copy(q0); + + // run samples through both filters in parallel + for (i=0; i<60; i++) { + float complex v = randnf() + _Complex_I*randnf(); + firinterp_crcf_execute(q0, v, buf_0); + firinterp_crcf_execute(q1, v, buf_1); + + CONTEND_SAME_DATA( buf_0, buf_1, 3*sizeof(float complex) ); + } + + // destroy objects + firinterp_crcf_destroy(q0); + firinterp_crcf_destroy(q1); +} +
imxrt/mkimg: Fixed gdb symbol file generation
@@ -129,7 +129,8 @@ for app in $@; do cp $app tmp.elf ${CROSS}strip $STRIP_CMD tmp.elf printf "App %s @offset 0x%08x\n" $app $OFFSET - printf "add-symbol-file %s 0x%08x\n" `realpath $app` $((OFFSET + $FLASH_START + $((0xc0)))) >> $GDB_SYM_FILE + ELFOFFS=$((`readelf -l $app | grep "LOAD" | grep "R E" | awk '{ print $2 }'`)) + printf "add-symbol-file %s 0x%08x\n" `realpath $app` $((OFFSET + $FLASH_START + $ELFOFFS)) >> $GDB_SYM_FILE dd if=tmp.elf of=$OUTPUT bs=1 seek=$OFFSET 2>/dev/null OFFSET=$((($OFFSET+$((`du -b tmp.elf | cut -f1`))+$SIZE_PAGE-1)&$PAGE_MASK)) rm -f tmp.elf
fix some debug
@@ -55,10 +55,6 @@ typedef struct float moment; } Inertia; -Eigen::Vector3f makeEigenVector3(float v1, float v2, float v3); -Eigen::Matrix3f makeEigenMatrix3(float m11, float m12, float m13, float m21, float m22, float m23, float m31, float m32, float m33); -Eigen::Matrix3f makeRotationMatrix(float roll, float pitch, float yaw); - class Joint { private:
Remove Windows.Storage from build options ***NO_CI*** This doesn't need to be exposed anymore as it's being set internaly when needed.
"API_Windows.Devices.SerialCommunication" : "OFF-default-ON-to-add-this-API", "API_Windows.Devices.Spi" : "OFF-default-ON-to-add-this-API", "API_Windows.Networking.Sockets" : "OFF-default-ON-to-add-this-API", - "API_Windows.Storage" : "OFF-default-ON-to-add-this-API", "API_Hardware.Esp32" : "OFF-default-ON-to-add-this-API", "API_Hardware.Stm32" : "OFF-default-ON-to-add-this-API" }
added my contact to AUTHORS.md
@@ -219,3 +219,11 @@ debian packaging, release automation - email: [email protected] - github user: [robaerd](https://github.com/robaerd) - devel/test on: Debian, Ubuntu + +## Michael Tucek + +work on Java bindings + +- email: [email protected] +- github user: [tucek](https://github.com/tucek) +- devel/test on: Debian, Ubuntu \ No newline at end of file
sysrepo BUGFIX remove undefined functions Fixes
@@ -947,13 +947,6 @@ int sr_validate(sr_session_ctx_t *session, const char *module_name, uint32_t tim */ int sr_apply_changes(sr_session_ctx_t *session, uint32_t timeout_ms); -/** - * @brief Apply changes made in the current session, while checking NACM. - * - * For more info, check @ref sr_apply_changes. - */ -int sr_nacm_apply_changes(sr_session_ctx_t *session, uint32_t timeout_ms); - /** * @brief Learn whether there are any prepared non-applied changes in the session. * @@ -996,22 +989,6 @@ int sr_discard_changes(sr_session_ctx_t *session); int sr_replace_config(sr_session_ctx_t *session, const char *module_name, struct lyd_node *src_config, uint32_t timeout_ms); -/** - * @brief Replace a datastore with the contents of a data tree. If the module is specified, limit - * the operation only to the specified module. If it is not specified, the operation is performed on all modules. Also - * checks NACM. - * - * Required WRITE access. - * - * @param[in] session Session ([DS](@ref sr_datastore_t)-specific - target datastore) to use. - * @param[in] module_name If specified, limits the replace operation only to this module. - * @param[in] src_config Source data to replace the datastore in @p session connection _libyang_ context. - * Is ALWAYS spent and cannot be further used by the application! - * @param[in] timeout_ms Configuration callback timeout in milliseconds. If 0, default is used. - * @return Error code (::SR_ERR_OK on success). - */ -int sr_nacm_replace_config(sr_session_ctx_t *session, const char *module_name, struct lyd_node *src_config, - uint32_t timeout_ms); /** * @brief Replaces a conventional datastore with the contents of * another conventional datastore. If the module is specified, limits @@ -1031,25 +1008,6 @@ int sr_nacm_replace_config(sr_session_ctx_t *session, const char *module_name, s */ int sr_copy_config(sr_session_ctx_t *session, const char *module_name, sr_datastore_t src_datastore, uint32_t timeout_ms); -/** - * @brief Replaces a conventional datastore with the contents of - * another conventional datastore. If the module is specified, limits - * the operation only to the specified module. If it is not specified, - * the operation is performed on all modules. Also checks NACM. - * - * @note Note that copying from _candidate_ to _running_ or vice versa causes - * the _candidate_ datastore to revert to original behavior of mirroring _running_ datastore (@ref datastores). - * - * Required WRITE access. - * - * @param[in] session Session ([DS](@ref sr_datastore_t)-specific - target datastore) to use. - * @param[in] module_name Optional module name that limits the copy operation only to this module. - * @param[in] src_datastore Source datastore. - * @param[in] timeout_ms Configuration callback timeout in milliseconds. If 0, default is used. - * @return Error code (::SR_ERR_OK on success). - */ -int sr_nacm_copy_config(sr_session_ctx_t *session, const char *module_name, sr_datastore_t src_datastore, uint32_t timeout_ms); - /** @} editdata */ ////////////////////////////////////////////////////////////////////////////////
h2olog: refactor func names
@@ -253,7 +253,7 @@ def parse_dscript(path: Path): "probes": probes, } -def parse_d(context: dict, path: Path, block_probes: set = None): +def parse_and_analyze(context: dict, path: Path, block_probes: set = None): dscript = parse_dscript(path) provider = dscript["provider"] @@ -404,9 +404,9 @@ def prepare_context(h2o_dir): "probe_metadata": OrderedDict(), "h2o_dir": h2o_dir, } - parse_d(context, h2o_dir.joinpath(quicly_probes_d), + parse_and_analyze(context, h2o_dir.joinpath(quicly_probes_d), block_probes=block_probes) - parse_d(context, h2o_dir.joinpath(h2o_probes_d), + parse_and_analyze(context, h2o_dir.joinpath(h2o_probes_d), block_probes=block_probes) return context
[nrf52][uart] Fix but in UART init
@@ -61,6 +61,7 @@ void uart_init_early(void) UART_CONFIG_PARITY_Excluded << UART_CONFIG_PARITY_Pos; NVIC_DisableIRQ(UARTE0_UART0_IRQn); NRF_UART0->ENABLE = UART_ENABLE_ENABLE_Enabled << UART_ENABLE_ENABLE_Pos; + NRF_UART0->TXD = 'L'; //Must prime the tx queue with a character to start operation NRF_UART0->TASKS_STARTTX=1; NRF_UART0->TASKS_STARTRX=1; #endif //ENABLE_UART0
crypto: add payload version to the contract Closes .
@@ -15,3 +15,4 @@ keyNew ("system/elektra/modules/" ELEKTRA_PLUGIN_NAME, KEY_VALUE, "crypto plugin keyNew ("system/elektra/modules/" ELEKTRA_PLUGIN_NAME "/exports/checkconf", KEY_FUNC, CRYPTO_PLUGIN_FUNCTION (checkconf), KEY_END), #include ELEKTRA_README (crypto) keyNew ("system/elektra/modules/" ELEKTRA_PLUGIN_NAME "/infos/version", KEY_VALUE, PLUGINVERSION, KEY_END), + keyNew ("system/elektra/modules/" ELEKTRA_PLUGIN_NAME "/constants/PAYLOAD_VERSION", KEY_VALUE, ELEKTRA_CRYPTO_PAYLOAD_VERSION, KEY_END),
hv: vtd: fix potential dead loop if qi request timeout Fix potential dead loop if qi request timeout.
@@ -547,7 +547,7 @@ static void dmar_issue_qi_request(struct dmar_drhd_rt *dmar_unit, struct dmar_en { struct dmar_entry *invalidate_desc_ptr; uint32_t qi_status = 0U; - __unused uint64_t start; + uint64_t start; invalidate_desc_ptr = (struct dmar_entry *)(dmar_unit->qi_queue + dmar_unit->qi_tail); @@ -565,12 +565,10 @@ static void dmar_issue_qi_request(struct dmar_drhd_rt *dmar_unit, struct dmar_en iommu_write32(dmar_unit, DMAR_IQT_REG, dmar_unit->qi_tail); start = rdtsc(); - while (qi_status == DMAR_INV_STATUS_INCOMPLETE) { - if (qi_status == DMAR_INV_STATUS_COMPLETED) { - break; - } + while (qi_status != DMAR_INV_STATUS_COMPLETED) { if ((rdtsc() - start) > CYCLES_PER_MS) { pr_err("DMAR OP Timeout! @ %s", __func__); + break; } asm_pause(); }
skiboot: Fix comment around OPAL_IMC_COUNTERS_ enum Fixes: ('skiboot: Add opal calls to init/start/stop IMC devices)
@@ -1248,7 +1248,7 @@ enum { XIVE_DUMP_EMU_STATE = 5, }; -/* Operation argument to IMC Microcode */ +/* "type" argument options for OPAL_IMC_COUNTERS_* calls */ enum { OPAL_IMC_COUNTERS_NEST = 1, OPAL_IMC_COUNTERS_CORE = 2,