message
stringlengths
6
474
diff
stringlengths
8
5.22k
Use ROCM_LLVM for examples in run_rocm_test.sh.
@@ -42,9 +42,13 @@ fi # Parent dir should be ROCm base dir. AOMPROCM=$AOMP/.. export AOMPROCM -unset ROCM_PATH echo AOMPROCM= $AOMPROCM +# Set ROCM_LLVM for examples +export ROCM_LLVM=$AOMP + +#unset ROCM_PATH + # Use bogus path to avoid using target.lst, a user-defined target list # used by rocm_agent_enumerator. export ROCM_TARGET_LST=/opt/nowhere
Add more SceKernelAllocMemBlockAttr info
@@ -25,24 +25,40 @@ typedef enum SceKernelMemBlockType { SCE_KERNEL_MEMBLOCK_TYPE_RW_UNK0 = 0x6020D006 } SceKernelMemBlockType; -#define SCE_KERNEL_ALLOC_MEMBLOCK_ATTR_HAS_PADDR 0x00000002U -#define SCE_KERNEL_ALLOC_MEMBLOCK_ATTR_HAS_ALIGNMENT 0x00000004U -#define SCE_KERNEL_ALLOC_MEMBLOCK_ATTR_HAS_MIRROR_BLOCKID 0x00000040U -#define SCE_KERNEL_ALLOC_MEMBLOCK_ATTR_HAS_PID 0x00000080U +typedef enum SceKernelAllocMemBlockAttr { + SCE_KERNEL_ALLOC_MEMBLOCK_ATTR_HAS_PADDR = 0x00000002U, + SCE_KERNEL_ALLOC_MEMBLOCK_ATTR_HAS_ALIGNMENT = 0x00000004U, + SCE_KERNEL_ALLOC_MEMBLOCK_ATTR_HAS_MIRROR_BLOCKID = 0x00000040U, + SCE_KERNEL_ALLOC_MEMBLOCK_ATTR_HAS_PID = 0x00000080U, + SCE_KERNEL_ALLOC_MEMBLOCK_ATTR_HAS_PADDR_LIST = 0x00001000U +} SceKernelAllocMemBlockAttr; + +typedef struct SceKernelAddrPair { + uint32_t addr; //!< Address + uint32_t length; //!< Length +} SceKernelAddrPair; + +typedef struct SceKernelPaddrList { + uint32_t size; //!< sizeof(SceKernelPaddrList) + uint32_t list_size; //!< Size in elements of the list array + uint32_t ret_length; //!< Total physical size of the memory pairs + uint32_t ret_count; //!< Number of elements of list filled by ksceKernelGetPaddrList + SceKernelAddrPair *list; //!< Array of physical addresses and their lengths pairs +} SceKernelPaddrList; // specific to 3.60 typedef struct SceKernelAllocMemBlockKernelOpt { - SceSize size; + SceSize size; //!< sizeof(SceKernelAllocMemBlockKernelOpt) SceUInt32 field_4; - SceUInt32 attr; + SceUInt32 attr; //!< OR of SceKernelAllocMemBlockAttr SceUInt32 field_C; SceUInt32 paddr; SceSize alignment; SceUInt32 field_18; SceUInt32 field_1C; - SceUInt32 mirror_blkid; + SceUInt32 mirror_blockid; SceUID pid; - SceUInt32 field_28; + SceKernelPaddrList *paddr_list; SceUInt32 field_2C; SceUInt32 field_30; SceUInt32 field_34; @@ -90,19 +106,6 @@ typedef struct SceObjectBase { uint32_t data[]; } SceObjectBase; -typedef struct SceKernelAddrPair { - uint32_t addr; //!< Address - uint32_t length; //!< Length -} SceKernelAddrPair; - -typedef struct SceKernelPaddrList { - uint32_t size; //!< sizeof(SceKernelPaddrList) - uint32_t list_size; //!< Size in elements of the list array - uint32_t ret_length; //!< Total physical size of the memory pairs - uint32_t ret_count; //!< Number of elements of list filled by ksceKernelGetPaddrList - SceKernelAddrPair *list; //!< Array of physical addresses and their lengths pairs -} SceKernelPaddrList; - typedef struct SceKernelProcessContext { SceUInt32 TTBR1; SceUInt32 DACR;
Call the proper GLES2Loader in GLES;
@@ -911,8 +911,13 @@ static void lovrGpuSetViewports(float* viewport, uint32_t count) { // GPU void lovrGpuInit(bool srgb, getProcAddressProc getProcAddress) { -#ifndef LOVR_WEBGL +#ifdef LOVR_GL gladLoadGLLoader((GLADloadproc) getProcAddress); +#elif defined(LOVR_GLES) + gladLoadGLES2Loader((GLADloadproc) getProcAddress); +#endif + +#ifndef LOVR_WEBGL state.features.compute = GLAD_GL_ARB_compute_shader; state.features.singlepass = GLAD_GL_ARB_viewport_array && GLAD_GL_AMD_vertex_shader_viewport_index && GLAD_GL_ARB_fragment_layer_viewport; glEnable(GL_LINE_SMOOTH);
bugfix: correct typo in maxbytes option
@@ -76,7 +76,7 @@ stats -> cflags += -DT4P4S_STATS=${stats} p4rt -> cflags += -DT4P4S_P4RT lineno -> cflags += -DT4P4S_DEBUG_LINENO lto -> cflags += -Dflto=thin -maxbytes -> cflags += -DT4P4S_DEBUG_PKT_MAXBYTES={maxbytes} +maxbytes -> cflags += -DT4P4S_DEBUG_PKT_MAXBYTES=${maxbytes} consts -> cflags += -DTEST_CONST_ENTRIES=${consts} ; emits all headers, not only valid ones
Get the number of polygons during sync
#include <maya/MFnDagNode.h> #include <maya/MFnIntArrayData.h> +#include <maya/MFnMesh.h> #include <maya/MFnNumericAttribute.h> #include <maya/MFnSingleIndexedComponent.h> #include <maya/MFnStringArrayData.h> @@ -302,13 +303,19 @@ SyncOutputGeometryPart::createOutputMesh( // extra attributes. partMeshFn.findPlug("outMesh").asMObject(); + std::vector<bool> hasMaterials; + { + MFnMesh meshFn(meshShape, &status); + hasMaterials.resize(meshFn.numPolygons()); + CHECK_MSTATUS_AND_RETURN_IT(status); + } + createOutputGroups( meshShape ); // material { - std::vector<bool> hasMaterials; typedef std::pair<MObject, MIntArray*> MaterialComponent; std::vector<MaterialComponent> materialComponents; @@ -319,11 +326,6 @@ SyncOutputGeometryPart::createOutputMesh( { std::map<int, MaterialComponent> materialComponentsMap; - if(hasMaterials.size() < materialIdsData.length()) - { - hasMaterials.resize(materialIdsData.length()); - } - // gather material ids for(size_t i = 0; i < materialIdsData.length(); i++) { @@ -383,11 +385,7 @@ SyncOutputGeometryPart::createOutputMesh( { MString mayaSG = mayaSGDataPlug.asString(); - MIntArray* components = NULL; - - if(hasMaterials.size()) - { - components = new MIntArray(); + MIntArray* components = new MIntArray(); for(size_t i = 0; i < hasMaterials.size(); i++) { if(hasMaterials[i]) @@ -399,13 +397,19 @@ SyncOutputGeometryPart::createOutputMesh( components->append(i); } - } + if(components->length()) + { materialComponents.push_back(MaterialComponent( Util::findNodeByName(mayaSG.asChar(), MFn::kShadingEngine), components)); } + else + { + delete components; + } + } else if(owner == "primitive") { MFnStringArrayData mayaSGData(mayaSGDataPlug.asMObject()); @@ -413,11 +417,6 @@ SyncOutputGeometryPart::createOutputMesh( std::map<const char*, MaterialComponent> materialComponentsMap; - if(hasMaterials.size() < mayaSG.length()) - { - hasMaterials.resize(mayaSG.length()); - } - // gather shading group name for(size_t i = 0; i < mayaSG.length(); i++) {
ci: add cancellation job to github action
@@ -10,6 +10,11 @@ env: HOMEBREW_NO_INSTALL_CLEANUP: 1 jobs: + cancel: + name: auto-cancellation-running-action + runs-on: macos-11 + steps: + - uses: fauguste/[email protected] build: # The CMake configure and build commands are platform agnostic and should work equally # well on Windows or Mac. You can convert this to a matrix build if you need
Fix cmake-configure failure if VISIT_VTKH_DIR not defined.
@@ -1435,7 +1435,9 @@ IF(NOT VISIT_BUILD_MINIMAL_PLUGINS OR VISIT_SELECTED_DATABASE_PLUGINS) INCLUDE(${VISIT_SOURCE_DIR}/CMake/FindVisus.cmake) # Configure VTKh support. + if(VISIT_VTKH_DIR) INCLUDE(${VISIT_VTKH_DIR}/lib/VTKhConfig.cmake) + endif() # Configure GFortran support. INCLUDE(${VISIT_SOURCE_DIR}/CMake/FindGFortran.cmake)
precert doesn't work when configured no-ct, don't try to test it then
@@ -13,6 +13,7 @@ use warnings; use POSIX; use File::Path 2.00 qw/rmtree/; use OpenSSL::Test qw/:DEFAULT cmdstr srctop_file/; +use OpenSSL::Test::Utils; setup("test_ca"); @@ -42,6 +43,9 @@ plan tests => 5; ok(run(perlapp(["CA.pl", "-verify", "newcert.pem"])), 'verifying new certificate'); + skip "CT not configured, can't use -precert", 1 + if disabled("ct"); + $ENV{OPENSSL_CONFIG} = "-config ".srctop_file("test", "Uss.cnf"); ok(run(perlapp(["CA.pl", "-precert"], stderr => undef)), 'creating new pre-certificate');
Fix an issue in OTA Agent task event loop
@@ -2393,7 +2393,7 @@ static void prvOTAAgentTask( void * pvUnused ) for( ; ; ) { /* Receive the next event form the OTA event queue to process . */ - if( xQueueReceive( xOTA_Agent.xOTA_EventQueue, &xEventMsg, 0 ) == pdTRUE ) + if( xQueueReceive( xOTA_Agent.xOTA_EventQueue, &xEventMsg, portMAX_DELAY ) == pdTRUE ) { /* Get the next event entry from the table to execute respective event handler. */ pxStateTableEntry = ( OTAStateTableEntry_t * ) &OTATransitionTable[ xOTA_Agent.eState ][ xEventMsg.xEventId ];
http_client: validate header key/val lengths
@@ -660,6 +660,10 @@ int flb_http_add_header(struct flb_http_client *c, int new_size; char *tmp; + if (key_len < 1 || val_len < 1) { + return -1; + } + /* * The new header will need enough space in the buffer: *
mbedTLS: Remove some C99-style intermingled variable declarations
@@ -376,6 +376,7 @@ _libssh2_mbedtls_rsa_new_private(libssh2_rsa_ctx **rsa, { int ret; mbedtls_pk_context pkey; + mbedtls_rsa_context *pk_rsa; *rsa = (libssh2_rsa_ctx *) LIBSSH2_ALLOC(session, sizeof(libssh2_rsa_ctx)); if(*rsa == NULL) @@ -393,7 +394,7 @@ _libssh2_mbedtls_rsa_new_private(libssh2_rsa_ctx **rsa, return -1; } - mbedtls_rsa_context *pk_rsa = mbedtls_pk_rsa(pkey); + pk_rsa = mbedtls_pk_rsa(pkey); mbedtls_rsa_copy(*rsa, pk_rsa); mbedtls_pk_free(&pkey); @@ -409,6 +410,7 @@ _libssh2_mbedtls_rsa_new_private_frommemory(libssh2_rsa_ctx **rsa, { int ret; mbedtls_pk_context pkey; + mbedtls_rsa_context *pk_rsa; *rsa = (libssh2_rsa_ctx *) mbedtls_calloc(1, sizeof(libssh2_rsa_ctx)); if(*rsa == NULL) @@ -426,7 +428,7 @@ _libssh2_mbedtls_rsa_new_private_frommemory(libssh2_rsa_ctx **rsa, return -1; } - mbedtls_rsa_context *pk_rsa = mbedtls_pk_rsa(pkey); + pk_rsa = mbedtls_pk_rsa(pkey); mbedtls_rsa_copy(*rsa, pk_rsa); mbedtls_pk_free(&pkey); @@ -546,6 +548,7 @@ _libssh2_mbedtls_pub_priv_key(LIBSSH2_SESSION *session, unsigned char *key = NULL, *mth = NULL; size_t keylen = 0, mthlen = 0; int ret; + mbedtls_rsa_context *rsa; if(mbedtls_pk_get_type(pkey) != MBEDTLS_PK_RSA) { mbedtls_pk_free(pkey); @@ -563,7 +566,7 @@ _libssh2_mbedtls_pub_priv_key(LIBSSH2_SESSION *session, ret = -1; } - mbedtls_rsa_context *rsa = mbedtls_pk_rsa(*pkey); + rsa = mbedtls_pk_rsa(*pkey); key = gen_publickey_from_rsa(session, rsa, &keylen); if(key == NULL) { ret = -1;
build - less verbose gphdfs ivy retrieve
description="--> Retrieve Ivy-managed artifacts for the compile configurations"> <ivy:settings id="basic.settings" file="ivysettings.xml" /> <ivy:retrieve settingsRef="basic.settings" pattern="${build.ivy.lib.dir}/${ivy.artifact.retrieve.pattern}" - sync="true" conf="${gpgnet.configuration}"/> + sync="true" log="quiet" conf="${gpgnet.configuration}"/> <ivy:cachepath pathid="ivy-classpath" conf="${gpgnet.configuration}"/> </target>
dm: fix memory free issue for xhci remove uninitialized variable "dir", then make sure "xfer->data","xfer->data[i].hcb","xfer->reqs" free correctly. Acked-by: Yu Wang
@@ -1555,7 +1555,7 @@ pci_xhci_alloc_usb_xfer(struct pci_xhci_dev_emu *dev, int epid) struct usb_xfer *xfer; struct xhci_dev_ctx *dev_ctx; struct xhci_endp_ctx *ep_ctx; - int dir, max_blk_cnt, i = 0; + int max_blk_cnt, i = 0; uint8_t type; if (!dev) @@ -1585,8 +1585,8 @@ pci_xhci_alloc_usb_xfer(struct pci_xhci_dev_emu *dev, int epid) max_blk_cnt = 2048; break; default: - UPRINTF(LFTL, "err: unexpected epid %d type %d dir %d\r\n", - epid, type, dir); + UPRINTF(LFTL, "err: unexpected epid %d type %d\r\n", + epid, type); return NULL; } @@ -1608,8 +1608,8 @@ pci_xhci_alloc_usb_xfer(struct pci_xhci_dev_emu *dev, int epid) goto fail; } - UPRINTF(LINF, "allocate %d blocks for epid %d type %d dir %d\r\n", - max_blk_cnt, epid, type, dir); + UPRINTF(LINF, "allocate %d blocks for epid %d type %d\r\n", + max_blk_cnt, epid, type); xfer->max_blk_cnt = max_blk_cnt; xfer->dev = (void *)dev; @@ -1617,10 +1617,13 @@ pci_xhci_alloc_usb_xfer(struct pci_xhci_dev_emu *dev, int epid) return xfer; fail: + if (xfer->data) { for (; i >= 0; i--) + if (xfer->data[i].hcb) free(xfer->data[i].hcb); - free(xfer->data); + } + if (xfer->reqs) free(xfer->reqs); free(xfer); return NULL;
Perl: fixed IO-Object duplication bug.
@@ -259,25 +259,16 @@ nxt_perl_psgi_layer_stream_arg(pTHX_ PerlIO * f, CLONE_PARAMS *param, int flags) { SV *var; - nxt_perl_psgi_io_arg_t *arg; nxt_perl_psgi_layer_stream_t *unit_stream; unit_stream = PerlIOSelf(f, nxt_perl_psgi_layer_stream_t); - - arg = (nxt_perl_psgi_io_arg_t *) (intptr_t) SvIV(SvRV(unit_stream->var)); var = unit_stream->var; if (flags & PERLIO_DUP_CLONE) { var = PerlIO_sv_dup(aTHX_ var, param); } else if (flags & PERLIO_DUP_FD) { - var = newSV_type(SVt_RV); - - if (var == NULL) { - return NULL; - } - - sv_setptrref(var, arg); + var = newSVsv(var); } else { var = SvREFCNT_inc(var); @@ -291,27 +282,12 @@ static PerlIO * nxt_perl_psgi_layer_stream_dup(pTHX_ PerlIO *f, PerlIO *o, CLONE_PARAMS *param, int flags) { - SV *var; - nxt_perl_psgi_layer_stream_t *os, *fs; - - os = PerlIOSelf(o, nxt_perl_psgi_layer_stream_t); - fs = NULL; - var = os->var; + nxt_perl_psgi_layer_stream_t *fs; - os->var = newSV_type(SVt_RV); f = PerlIOBase_dup(aTHX_ f, o, param, flags); if (f != NULL) { fs = PerlIOSelf(f, nxt_perl_psgi_layer_stream_t); - - /* The "var" has been set by an implicit push and must be replaced. */ - SvREFCNT_dec(fs->var); - } - - SvREFCNT_dec(os->var); - os->var = var; - - if (f != NULL) { fs->var = nxt_perl_psgi_layer_stream_arg(aTHX_ o, param, flags); }
faster docker build for safety replay
@@ -8,13 +8,3 @@ cd capnproto-c++-0.6.1 make -j4 make install -cd .. -git clone https://github.com/commaai/c-capnproto.git -cd c-capnproto -git checkout 2e625acacf58a5f5c8828d8453d1f8dacc700a96 -git submodule update --init --recursive -autoreconf -f -i -s -CFLAGS="-fPIC" ./configure --prefix=/usr/local -make -j4 -make install -
config-tools: board inspector does not exit if a usb device is unplugged Board inspector may throw an error if a usb device is unplugged or disconnected while extracting usb device information. Print out the debug message and continue parsing.
# SPDX-License-Identifier: BSD-3-Clause # -import os, re +import os, re, logging from extractors.helpers import add_child, get_node @@ -17,6 +17,7 @@ def extract(args, board_etree): if m: d = m.group(0) devpath = os.path.join(USB_DEVICES_PATH, d) + try: with open(os.path.join(devpath, 'devnum'), 'r') as f: devnum = f.read().strip() with open(os.path.join(devpath, 'busnum'), 'r') as f: @@ -30,4 +31,6 @@ def extract(args, board_etree): if usb_port_node is not None: add_child(usb_port_node, "usb_device", location=d, description=d + desc) - + except Exception as e: + logging.debug(f"{e}: please check if a USB device has been removed form usb port {d}.") + pass
common/usb_port_power_dumb.c: Format with clang-format BRANCH=none TEST=none
@@ -75,14 +75,13 @@ usb_port_command_set_mode(struct host_cmd_handler_args *args) { const struct ec_params_usb_charge_set_mode *p = args->params; - if (usb_charge_set_mode(p->usb_port_id, p->mode, - p->inhibit_charge) != EC_SUCCESS) + if (usb_charge_set_mode(p->usb_port_id, p->mode, p->inhibit_charge) != + EC_SUCCESS) return EC_RES_ERROR; return EC_RES_SUCCESS; } -DECLARE_HOST_COMMAND(EC_CMD_USB_CHARGE_SET_MODE, - usb_port_command_set_mode, +DECLARE_HOST_COMMAND(EC_CMD_USB_CHARGE_SET_MODE, usb_port_command_set_mode, EC_VER_MASK(0)); /*****************************************************************************/ @@ -108,18 +107,16 @@ static int command_set_mode(int argc, char **argv) /* fallthrough */ case 1: for (i = 0; i < USB_PORT_COUNT; i++) - ccprintf("Port %d: %s\n", - i, charge_mode[i] ? "on" : "off"); + ccprintf("Port %d: %s\n", i, + charge_mode[i] ? "on" : "off"); return EC_SUCCESS; } return EC_ERROR_PARAM_COUNT; } -DECLARE_CONSOLE_COMMAND(usbchargemode, command_set_mode, - "[<port> <on | off>]", +DECLARE_CONSOLE_COMMAND(usbchargemode, command_set_mode, "[<port> <on | off>]", "Set USB charge mode"); - /*****************************************************************************/ /* Hooks */ @@ -135,8 +132,8 @@ static void usb_port_init(void) const uint8_t *prev; int version, size, i; - prev = (const uint8_t *)system_get_jump_tag(USB_SYSJUMP_TAG, - &version, &size); + prev = (const uint8_t *)system_get_jump_tag(USB_SYSJUMP_TAG, &version, + &size); if (!prev || version != USB_HOOK_VERSION || size != sizeof(charge_mode)) { usb_port_all_ports_off();
Fortran: Bug in grib_f_get_error_string
@@ -2181,7 +2181,7 @@ int grib_f_get_error_string_(int* err, char* buf, int len){ const char* err_msg = grib_get_error_message(*err); const size_t erlen = strlen(err_msg); if( len < erlen) return GRIB_ARRAY_TOO_SMALL; - strncpy(buf, err_msg,(size_t)len); + strncpy(buf, err_msg, (size_t)erlen); /* ECC-1488 */ return GRIB_SUCCESS; } int grib_f_get_error_string__(int* err, char* buf, int len){
fix doc/dev/README.md
@@ -10,7 +10,7 @@ It complements the man pages found [here](/doc/help). ## Concepts -- [KDB Contracts](contracts.md) +- [KDB Contracts](kdb-contracts.md) - [Logging](logging.md) - [Error Handling](error-handling.md) - [Error Message](error-message.md)
docs: Use wbitt/network-multitool for dns guide. Docker image praqma/network-multitool name changed to wbitt/network-multitool. To be future proof, we change the name in the guide. [0]
@@ -23,7 +23,7 @@ POD TYPE QTYPE NAME Run a pod on a different terminal and perform some DNS requests: ```bash -$ kubectl -n demo run mypod -it --image=praqma/network-multitool -- /bin/sh +$ kubectl -n demo run mypod -it --image=wbitt/network-multitool -- /bin/sh # nslookup www.microsoft.com # nslookup www.google.com # nslookup www.amazon.com
check the whole 32bit address.
@@ -29,13 +29,24 @@ class program_over_testbed(object): # check bootload backdoor is configured correctly bootloader_backdoor_enabled = False + extended_linear_address_found = False with open(image_path,'r') as f: for line in f: + + # looking for data at address 0027FFD4 + # refer to: https://en.wikipedia.org/wiki/Intel_HEX#Record_types + + # looking for upper 16bit address 0027 + if line[:-1] == ':020000040027D3': + extended_linear_address_found = True + + # check the lower 16bit address FFD4 + # | 1:3 byte count | 3:7 address | 9:17 32-bit field of the lock bit page (the last byte is backdoor configuration) | # 'F6' = 111 1 0 110 # reserved backdoor and bootloader enable active low PA pin used for backdoor enabling (PA6) - if line[3:7] == 'FFD4' and int(line[1:3], 16)>4 and line[9:17] == 'FFFFFFF6': + if extended_linear_address_found and line[3:7] == 'FFD4' and int(line[1:3], 16)>4 and line[9:17] == 'FFFFFFF6': bootloader_backdoor_enabled = True assert bootloader_backdoor_enabled
Update test_sysfs.py
-# Copyright(c) 2019, Intel Corporation +# Copyright(c) 2020, Intel Corporation # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are met:
svml: fix portable fallback for simde_x_mm512_deg2rad_{pd,ps}
@@ -2190,8 +2190,8 @@ simde_x_mm512_deg2rad_ps(simde__m512 a) { r_.f32 = a_.f32 * SIMDE_MATH_PI_OVER_180F; #else SIMDE_VECTORIZE - for (size_t i = 0 ; i < (sizeof(r_.m256) / sizeof(r_.m256[0])) ; i++) { - r_.m256[i] = simde_x_mm256_deg2rad_ps(a_.m256[i]); + for (size_t i = 0 ; i < (sizeof(r_.f32) / sizeof(r_.f32[0])) ; i++) { + r_.f32[i] = simde_math_deg2radf(a_.f32[i]); } #endif @@ -2217,8 +2217,8 @@ simde_x_mm512_deg2rad_pd(simde__m512d a) { r_.f64 = a_.f64 * SIMDE_MATH_PI_OVER_180; #else SIMDE_VECTORIZE - for (size_t i = 0 ; i < (sizeof(r_.m256d) / sizeof(r_.m256d[0])) ; i++) { - r_.m256d[i] = simde_x_mm256_deg2rad_pd(a_.m256d[i]); + for (size_t i = 0 ; i < (sizeof(r_.f64) / sizeof(r_.f64[0])) ; i++) { + r_.f64[i] = simde_math_deg2rad(a_.f64[i]); } #endif
enabling more notifications for Travis. We can turn off successes later afte we know things are working
@@ -25,4 +25,5 @@ notifications: email: recipients: - [email protected] - \ No newline at end of file + on_success: always # default: change + on_failure: always # default: always \ No newline at end of file
gre: update gre.api with explicit types Type: refactor
option version = "2.0.0"; +import "vnet/interface_types.api"; import "vnet/ip/ip_types.api"; /** \brief A GRE tunnel type @@ -42,13 +43,11 @@ typedef gre_tunnel { u32 client_index; u32 context; - u8 is_add; - u8 is_ipv6; u16 session_id; vl_api_gre_tunnel_type_t type; u32 instance; u32 outer_fib_id; - u32 sw_if_index; + vl_api_interface_index_t sw_if_index; vl_api_address_t src; vl_api_address_t dst; }; @@ -57,7 +56,7 @@ define gre_tunnel_add_del { u32 client_index; u32 context; - u8 is_add; + bool is_add; vl_api_gre_tunnel_t tunnel; }; @@ -65,14 +64,14 @@ define gre_tunnel_add_del_reply { u32 context; i32 retval; - u32 sw_if_index; + vl_api_interface_index_t sw_if_index; }; define gre_tunnel_dump { u32 client_index; u32 context; - u32 sw_if_index; + vl_api_interface_index_t sw_if_index; }; define gre_tunnel_details
Utilities: Unmount ESP after copying for more security
@@ -67,6 +67,7 @@ UUID="$("${nvram}" 4D1FDA02-38C7-4A6A-9CC6-4BCCA8B30102:boot-path | /usr/bin/sed if [ "$(printf "${UUID}" | /usr/bin/wc -c)" -eq 36 ] && [ -z "$(echo "${UUID}" | /usr/bin/sed 's/[-0-9A-F]//g')" ]; then /usr/sbin/diskutil mount "${UUID}" || abort "Failed to mount ${UUID}!" /bin/cp ./nvram.plist "$(/usr/sbin/diskutil info "${UUID}" | /usr/bin/sed -n 's/.*Mount Point: *//p')" || abort "Failed to copy nvram.plist!" + /usr/sbin/diskutil unmount "${UUID}" || abort "Failed to unmount ${UUID}!" exit 0 else abort "Illegal UUID or unknown loader!"
neon: fix vec4_muladds (critical)
@@ -602,7 +602,7 @@ glm_vec4_muladds(vec4 a, float s, vec4 dest) { _mm_set1_ps(s)))); #elif defined(CGLM_NEON_FP) vst1q_f32(dest, vaddq_f32(vld1q_f32(dest), - vsubq_f32(vld1q_f32(a), + vmulq_f32(vld1q_f32(a), vdupq_n_f32(s)))); #else dest[0] += a[0] * s;
options/ansi: Implement mktime
@@ -48,9 +48,8 @@ double difftime(time_t a, time_t b) { return a - b; } -time_t mktime(struct tm *) { - __ensure(!"Not implemented"); - __builtin_unreachable(); +time_t mktime(struct tm *tm) { + return timegm(tm); } /* There is no other implemented value than TIME_UTC; all other values
OcBootManagementLib: Sync with EfiPkg
@@ -988,7 +988,7 @@ OcFillBootEntry ( if (!IsLoadHandle) { Status = BootPolicy->GetBootFileEx ( Handle, - APPLE_BOOT_POLICY_MODE_1, + BootPolicyOk, &DevicePath ); } else { @@ -1105,7 +1105,7 @@ InternalGetFirstDeviceBootFilePath ( Status = BootPolicy->GetBootFileEx ( HandleBuffer[Index], - APPLE_BOOT_POLICY_MODE_1, + BootPolicyOk, &BootDevicePath ); if (!EFI_ERROR (Status)) {
time: fix CI error
@@ -35,7 +35,7 @@ static int is_valid_format(int fmt) static int _flb_time_get(flb_time *tm) { -#if __STDC_VERSION__ >= 201112L +#if __STDC_VERSION__ >= 201112L && defined TIME_UTC /* C11 supported! */ return timespec_get(tm, TIME_UTC); #else /* __STDC_VERSION__ */
I've seen this test fail a few times in the past, but only on CI... adding prints to see what we get, so we may find the issue in the future.
local f = field.get("flags") configset.store(cset, f, { "Symbols", "WinMain", "MFC" }) configset.remove(cset, f, { "WinMain" }) - test.isequal({ "Symbols", "MFC" }, configset.fetch(cset, f, {})) + + local result = configset.fetch(cset, f, {}) + test.print(table.tostring(result)) + test.isequal({ "Symbols", "MFC" }, result) end function suite.remove_onMultipleValues() local f = field.get("flags") configset.store(cset, f, { "Symbols", "Maps", "WinMain", "MFC" }) configset.remove(cset, f, { "Maps", "MFC" }) - test.isequal({ "Symbols", "WinMain" }, configset.fetch(cset, f, {})) + + local result = configset.fetch(cset, f, {}) + test.print(table.tostring(result)) + test.isequal({ "Symbols", "WinMain" }, result) end
amend from 5_MS to 4_MS. I had misunderstanding that Linux kernel constant HZ is 100, 200 or 1000. But it should have been 100, 250 or 1000
#if !defined(MRBC_TICK_UNIT) #define MRBC_TICK_UNIT_1_MS 1 #define MRBC_TICK_UNIT_2_MS 2 -#define MRBC_TICK_UNIT_5_MS 5 +#define MRBC_TICK_UNIT_4_MS 4 #define MRBC_TICK_UNIT_10_MS 10 // You may have to configure 2 ms or larger if you use // POSIX or microcontroller whose native tick time is
[hg] revert hg client release Note: mandatory check (NEED_CHECK) was skipped
}, "hg": { "formula": { - "sandbox_id": [335981402, 335981414, 74450064], + "sandbox_id": [302223618, 302223634, 74450064], "match": "Hg" }, "executable": {
kernel: x86_64: fix offset calculation in page_mappings_modify_flags
@@ -770,6 +770,8 @@ errval_t page_mappings_modify_flags(struct capability *mapping, size_t offset, return SYS_ERR_VNODE_TYPE; } assert(type_is_vnode(leaf_pt->cap.type)); + // add first pte location from mapping cap to user supplied offset + offset += info->entry; errval_t err; err = generic_modify_flags(leaf_pt, offset, pages, flags);
Added per file rtti generation for VS
m.basicRuntimeChecks, m.exceptionHandling, m.compileAsManaged, + m.runtimeTypeInfo, } else return { end end - function m.runtimeTypeInfo(cfg) + function m.runtimeTypeInfo(cfg, condition) if cfg.rtti == p.OFF and cfg.clr == p.OFF then - m.element("RuntimeTypeInfo", nil, "false") + m.element("RuntimeTypeInfo", condition, "false") elseif cfg.rtti == p.ON then - m.element("RuntimeTypeInfo", nil, "true") + m.element("RuntimeTypeInfo", condition, "true") end end
pydiag: Restore help option in argparse usage Check for --help and print help message. Also add a small description + epilog indicating which mode is currently chosen. Default mode is lpbk1.
@@ -228,6 +228,14 @@ class diagtest(object): parser = self._parser.add_argument_group(self._mode) self.add_arguments(parser) self.args, _ = self._parser.parse_known_args(in_args) + if self.args.help: + self._parser.description = ''' + fpgadiag testing tool for NLB (native loopback) accelerator.''' + self._parser.epilog = '''Current mode is {}. + Current accelerator is {}'''.format( + self._mode, self.__class__.__name__) + self._parser.print_help() + return False if self.args.end is None: self.args.end = self.args.begin return True
[CI] Add license
-# Copyright 2019 ETH Zurich and University of Bologna. +# Copyright 2020 ETH Zurich and University of Bologna. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License.
Initialize animation track alphas properly;
@@ -30,6 +30,7 @@ Animator* lovrAnimatorCreate(AnimationData* animationData) { .time = 0, .speed = 1, .priority = 0, + .alpha = 1, .playing = false, .looping = false }; @@ -184,9 +185,11 @@ bool lovrAnimatorEvaluate(Animator* animator, const char* bone, mat4 transform) } } + if (touched) { mat4_translate(transform, mixedTranslation[0], mixedTranslation[1], mixedTranslation[2]); mat4_rotateQuat(transform, mixedRotation); mat4_scale(transform, mixedScale[0], mixedScale[1], mixedScale[2]); + } return touched; }
bio: add a malloc failed error to BIO_print
@@ -835,9 +835,12 @@ doapr_outch(char **sbuffer, *sbuffer = NULL; } else { char *tmpbuf; + tmpbuf = OPENSSL_realloc(*buffer, *maxlen); - if (tmpbuf == NULL) + if (tmpbuf == NULL) { + ERR_raise(ERR_LIB_BIO, ERR_R_MALLOC_FAILURE); return 0; + } *buffer = tmpbuf; } } @@ -929,6 +932,5 @@ int BIO_vsnprintf(char *buf, size_t n, const char *format, va_list args) * been large enough.) */ return -1; - else return (retlen <= INT_MAX) ? (int)retlen : -1; }
hdata: Make FSPv1 work again One less thing to work around for those crazy enough to try.
@@ -55,6 +55,7 @@ static enum sp_type find_service_proc_type(const struct HDIF_common_hdr *spss, flags = be16_to_cpu(sp_impl->func_flags); switch (hw_ver) { + case 0x1: case 0x2: /* We only support FSP2 */ sp_type = SP_FSP; break;
Update doc/tutorials/using_partition_mode_on_nuc.rst
@@ -161,7 +161,7 @@ Update ACRN Hypervisor Image .. code-block:: none - $ make hypervisor BOARD_FILE=whl-ipc-i7 SCENARIO_FILE=logical_partition RELEASE=0 + $ make hypervisor BOARD=whl-ipc-i7 SCENARIO=logical_partition RELEASE=0 .. note:: The ``acrn.bin`` will be generated to ``./build/hypervisor/acrn.bin``.
An abstract-based version of URLVariables for v4. Hopefully fixes
package nme.net; -#if (!flash) - +#if (!flash && (haxe_ver<4)) @:nativeProperty -class URLVariables #if (haxe_ver<4) implements Dynamic #end +class URLVariables implements Dynamic { public function new(?inEncoded:String) { @@ -42,6 +41,80 @@ class URLVariables #if (haxe_ver<4) implements Dynamic #end } } +#elseif (!flash) + +class URLVariablesBase +{ + var fields:Map<String,String>; + + public function new(?inEncoded:String) + { + if (inEncoded != null) + decode(inEncoded); + else + fields = new Map(); + } + + public function decode(inVars:String) + { + fields = new Map(); + + var fieldStrings = inVars.split(";").join("&").split("&"); + + for(f in fieldStrings) + { + var eq = f.indexOf("="); + + if (eq > 0) + fields.set(StringTools.urlDecode(f.substr(0, eq)), StringTools.urlDecode(f.substr(eq + 1))); + else if (eq != 0) + fields.set(StringTools.urlDecode(f), ""); + } + } + + public function set(name:String, value:String) : String + { + fields.set(name,value); + return value; + } + + public function get(name:String):String + { + return fields.get(name); + } + + public function toString():String + { + var result = new Array<String>(); + + for(f in fields.keys()) + result.push(StringTools.urlEncode(f) + "=" + StringTools.urlEncode(fields.get(f))); + + return result.join("&"); + } +} + +@:forward(decode,toString) +abstract URLVariables(URLVariablesBase) +{ + public function new(?inEncoded:String) + { + this = new URLVariablesBase(inEncoded); + } + @:resolve + public function set(name:String, value:String) : String + { + return this.set(name,value); + } + + @:resolve + public function get(name:String):String + { + return this.get(name); + } +} + + #else typedef URLVariables = flash.net.URLVariables; #end
nimble/ll: Use RPA regardless of address resolution state when scanning When scanning and local IRK is present we should use RPA regardless of address resolution state (as this controls peer's address resolution not local RPA generation).
@@ -353,10 +353,12 @@ ble_ll_scan_req_pdu_prepare(struct ble_ll_scan_sm *scansm, uint8_t *adv_addr, rl = &g_ble_ll_resolv_list[rpa_index]; } } else { - if (ble_ll_resolv_enabled()) { + /* we look for RL entry to generate local RPA regardless if + * resolving is enabled or not (as this is is for local RPA + * not peer RPA) + */ rl = ble_ll_resolv_list_find(adv_addr, adv_addr_type); } - } /* * If advertising device is on our resolving list, we use RPA generated
tests: add compiler test for masked floating point block vector store
#include <stdint.h> #include <stdio.h> -veci16_t global_vec; +veci16_t global_ivec; +vecf16_t global_fvec; int main() { - veci16_t source_vals = { + veci16_t isource_vals = { 0xf9b831b8, 0x9f7b4265, 0xa70a45a2, @@ -40,9 +41,9 @@ int main() 0xdf8d2b3a }; - __builtin_nyuzi_block_storei_masked(&global_vec, source_vals, 0xaaaa); + __builtin_nyuzi_block_storei_masked(&global_ivec, isource_vals, 0xaaaa); for (int i = 0; i < 16; i++) - printf("%08x\n", ((unsigned int*) &global_vec)[i]); + printf("%08x\n", ((unsigned int*) &global_ivec)[i]); // CHECK: 00000000 // CHECK: 9f7b4265 @@ -60,4 +61,44 @@ int main() // CHECK: ba9c15b3 // CHECK: 00000000 // CHECK: df8d2b3a + + vecf16_t source_fvals = { + 16.0, + 1.0, + 2.0, + 3.0, + 4.0, + 5.0, + 6.0, + 7.0, + 8.0, + 9.0, + 10.0, + 11.0, + 12.0, + 13.0, + 14.0, + 15.0 + }; + + __builtin_nyuzi_block_storef_masked(&global_fvec, source_fvals, 0xaaaa); + for (int i = 0; i < 16; i++) + printf("%g\n", ((unsigned int*) &global_fvec)[i]); + + // CHECK: 0.0 + // CHECK: 1.0 + // CHECK: 0.0 + // CHECK: 3.0 + // CHECK: 0.0 + // CHECK: 5.0 + // CHECK: 0.0 + // CHECK: 7.0 + // CHECK: 0.0 + // CHECK: 9.0 + // CHECK: 0.0 + // CHECK: 11.0 + // CHECK: 0.0 + // CHECK: 13.0 + // CHECK: 0.0 + // CHECK: 15.0 }
core/cache: remove unused parameter and fix parameter name
@@ -764,7 +764,7 @@ static void elektraCacheCutMeta (KDB * handle) keyDel (parentKey); } -static void elektraCacheLoad (KDB * handle, Split * split, KeySet * cache, Key * parentkey, Key * initialParent, Key * cacheParent) +static void elektraCacheLoad (KDB * handle, Split * split, KeySet * cache, Key * parentKey, Key * initialParent, Key * cacheParent) { // prune old cache info elektraCacheCutMeta (handle); @@ -791,11 +791,10 @@ static void elektraCacheLoad (KDB * handle, Split * split, KeySet * cache, Key * } } -static int elektraCacheLoadSplit (KDB * handle, Split * split, KeySet * ks, KeySet ** cache, Key ** cacheParent, Key * initialParent) +static int elektraCacheLoadSplit (KDB * handle, Split * split, KeySet * ks, KeySet ** cache, Key ** cacheParent) { ELEKTRA_LOG_DEBUG ("CACHE HIT"); ELEKTRA_LOG_DEBUG ("CACHE parentKey: %s, %s", keyName (*cacheParent), keyString (*cacheParent)); - ELEKTRA_LOG_DEBUG ("CACHE initial parent: %s, %s", keyName (initialParent), keyString (initialParent)); if (splitCacheLoadState (split, handle->global) != 0) return -1; @@ -962,7 +961,7 @@ int kdbGet (KDB * handle, KeySet * ks, Key * parentKey) switch (elektraGetCheckUpdateNeeded (split, parentKey)) { case -2: // We have a cache hit - if (elektraCacheLoadSplit (handle, split, ks, &cache, &cacheParent, initialParent) != 0) + if (elektraCacheLoadSplit (handle, split, ks, &cache, &cacheParent) != 0) { goto error; }
Add debug message. Also evaluate grib_handle_of_accessor once
@@ -185,10 +185,10 @@ static int pack_double(grib_accessor* a, const double* val, size_t* len) { grib_accessor_g2latlon* self = (grib_accessor_g2latlon*)a; int ret = 0; - double grid[6]; size_t size = 6; double new_val = *val; + grib_handle* hand = grib_handle_of_accessor(a); if (*len < 1) { ret = GRIB_ARRAY_TOO_SMALL; @@ -197,11 +197,11 @@ static int pack_double(grib_accessor* a, const double* val, size_t* len) if (self->given) { long given = *val != GRIB_MISSING_DOUBLE; - if ((ret = grib_set_long_internal(grib_handle_of_accessor(a), self->given, given)) != GRIB_SUCCESS) + if ((ret = grib_set_long_internal(hand, self->given, given)) != GRIB_SUCCESS) return ret; } - if ((ret = grib_get_double_array_internal(grib_handle_of_accessor(a), self->grid, grid, &size)) != GRIB_SUCCESS) + if ((ret = grib_get_double_array_internal(hand, self->grid, grid, &size)) != GRIB_SUCCESS) return ret; /* index 1 is longitudeOfFirstGridPointInDegrees @@ -211,10 +211,13 @@ static int pack_double(grib_accessor* a, const double* val, size_t* len) /* WMO regulation for GRIB edition 2: * The longitude values shall be limited to the range 0 to 360 degrees inclusive */ new_val = normalise_longitude_in_degrees(*val); + if (hand->context->debug && new_val != *val) { + fprintf(stderr, "ECCODES DEBUG pack_double g2latlon: normalise longitude %g -> %g\n", *val, new_val);//?? + } } grid[self->index] = new_val; - return grib_set_double_array_internal(grib_handle_of_accessor(a), self->grid, grid, size); + return grib_set_double_array_internal(hand, self->grid, grid, size); } static int pack_missing(grib_accessor* a) @@ -234,10 +237,8 @@ static int is_missing(grib_accessor* a) grib_accessor_g2latlon* self = (grib_accessor_g2latlon*)a; long given = 1; - if (self->given) grib_get_long_internal(grib_handle_of_accessor(a), self->given, &given); - return !given; }
fix Error: include/graphics/twm4nx/apps/ccalibration.hxx:149:34: error: private field 'm_stop' is not used [-Werror,-Wunused-private-field]
@@ -146,7 +146,6 @@ namespace Twm4Nx struct nxgl_point_s m_touchPos; /**< This is the last touch position */ volatile uint8_t m_calthread; /**< Current calibration display state (See ECalibThreadState)*/ uint8_t m_calphase; /**< Current calibration display state (See ECalibrationPhase)*/ - bool m_stop; /**< True: We have been asked to stop the calibration */ bool m_touched; /**< True: The screen is touched */ struct STouchSample m_sample; /**< Catches new touch samples */ #ifdef CONFIG_TWM4NX_CALIBRATION_AVERAGE
bump hdf5 to 1.10.1
Summary: A general purpose library and file format for storing scientific data Name: %{pname}-%{compiler_family}%{PROJ_DELIM} -Version: 1.10.0 +Version: 1.10.1 Release: 1%{?dist} License: Hierarchical Data Format (HDF) Software Library and Utilities License Group: %{PROJ_NAME}/io-libs URL: http://www.hdfgroup.org/HDF5 DocDir: %{OHPC_PUB}/doc/contrib -Source0: https://support.hdfgroup.org/ftp/HDF5/releases/hdf5-1.10/%{pname}-%{version}-patch1/src/%{pname}-%{version}-patch1.tar.bz2 +Source0: https://support.hdfgroup.org/ftp/HDF5/releases/hdf5-1.10/%{pname}-%{version}/src/%{pname}-%{version}.tar.bz2 Source1: OHPC_macros BuildRequires: zlib-devel
fix memory leak on DeepTiledInput files: compressor for sample count table wasn't deleted
@@ -288,6 +288,7 @@ DeepTiledInputFile::Data::Data (int numThreads): multiPartBackwardSupport(false), numThreads(numThreads), memoryMapped(false), + sampleCountTableComp(NULL), _streamData(NULL), _deleteStream(false) { @@ -313,6 +314,8 @@ DeepTiledInputFile::Data::~Data () for (size_t i = 0; i < slices.size(); i++) delete slices[i]; + + delete sampleCountTableComp; }
sched_getaffinity(2) should return number of bytes written - glibc zeroes out the rest.
@@ -1236,11 +1236,10 @@ sysreturn eventfd2(unsigned int count, int flags) sysreturn sched_getaffinity(int pid, u64 cpusetsize, cpu_set_t *mask) { - if (cpusetsize < sizeof(u64)) - return -EINVAL; - if (mask) - mask->mask[0] = 1ull; /* always cpu 0 */ - return 0; + if (!mask || cpusetsize < sizeof(mask->mask[0])) + return set_syscall_error(current, EINVAL); + mask->mask[0] = 1; /* always cpu 0 */ + return sizeof(mask->mask[0]); } sysreturn prctl(int option, u64 arg2, u64 arg3, u64 arg4, u64 arg5)
trace: fix style in flb_filter.
@@ -160,7 +160,9 @@ void flb_filter_do(struct flb_input_chunk *ic, /* reset data content length */ #ifdef FLB_TRACE - if (ic->trace) flb_trace_chunk_filter(ic->trace, &tm_start, &tm_finish, (void *)f_ins, "", 0); + if (ic->trace) { + flb_trace_chunk_filter(ic->trace, &tm_start, &tm_finish, (void *)f_ins, "", 0); + } #endif // FLB_TRACE @@ -218,7 +220,9 @@ void flb_filter_do(struct flb_input_chunk *ic, } #ifdef FLB_TRACE - if (ic->trace) flb_trace_chunk_filter(ic->trace, (void *)f_ins, &tm_start, &tm_finish, out_buf, out_size); + if (ic->trace) { + flb_trace_chunk_filter(ic->trace, (void *)f_ins, &tm_start, &tm_finish, out_buf, out_size); + } #endif // FLB_TRACE /* Point back the 'data' pointer to the new address */
Fix more critical regions. Cleans tests.
@@ -353,7 +353,9 @@ update_cache(struct module_qstate *qstate, int id) log_err("Subnet cache insertion failed"); return; } + lock_quick_lock(&sne->alloc.lock); rep = reply_info_copy(qstate->return_msg->rep, &sne->alloc, NULL); + lock_quick_unlock(&sne->alloc.lock); if (!rep) { if (acquired_lock) lock_rw_unlock(&lru_entry->lock); log_err("Subnet cache insertion failed");
export.fish: set IDF_PATH without changing current working directory
@@ -6,15 +6,13 @@ function unset end function __main + set script_dir (dirname (readlink -m (status -f))) + if not set -q IDF_PATH - set -gx IDF_PATH (cd (dirname (status -f)); and pwd) + set -gx IDF_PATH $script_dir echo "Setting IDF_PATH to '$IDF_PATH'" end - set script_dir (cd (dirname (status -f)); and pwd) - if test "$script_dir" = "." - set script_dir $pwd - end if test "$IDF_PATH" != "$script_dir" # Change IDF_PATH is important when there are 2 ESP-IDF versions in different directories. # Sourcing this script without change, would cause sourcing wrong export script.
Add description of good starting values for WSGIDaemonProcess options.
@@ -598,6 +598,37 @@ host, the following could be used:: ... </VirtualHost> +For historical reasons and the inability to change existing behaviour when +adding or changing features, many of the options to ``WSGIDaemonProcess``, +especially those related to timeouts are not enabled by default. It is +strongly recommended you explicitly set these options yourself as this will +give you a system which is better able to recover from backlogging due to +overloading when you have too many long running requests or hanging +requests. As a starting point you can see what ``mod_wsgi-express`` uses as +defaults, adjusting them as necessary to suit your specific application +after you research what each option does. For example, consider starting +out with: + +* ``display-name='%{GROUP}'`` + +* ``lang='en_US.UTF-8'`` +* ``locale='en_US.UTF-8'`` + +* ``threads=5`` + +* ``queue-timeout=45`` +* ``socket-timeout=60`` +* ``connect-timeout=15`` +* ``request-timeout=60`` +* ``inactivity-timeout=0`` +* ``startup-timeout=15`` +* ``deadlock-timeout=60`` +* ``graceful-timeout=15`` +* ``eviction-timeout=0`` +* ``restart-interval=0`` +* ``shutdown-timeout=5`` +* ``maximum-requests=0`` + Note that the ``WSGIDaemonProcess`` directive and corresponding features are not available on Windows.
Max width parameter;
@@ -56,9 +56,10 @@ void lovrFontPrint(Font* font, const char* str, float x, float y, float z, float FontAtlas* atlas = &font->atlas; float cx = 0; - float cy = -lovrFontGetHeight(font); + float cy = -lovrFontGetHeight(font) / 2; float u = atlas->width; float v = atlas->height; + float scale = h / font->fontData->height; int len = strlen(str); const char* start = str; @@ -75,7 +76,7 @@ void lovrFontPrint(Font* font, const char* str, float x, float y, float z, float while ((bytes = utf8_decode(str, end, &codepoint)) > 0) { // Newlines - if (codepoint == '\n') { + if (codepoint == '\n' || (w && cx > w / scale && codepoint == ' ')) { // Center the line while (linePtr < font->vertices.length) { @@ -139,7 +140,6 @@ void lovrFontPrint(Font* font, const char* str, float x, float y, float z, float // We override the depth test to LEQUAL to prevent blending issues with glyphs, not great CompareMode oldCompareMode = lovrGraphicsGetDepthTest(); - float scale = h / font->fontData->height; lovrGraphicsPush(); lovrGraphicsTranslate(x, y, z);
mtd Kconfig: Fix trivial typo
@@ -60,7 +60,7 @@ config MTD_PROGMEM Those interfaces must be exported by chip-specific logic. config MTD_FTL - bool "Elable MTD ftl layer" + bool "Enable MTD ftl layer" default n ---help--- Enable to support a MTD FTL layer.
Router: increased HTTP connection related limits.
@@ -1521,11 +1521,11 @@ nxt_router_conf_create(nxt_task_t *task, nxt_router_temp_conf_t *tmcf, skcf->large_header_buffer_size = 8192; skcf->large_header_buffers = 4; skcf->body_buffer_size = 16 * 1024; - skcf->max_body_size = 2 * 1024 * 1024; - skcf->idle_timeout = 65000; - skcf->header_read_timeout = 5000; - skcf->body_read_timeout = 5000; - skcf->send_timeout = 5000; + skcf->max_body_size = 8 * 1024 * 1024; + skcf->idle_timeout = 180 * 1000; + skcf->header_read_timeout = 30 * 1000; + skcf->body_read_timeout = 30 * 1000; + skcf->send_timeout = 30 * 1000; if (http != NULL) { ret = nxt_conf_map_object(mp, http, nxt_router_http_conf,
Update: further adjustments:
@@ -38,7 +38,7 @@ def pick_with_feedback(pickobj=None): forward() elif y_real_temp > closer_to_gripper: forward() - forward() + forward(0.2) forward(0.2) success = close_gripper() #gripper feedback if success: @@ -47,6 +47,8 @@ def pick_with_feedback(pickobj=None): break else: print("//pick failed") + open_gripper() + arm_up() break elif x_real_temp > mid+centerSize: print("//RIGHT<<<<<<<<<<<<<<<<")
status bar: replace ourContact prop
@@ -28,8 +28,9 @@ import useSettingsState, { selectCalmState } from '~/logic/state/settings'; const localSel = selectLocalState(['toggleOmnibox']); const StatusBar = (props) => { - const { ourContact, api, ship } = props; + const { api, ship } = props; const history = useHistory(); + const ourContact = useContactState((state) => state.contacts[`~${ship}`]); const notificationsCount = useHarkState((state) => state.notificationsCount); const doNotDisturb = useHarkState((state) => state.doNotDisturb); const inviteState = useInviteState((state) => state.invites); @@ -40,7 +41,7 @@ const StatusBar = (props) => { const { toggleOmnibox } = useLocalState(localSel); const { hideAvatars } = useSettingsState(selectCalmState); - const color = !!ourContact ? `#${uxToHex(props.ourContact.color)}` : '#000'; + const color = !!ourContact ? `#${uxToHex(ourContact.color)}` : '#000'; const xPadding = !hideAvatars && ourContact?.avatar ? '0' : '2'; const bgColor = !hideAvatars && ourContact?.avatar ? '' : color; const profileImage = @@ -63,8 +64,6 @@ const StatusBar = (props) => { const floatLeap = leapHighlight && window.matchMedia('(max-width: 550px)').matches; - const contact = useContactState((state) => state.contacts[`~${ship}`]); - return ( <Box display='grid' @@ -180,7 +179,11 @@ const StatusBar = (props) => { <Text color='gray' fontWeight='500' mb='1'> Set Status: </Text> - <ProfileStatus contact={contact} ship={`~${ship}`} api={api} /> + <ProfileStatus + contact={ourContact} + ship={`~${ship}`} + api={api} + /> </Row> </Col> }
Make sure object isn't a number before testing for the Hash flag
@@ -237,7 +237,7 @@ Object Type Identification #endif #define FIOBJ_IS_ALLOCATED(o) \ - ((o) && ((o)&1) == 0 && \ + ((o) && ((o)&FIOBJECT_NUMBER_FLAG) == 0 && \ ((o)&FIOBJECT_PRIMITIVE_FLAG) != FIOBJECT_PRIMITIVE_FLAG) #define FIOBJ2PTR(o) ((void *)((o)&FIOBJECT_TYPE_MASK)) @@ -266,21 +266,22 @@ FIO_INLINE size_t fiobj_type_is(FIOBJ o, fiobj_type_enum type) { return (o & FIOBJECT_NUMBER_FLAG) || ((fiobj_type_enum *)o)[0] == FIOBJ_T_NUMBER; case FIOBJ_T_NULL: - return o == fiobj_null() || o == (uintptr_t)(NULL); + return !o || o == fiobj_null(); case FIOBJ_T_TRUE: return o == fiobj_true(); case FIOBJ_T_FALSE: return o == fiobj_false(); case FIOBJ_T_STRING: - return (FIOBJECT_STRING_FLAG && + return (FIOBJECT_STRING_FLAG && (o & FIOBJECT_NUMBER_FLAG) == 0 && (o & FIOBJECT_PRIMITIVE_FLAG) == FIOBJECT_STRING_FLAG) || - (FIOBJECT_STRING_FLAG == 0 && + (FIOBJECT_STRING_FLAG == 0 && FIOBJ_IS_ALLOCATED(o) && ((fiobj_type_enum *)FIOBJ2PTR(o))[0] == FIOBJ_T_STRING); case FIOBJ_T_HASH: - return (FIOBJECT_HASH_FLAG && - (o & FIOBJECT_PRIMITIVE_FLAG) == FIOBJECT_HASH_FLAG) || - (FIOBJECT_HASH_FLAG == 0 && - ((fiobj_type_enum *)FIOBJ2PTR(o))[0] == FIOBJ_T_HASH); + if (FIOBJECT_HASH_FLAG) { + return ((o & FIOBJECT_NUMBER_FLAG) == 0 && + (o & FIOBJECT_PRIMITIVE_FLAG) == FIOBJECT_HASH_FLAG); + } + /* fallthrough */ case FIOBJ_T_FLOAT: case FIOBJ_T_ARRAY: case FIOBJ_T_DATA:
Add undocumented RunFileDlg flags (Vista+)
@@ -20,8 +20,10 @@ typedef BOOL (WINAPI *_IsImmersiveProcess)( #define RFF_CALCDIRECTORY 0x0004 #define RFF_NOLABEL 0x0008 #define RFF_NOSEPARATEMEM 0x0020 +#define RFF_OPTRUNAS 0x0040 #define RFN_VALIDATE (-510) +#define RFN_LIMITEDRUNAS (-511) typedef struct _NMRUNFILEDLGW {
moved away from deprecated XTAL_32768
@@ -59,7 +59,7 @@ syscfg.vals: NFFS_FLASH_AREA: FLASH_AREA_NFFS COREDUMP_FLASH_AREA: FLASH_AREA_IMAGE_1 MCU_DCDC_ENABLED: 1 - XTAL_32768: 1 + MCU_LFCLK_SOURCE: LFXO BOOT_SERIAL_DETECT_PIN: 2 # Button BT_WAKE_UP syscfg.vals.BLE_CONTROLLER:
Handle the getStringArray function Tested-by: IoTivity Jenkins
@@ -1418,7 +1418,47 @@ const double* jni_rep_get_double_array(oc_rep_t *rep, const char *key, size_t *d } %} %rename(repGetByteStringArray) oc_rep_get_byte_string_array; -%rename(repGetStringArray) oc_rep_get_string_array; + +%typemap(in, numinputs=0, noblock=1) size_t *string_array_size { + size_t temp_string_array_size; + $1 = &temp_string_array_size; +} +%typemap(jstype) const oc_string_array_t * jni_rep_get_string_array "String[]" +%typemap(jtype) const oc_string_array_t * jni_rep_get_string_array "String[]" +%typemap(jni) const oc_string_array_t * jni_rep_get_string_array "jobjectArray" +%typemap(javaout) const oc_string_array_t * jni_rep_get_string_array { + return $jnicall; +} +%typemap(out) const oc_string_array_t * jni_rep_get_string_array { + if($1 != NULL) { + jstring temp_string; + const jclass clazz = JCALL1(FindClass, jenv, "java/lang/String"); + $result = JCALL3(NewObjectArray, jenv, (jsize)temp_string_array_size, clazz, 0); + /* exception checking omitted */ + for (size_t i=0; i<temp_string_array_size; i++) { + temp_string = JCALL1(NewStringUTF, jenv, oc_string_array_get_item(*$1, i)); + JCALL3(SetObjectArrayElement, jenv, $result, (jsize)i, temp_string); + JCALL1(DeleteLocalRef, jenv, temp_string); + } + /* free the oc_string_array_t that was allocated in the jni_rep_get_string_array function */ + free($1); + //JCALL4(SetDoubleArrayRegion, jenv, $result, 0, (jsize)temp_string_array_size, (const jdouble *)$1); + } else { + $result = NULL; + } +} +%ignore oc_rep_get_string_array; +%rename(repGetStringArray) jni_rep_get_string_array; +%inline %{ +const oc_string_array_t * jni_rep_get_string_array(oc_rep_t *rep, const char *key, size_t *string_array_size) { + oc_string_array_t * c_string_array = (oc_string_array_t *)malloc(sizeof(oc_string_array_t)); + if (oc_rep_get_string_array(rep, key, c_string_array, string_array_size)) { + return c_string_array; + } + return NULL; +} +%} +//%rename(repGetStringArray) oc_rep_get_string_array; %rename(repGetObject) oc_rep_get_object; %rename(repGetObjectArray) oc_rep_get_object_array; %{
Download fixed release
#!/usr/bin/env sh +CATBOOST_RELEASE="0.24.4" + if [ ! -f "../../ya" ] then - git clone https://github.com/catboost/catboost && \ - CATBOOST_SRC_PATH="./catboost" ./build_model.sh && \ - rm -rf ./catboost && \ + curl -L https://github.com/catboost/catboost/archive/v${CATBOOST_RELEASE}.tar.gz --output ./catboost.tar.gz && \ + tar -xf ./catboost.tar.gz && \ + CATBOOST_SRC_PATH="./catboost-${CATBOOST_RELEASE}" ./build_model.sh && \ + rm -rf ./catboost-${CATBOOST_RELEASE} ./catboost.tar.gz && \ node-gyp build else ./build.sh &&
ixfr-out, fix assertion for clang analyzer.
@@ -981,6 +981,8 @@ void ixfr_store_finish_data(struct ixfr_store* ixfr_store) { if(ixfr_store->data_trimmed) return; + if(!ixfr_store->data) + return; /* data should be nonNULL, we are not cancelled */ ixfr_store->data_trimmed = 1; /* put new serial SOA record after delrrs and addrrs */
tigertool: Migrate tigertool.py to python2/3 compatible BRANCH=master TEST=None
-#!/usr/bin/env python2 +#!/usr/bin/env python # Copyright 2017 The Chromium OS Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. """Script to control tigertail USB-C Mux board.""" +# Note: This is a py2/3 compatible file. + import argparse import sys import time @@ -125,7 +127,7 @@ def do_power(count, bus, pty): 'Power : \S+ \S+ (\d+) mW\s+' \ 'Current : \S+ \S+ (\d+) mA' - for i in xrange(0, count): + for i in range(0, count): results = pty._issue_cmd_get_results(cmd, [regex])[0] c.log('%.2f,\t%s,\t%s\t%s' % (time.time() - start, results[1], results[2], results[3]))
Remove unmatched braces in MessageBuffer pre tags
@@ -630,7 +630,7 @@ typedef void * MessageBufferHandle_t; /** * message_buffer.h * <pre> - * BaseType_t xMessageBufferIsFull( MessageBufferHandle_t xMessageBuffer ) ); + * BaseType_t xMessageBufferIsFull( MessageBufferHandle_t xMessageBuffer ); * </pre> * * Tests to see if a message buffer is full. A message buffer is full if it @@ -648,7 +648,7 @@ typedef void * MessageBufferHandle_t; /** * message_buffer.h * <pre> - * BaseType_t xMessageBufferIsEmpty( MessageBufferHandle_t xMessageBuffer ) ); + * BaseType_t xMessageBufferIsEmpty( MessageBufferHandle_t xMessageBuffer ); * </pre> * * Tests to see if a message buffer is empty (does not contain any messages). @@ -690,7 +690,7 @@ typedef void * MessageBufferHandle_t; /** * message_buffer.h * <pre> - * size_t xMessageBufferSpaceAvailable( MessageBufferHandle_t xMessageBuffer ) ); + * size_t xMessageBufferSpaceAvailable( MessageBufferHandle_t xMessageBuffer ); * </pre> * Returns the number of bytes of free space in the message buffer. * @@ -714,7 +714,7 @@ typedef void * MessageBufferHandle_t; /** * message_buffer.h * <pre> - * size_t xMessageBufferNextLengthBytes( MessageBufferHandle_t xMessageBuffer ) ); + * size_t xMessageBufferNextLengthBytes( MessageBufferHandle_t xMessageBuffer ); * </pre> * Returns the length (in bytes) of the next message in a message buffer. * Useful if xMessageBufferReceive() returned 0 because the size of the buffer
analysis workflow, install libevent for test.
@@ -26,6 +26,7 @@ jobs: # clang_analysis: "yes" - name: Clang on Linux, libevent, clang-analysis os: ubuntu-latest + install_libevent: "yes" config: "CC=clang --enable-debug --disable-flto --with-libevent" make_test: "yes" clang_analysis: "yes" @@ -45,6 +46,9 @@ jobs: - uses: actions/checkout@v2 with: submodules: false + - name: install libevent + if: ${{ matrix.install_libevent == 'yes' }} + run: apt-get install libevent-dev - name: install expat if: ${{ matrix.install_expat == 'yes' }} run: brew install expat
testing: Check for render importing a file with an end tag.
@@ -283,6 +283,19 @@ class TestBadImport < TestCase import tag_at_end """) + # bad imported file (end tag from render origin) + + t = Interpreter.with_targets( + @t_tag_at_end + ) + + assert_render_fails(t, """\ + SyntaxError: Unexpected token '?>'.\n \ + from tag_at_end.lily:1:\n\ + """, + """<?lily import tag_at_end + """) + # bad imported file (invalid) t = Interpreter.with_targets(
seq_cutoff: Ignore invalid streams
@@ -31,6 +31,12 @@ static int ocf_seq_cutoff_stream_cmp(struct ocf_rb_node *n1, struct ocf_seq_cutoff_stream *stream2 = container_of(n2, struct ocf_seq_cutoff_stream, node); + if (stream1->valid < stream2->valid) + return -1; + + if (stream1->valid > stream2->valid) + return 1; + if (stream1->rw < stream2->rw) return -1; @@ -54,12 +60,8 @@ static struct ocf_rb_node *ocf_seq_cutoff_stream_list_find( node = list_entry(node_list, struct ocf_rb_node, list); stream = container_of(node, struct ocf_seq_cutoff_stream, node); - if (stream->valid) - max_stream = stream; list_for_each_entry(node, node_list, list) { stream = container_of(node, struct ocf_seq_cutoff_stream, node); - if (!stream->valid) - continue; if (!max_stream) max_stream = stream; if (stream->bytes > max_stream->bytes) @@ -161,7 +163,7 @@ static bool ocf_core_seq_cutoff_base_check(struct ocf_seq_cutoff *seq_cutoff, struct ocf_seq_cutoff_stream **out_stream) { struct ocf_seq_cutoff_stream item = { - .last = addr, .rw = rw + .last = addr, .rw = rw, .valid = true }; struct ocf_seq_cutoff_stream *stream; struct ocf_rb_node *node; @@ -229,7 +231,7 @@ static struct ocf_seq_cutoff_stream *ocf_core_seq_cutoff_base_update( uint64_t addr, uint32_t len, int rw, bool insert) { struct ocf_seq_cutoff_stream item = { - .last = addr, .rw = rw + .last = addr, .rw = rw, .valid = true }; struct ocf_seq_cutoff_stream *stream; struct ocf_rb_node *node;
INI: fix formating
@@ -1154,7 +1154,8 @@ static void iniWriteMeta (FILE * fh, Key * key) { Key * meta = (Key *)keyCurrentMeta (key); const char * name = keyName (meta); - if (strncmp (name, "internal/", 9) && strcmp (name, "internal/ini/section") && strncmp (name, "comment", 7) && strncmp(name, "warnings/", 9) && strncmp(name, "error/", 6) && strcmp(name, "warnings") && strcmp(name, "error")) + if (strncmp (name, "internal/", 9) && strcmp (name, "internal/ini/section") && strncmp (name, "comment", 7) && + strncmp (name, "warnings/", 9) && strncmp (name, "error/", 6) && strcmp (name, "warnings") && strcmp (name, "error")) { if (!strcmp (name, "binary") && keyGetNamespace (key) != KEY_NS_SPEC) continue; const char * string = keyString (meta);
docs(key-press): Update for standardized keys Replace existing HID Usage Tables link with links to the new codes documentation.
@@ -8,7 +8,18 @@ sidebar_label: Key Press The most basic of behaviors, is the ability to send certain keycode presses and releases in response to activating a certain key. -For reference on keycode values, see pages 83-89 of the [USB HID Usage Tables](https://www.usb.org/document-library/hid-usage-tables-12). +The categories of supported codes are: + +- [Keyboard & Keypad](../codes/keyboard-keypad) +- [Editing](../codes/editing) +- [Media](../codes/media) +- [Applications](../codes/applications) +- [Input Assist](../codes/input-assist) +- [Power](../codes/power) + +Please visit the [codes](../codes) section for a comprehensive list. + +For advanced users, user-defined HID codes are also supported but must be encoded, please see [`dt-bindings/zmk/keys.h`](https://github.com/zmkfirmware/zmk/blob/main/app/include/dt-bindings/zmk/keys.h) for further insight. ## Keycode Defines
nimble/ll: Fix chanmap initialization
@@ -1642,7 +1642,8 @@ ble_ll_reset(void) /* Enable all channels in channel map */ g_ble_ll_data.chan_map_num_used = BLE_PHY_NUM_DATA_CHANS; - memset(g_ble_ll_data.chan_map, 0xff, BLE_LL_CHAN_MAP_LEN); + memset(g_ble_ll_data.chan_map, 0xff, BLE_LL_CHAN_MAP_LEN - 1); + g_ble_ll_data.chan_map[4] = 0x1f; #if MYNEWT_VAL(BLE_LL_ROLE_PERIPHERAL) || MYNEWT_VAL(BLE_LL_ROLE_CENTRAL) /* Reset connection module */
Fix ifdef in capi.c for janet_getuinteger64 and janet_getinteger64
@@ -260,7 +260,7 @@ int32_t janet_getinteger(const Janet *argv, int32_t n) { } int64_t janet_getinteger64(const Janet *argv, int32_t n) { -#ifdef JANET_INTTYPES +#ifdef JANET_INT_TYPES return janet_unwrap_s64(argv[n]); #else Janet x = argv[n]; @@ -272,7 +272,7 @@ int64_t janet_getinteger64(const Janet *argv, int32_t n) { } uint64_t janet_getuinteger64(const Janet *argv, int32_t n) { -#ifdef JANET_INTTYPES +#ifdef JANET_INT_TYPES return janet_unwrap_u64(argv[n]); #else Janet x = argv[n];
readme DOC mention transition manual
@@ -14,6 +14,12 @@ providing API) in C. The library is used e.g. in [libnetconf2](https://github.co If you are interested in future plans announcements, please subscribe to the [Future Plans issue](https://github.com/CESNET/libyang/issues/880). +## Migration from libyang version 1 or older + +Look into the documentation and the section `Transition Manual`. That should help with basic migration and the +ability to compile a project. But to actually make use of the new features, it is required to read through +the whole documentation and the API. + ## Provided Features * Parsing (and validating) schemas in YANG format.
Fix undefined behaviour in X509_NAME_cmp() If the lengths of both names is 0 then don't attempt to do a memcmp. Issue reported by Simon Friedberger, Robert Merget and Juraj Somorovsky.
@@ -173,7 +173,7 @@ int X509_NAME_cmp(const X509_NAME *a, const X509_NAME *b) ret = a->canon_enclen - b->canon_enclen; - if (ret) + if (ret != 0 || a->canon_enclen == 0) return ret; return memcmp(a->canon_enc, b->canon_enc, a->canon_enclen);
pmix: add project URL
@@ -17,6 +17,7 @@ Name: %{pname}%{PROJ_DELIM} Version: 1.2.3 Release: 1%{?dist} License: BSD +URL: https://pmix.github.io/pmix/ Group: %{PROJ_NAME}/rms Source: https://github.com/pmix/pmix/releases/download/v%{version}/pmix-%{version}.tar.bz2 Source1: OHPC_macros
Validate parser parameter to XML_SetUnparsedEntityDeclHandler
@@ -1500,6 +1500,7 @@ void XMLCALL XML_SetUnparsedEntityDeclHandler(XML_Parser parser, XML_UnparsedEntityDeclHandler handler) { + if (parser != NULL) unparsedEntityDeclHandler = handler; }
OcConsoleLib: Replace invalid GOP on ConOut as seen on MacPro5,1
@@ -405,14 +405,78 @@ OcProvideConsoleGop ( ) { EFI_STATUS Status; - VOID *Gop; + EFI_GRAPHICS_OUTPUT_PROTOCOL *OriginalGop; + EFI_GRAPHICS_OUTPUT_PROTOCOL *Gop; + UINTN HandleCount; + EFI_HANDLE *HandleBuffer; + UINTN Index; - Gop = NULL; - Status = gBS->HandleProtocol (gST->ConsoleOutHandle, &gEfiGraphicsOutputProtocolGuid, &Gop); + OriginalGop = NULL; + Status = gBS->HandleProtocol ( + gST->ConsoleOutHandle, + &gEfiGraphicsOutputProtocolGuid, + (VOID **) &OriginalGop + ); + + if (!EFI_ERROR (Status)) { + DEBUG (( + DEBUG_INFO, + "OCC: GOP exists on ConsoleOutHandle and has %u modes\n", + (UINT32) OriginalGop->Mode->MaxMode + )); + + // + // This is not the case on MacPro5,1 with Mac EFI incompatible GPU. + // Here we need to uninstall ConOut GOP in favour of GPU GOP. + // + if (OriginalGop->Mode->MaxMode > 0) { + return; + } + + DEBUG (( + DEBUG_INFO, + "OCC: Looking for GOP replacement due to invalid mode count\n" + )); + + Status = gBS->LocateHandleBuffer ( + ByProtocol, + &gEfiGraphicsOutputProtocolGuid, + NULL, + &HandleCount, + &HandleBuffer + ); if (EFI_ERROR (Status)) { + DEBUG ((DEBUG_INFO, "OCC: No handles with GOP protocol - %r\n", Status)); + return; + } + + Status = EFI_NOT_FOUND; + for (Index = 0; Index < HandleCount; ++Index) { + if (HandleBuffer[Index] != gST->ConsoleOutHandle) { + Status = gBS->HandleProtocol ( + HandleBuffer[Index], + &gEfiGraphicsOutputProtocolGuid, + (VOID **) &Gop + ); + break; + } + } + + DEBUG ((DEBUG_INFO, "OCC: Alternative GOP status is - %r\n", Status)); + FreePool (HandleBuffer); + + if (!EFI_ERROR (Status)) { + gBS->UninstallProtocolInterface ( + gST->ConsoleOutHandle, + &gEfiGraphicsOutputProtocolGuid, + OriginalGop + ); + } + } else { DEBUG ((DEBUG_INFO, "OCC: Installing GOP (%r) on ConsoleOutHandle...\n", Status)); - Status = gBS->LocateProtocol (&gEfiGraphicsOutputProtocolGuid, NULL, &Gop); + Status = gBS->LocateProtocol (&gEfiGraphicsOutputProtocolGuid, NULL, (VOID **) &Gop); + } if (!EFI_ERROR (Status)) { Status = gBS->InstallMultipleProtocolInterfaces ( @@ -425,7 +489,6 @@ OcProvideConsoleGop ( DEBUG ((DEBUG_WARN, "OCC: Failed to install GOP on ConsoleOutHandle - %r\n", Status)); } } else { - DEBUG ((DEBUG_WARN, "OCC: Missing GOP entirely - %r\n", Status)); - } + DEBUG ((DEBUG_WARN, "OCC: Missing compatible GOP - %r\n", Status)); } }
Fix unit tests for mainUtils Commit replaced too many usages of "with self.lock as l" with "with self.lock" This commit corrects the missing "with self.lock as l" problems to ensure the unit tests pass Authored-by: Tyler Ramer
@@ -24,7 +24,7 @@ class MainUtilsTestCase(GpTestCase): self.assertEquals(False, os.path.exists(self.lockfile)) def test_lock_owned_by_parent(self): - with self.lock: + with self.lock as l: self.assertEquals(l.read_pid(), self.ppid) @@ -34,7 +34,7 @@ class MainUtilsTestCase(GpTestCase): self.lock.acquire() def test_child_can_read_lock_owner(self): - with self.lock: + with self.lock as l: pid = os.fork() if pid == 0: self.assertEquals(l.read_pid(), self.ppid)
Storing pointer to next buffer in chain before free the buffer. This is required to avoid dereference of freed memory. Found by Coverity (CID 353372).
@@ -172,11 +172,12 @@ nxt_buf_pool_free(nxt_buf_pool_t *bp, nxt_buf_t *b) void nxt_buf_pool_destroy(nxt_buf_pool_t *bp) { - nxt_buf_t *b; + nxt_buf_t *b, *n; bp->destroy = 1; - for (b = bp->free; b != NULL; b = b->next) { + for (b = bp->free; b != NULL; b = n) { + n = b->next; nxt_buf_free(bp->mem_pool, b); }
zoul: fix format specifiers
@@ -124,7 +124,7 @@ PROCESS_THREAD(test_remote_pm, ev, data) */ cycles = pm_get_num_cycles(); - printf("PM: cycle number %lu\n", cycles); + printf("PM: cycle number %" PRIu32 "\n", cycles); if((cycles % 2) == 0) { /* Set the timeout */ @@ -133,7 +133,7 @@ PROCESS_THREAD(test_remote_pm, ev, data) TEST_LEDS_FAIL; } - printf("PM: Soft shutdown, timeout set to %lu\n", pm_get_timeout()); + printf("PM: Soft shutdown, timeout set to %" PRIu32 "\n", pm_get_timeout()); leds_off(LEDS_ALL); leds_on(LEDS_RED);
when flag is RT_DEVICE_FLAG_STREAM, paser '\n' break!
@@ -221,8 +221,11 @@ rt_inline int _serial_poll_rx(struct rt_serial_device *serial, rt_uint8_t *data, *data = ch; data ++; length --; + if(serial->parent.open_flag & RT_DEVICE_FLAG_STREAM) + { if (ch == '\n') break; } + } return size - length; }
Keep the imported classes sorted
@@ -19,7 +19,7 @@ This module is entirely based on the PSA API. # limitations under the License. import re -from typing import Iterable, Optional, Tuple, Dict +from typing import Dict, Iterable, Optional, Tuple from mbedtls_dev.asymmetric_key_data import ASYMMETRIC_KEY_DATA
Expose signal, type, and status name arrays. Makes it easier to print status stuff.
@@ -1261,6 +1261,9 @@ JANET_API int janet_verify(JanetFuncDef *def); /* Pretty printing */ #define JANET_PRETTY_COLOR 1 JANET_API JanetBuffer *janet_pretty(JanetBuffer *buffer, int depth, int flags, Janet x); +JANET_API const char *const janet_type_names[16]; +JANET_API const char *const janet_signal_names[14]; +JANET_API const char *const janet_status_names[16]; /* Misc */ JANET_API int janet_equals(Janet x, Janet y);
Clarify the gui::get_preferred_api const char** argument use The const char** should be explicitly assigned from one of the global choices.
@@ -100,6 +100,8 @@ typedef struct clap_plugin_gui { // Returns true if the plugin has a preferred api. // The host has no obligation to honor the plugin preferrence, this is just a hint. + // The const char **api variable should be explicitly assigned as a pointer to + // one of the CLAP_WINDOW_API_ constants defined above, not strcopied. // [main-thread] bool (*get_preferred_api)(const clap_plugin_t *plugin, const char **api, bool *is_floating);
Fix bad check of fee_amount_length
@@ -12,7 +12,7 @@ void copy_transaction_parameters(create_transaction_parameters_t* sign_transacti memset(&stack_data, 0, sizeof(stack_data)); strncpy(stack_data.fullAddress, sign_transaction_params->destination_address, sizeof(stack_data.fullAddress)); if ((stack_data.fullAddress[sizeof(stack_data.fullAddress) - 1] != '\0') || - (sign_transaction_params->amount_length > 8) || + (sign_transaction_params->amount_length > 32) || (sign_transaction_params->fee_amount_length > 8)) { os_lib_end(); }
make clear that kadnode-ctl ping needs an ip-address
@@ -41,7 +41,7 @@ static const char* g_server_usage = " status\n" " lookup <query>\n" " announce [<query>[:<port>] [<minutes>]]\n" - " ping <addr>\n"; + " ping <ip-addr>\n"; const char* g_server_usage_debug = " blacklist <addr>\n"
Workaround for Tuya
@@ -545,6 +545,7 @@ const std::vector<Sensor::ButtonMap> Sensor::buttonMap(const QMap<QString, std:: if (m_buttonMap.empty()) { const QString &modelid = item(RAttrModelId)->toString(); + const QString &manufacturer = item(RAttrManufacturerName)->toString(); for (auto i = buttonMapForModelId.constBegin(); i != buttonMapForModelId.constEnd(); ++i) { @@ -553,6 +554,11 @@ const std::vector<Sensor::ButtonMap> Sensor::buttonMap(const QMap<QString, std:: m_buttonMap = buttonMapData.value(i.value()); } } + // Workaround for Tuya without usable modelid + if (manufacturer == QLatin1String("_TZ3000_bi6lpsew")) // can't use model id but manufacture name is device specific + { + m_buttonMap = buttonMapData.value("Tuya3gangMap"); + } } return m_buttonMap;
vppinfra: correct clib_bitmap_set() return comment Fix a copy-n-paste issue that left clib_bitmap_set()'s return type documentation incorrect. Chnage it to indicate that the function returns a new pointer for the bitmap that could be different due to a possible reallocation. Type: docs
@@ -178,7 +178,7 @@ clib_bitmap_set_no_check (uword * a, uword i, uword new_value) @param ai - pointer to the bitmap @param i - the bit position to interrogate @param value - new value for the bit - @returns the old value of the bit + @returns the (possibly reallocated) bitmap object pointer */ always_inline uword * clib_bitmap_set (uword * ai, uword i, uword value)
travis BUGFIX running commands in sudo login shell With login shell (-i) it moves to root's home directory, so before calling make command, it is necessaro to go into the previsou directory
@@ -60,7 +60,7 @@ jobs: - cd cmocka-1.1.2 && mkdir build && cd build && cmake .. && make -j2 && sudo make install && cd ../.. - wget https://ftp.pcre.org/pub/pcre/pcre2-10.30.tar.gz - tar -xzf pcre2-10.30.tar.gz - - cd pcre2-10.30 && ./configure && make -j2 && sudo -i make install && cd .. + - cd pcre2-10.30 && ./configure && make -j2 && sudo -i -- sh -c 'cd /home/travis/pcre2-10.30/ && make install' && cd .. script: - mkdir build && cd build && cmake .. && make -j2 && ctest --output-on-failure && cd - - stage: Test
admin/docs: enable pbspro doc build on aarch64/sles
@@ -107,6 +107,9 @@ make ; %{parser} steps.tex > recipe.sh ; popd pushd docs/recipes/install/sles12/aarch64/warewulf/slurm make ; %{parser} steps.tex > recipe.sh ; popd +pushd docs/recipes/install/sles12/aarch64/warewulf/pbspro +make ; %{parser} steps.tex > recipe.sh ; popd + %install %{__mkdir_p} %{buildroot}%{OHPC_PUB}/doc @@ -154,6 +157,10 @@ install -m 0755 -p -D docs/recipes/install/%{lpath}/recipe.sh %{buildroot}/%{OHP install -m 0644 -p -D docs/recipes/install/%{lpath}/steps.pdf %{buildroot}/%{OHPC_PUB}/doc/recipes/%{lpath}/Install_guide.pdf install -m 0755 -p -D docs/recipes/install/%{lpath}/recipe.sh %{buildroot}/%{OHPC_PUB}/doc/recipes/%{lpath}/recipe.sh +%define lpath sles12/aarch64/warewulf/pbspro +install -m 0644 -p -D docs/recipes/install/%{lpath}/steps.pdf %{buildroot}/%{OHPC_PUB}/doc/recipes/%{lpath}/Install_guide.pdf +install -m 0755 -p -D docs/recipes/install/%{lpath}/recipe.sh %{buildroot}/%{OHPC_PUB}/doc/recipes/%{lpath}/recipe.sh + # input file templates install -m 0644 -p docs/recipes/install/centos7/input.local.template %{buildroot}/%{OHPC_PUB}/doc/recipes/centos7/input.local install -m 0644 -p docs/recipes/install/sles12/input.local.template %{buildroot}/%{OHPC_PUB}/doc/recipes/sles12/input.local
docs : updata BoAT_User_Guide_en.md updata BoAT_User_Guide_en.md
@@ -364,6 +364,7 @@ The smart contract used by the demo and its ABI JSON file are placed in: Before running Ethereum's Demo, you need to install the Ethereum node simulator ganache, as well as the Ethereum smart contract compilation deployment tool truffle, could visit this website: https://truffleframework.com . + Ganache has a ganache-cli version of the command line interface, and a Ganache version of the graphical interface. The ganache-cli of the command line interface and the Ganache 1.x version of the graphical interface will not be saved. If the process of ganache-cli or Ganache 1.x is terminated, the deployed contract will be lost. The command truffle migrate - reset Redeploy the contract, the address of the redeployed contract may change. The Ganache 2.x version of the graphical interface can create a Workspace save state. After closing and reopening the Workspace next time, the deployed contract still does not need to be redeployed. In addition to using the ganache simulator, you can also use the Ethereum test network such as Ropsten (you need to apply for a free test token).
Change PhAddListViewColumn DPI
@@ -98,7 +98,7 @@ INT PhAddListViewColumn( LVCOLUMN column; LONG dpiValue; - dpiValue = PhGetDpiValue(ListViewHandle, NULL); + dpiValue = PhGetWindowDpi(ListViewHandle); memset(&column, 0, sizeof(LVCOLUMN)); column.mask = LVCF_FMT | LVCF_WIDTH | LVCF_TEXT | LVCF_SUBITEM | LVCF_ORDER;
MPLS tunnel: don't reuse hw-indices this is the same behaviour as other tunnel types
*/ static mpls_tunnel_t *mpls_tunnel_pool; -/** - * @brief Pool of free tunnel SW indices - i.e. recycled indices - */ -static u32 * mpls_tunnel_free_hw_if_indices; - /** * @brief DB of SW index to tunnel index */ @@ -594,7 +589,8 @@ vnet_mpls_tunnel_del (u32 sw_if_index) mt->mt_sibling_index); dpo_reset(&mt->mt_l2_lb); - vec_add1 (mpls_tunnel_free_hw_if_indices, mt->mt_hw_if_index); + vnet_delete_hw_interface (vnet_get_main(), mt->mt_hw_if_index); + pool_put(mpls_tunnel_pool, mt); mpls_tunnel_db[sw_if_index] = ~0; } @@ -622,19 +618,8 @@ vnet_mpls_tunnel_create (u8 l2_only, mt->mt_flags |= MPLS_TUNNEL_FLAG_L2; /* - * Create a new, or re=use and old, tunnel HW interface + * Create a new tunnel HW interface */ - if (vec_len (mpls_tunnel_free_hw_if_indices) > 0) - { - mt->mt_hw_if_index = - mpls_tunnel_free_hw_if_indices[vec_len(mpls_tunnel_free_hw_if_indices)-1]; - _vec_len (mpls_tunnel_free_hw_if_indices) -= 1; - hi = vnet_get_hw_interface (vnm, mt->mt_hw_if_index); - hi->hw_instance = mti; - hi->dev_instance = mti; - } - else - { mt->mt_hw_if_index = vnet_register_interface( vnm, mpls_tunnel_class.index, @@ -642,7 +627,6 @@ vnet_mpls_tunnel_create (u8 l2_only, mpls_tunnel_hw_interface_class.index, mti); hi = vnet_get_hw_interface (vnm, mt->mt_hw_if_index); - } /* Standard default MPLS tunnel MTU. */ vnet_sw_interface_set_mtu (vnm, hi->sw_if_index, 9000); @@ -826,7 +810,11 @@ vnet_create_mpls_tunnel_command_fn (vlib_main_t * vm, if (is_del) { - if (!vnet_mpls_tunnel_path_remove(sw_if_index, rpaths)) + if (NULL == rpaths) + { + vnet_mpls_tunnel_del(sw_if_index); + } + else if (!vnet_mpls_tunnel_path_remove(sw_if_index, rpaths)) { vnet_mpls_tunnel_del(sw_if_index); }
Minor fixes of lwre
@@ -689,7 +689,7 @@ void re_release(struct re *re) { if (re->matches) RE_FREE(re, re->matches); if (re->code.first) re_program_free(re, &re->code); - memset(re, 0, sizeof(re)); + memset(re, 0, sizeof(*re)); } void re_reset(struct re *re, char *expression) @@ -708,11 +708,14 @@ void re_free(struct re *re) static int re_digit(int c, int base) { - switch (c) { - case '0'...'9': c -= '0'; break; - case 'A'...'Z': c -= ('A' - 10); break; - case 'a'...'z': c -= ('a' - 10); break; - default: return -1; + if (c >= '0' && c <= '9') { + c -= '0'; + } else if (c >= 'A' && c <= 'Z') { + c -= ('A' - 10); + } else if (c >= 'a' && c <= 'z') { + c -= ('a' - 10); + } else { + return -1; } if (c >= base) return -1; return c;
evp_test: use correct deallocation for EVP_CIPHER
@@ -568,7 +568,7 @@ static void cipher_test_cleanup(EVP_TEST *t) for (i = 0; i < AAD_NUM; i++) OPENSSL_free(cdat->aad[i]); OPENSSL_free(cdat->tag); - EVP_CIPHER_meth_free(cdat->fetched_cipher); + EVP_CIPHER_free(cdat->fetched_cipher); } static int cipher_test_parse(EVP_TEST *t, const char *keyword,
fix orc table create information bug
@@ -2050,7 +2050,11 @@ CreateCommandTag(Node *parsetree) break; case T_CreateExternalStmt: - tag = "CREATE EXTERNAL TABLE"; + { + CreateExternalStmt *stmt = (CreateExternalStmt *) parsetree; + + tag = (stmt->isexternal) ? "CREATE EXTERNAL TABLE" : "CREATE TABLE"; + } break; case T_CreateForeignStmt:
filter_rewrite_tag: add NULL check(#4246)
@@ -181,9 +181,14 @@ static int process_config(struct flb_rewrite_tag *ctx) static int is_wildcard(char* match) { - size_t len = strlen(match); + size_t len; size_t i; + if (match == NULL) { + return 0; + } + len = strlen(match); + /* '***' should be ignored. So we check every char. */ for (i=0; i<len; i++) { if (match[i] != '*') {
GitHub Action runner started suddenly experiencing hang on build of Google Benchmark
@@ -52,9 +52,9 @@ if ERRORLEVEL 1 ( ) REM Install it -vcpkg integrate install vcpkg install gtest:x64-windows -vcpkg install --overlay-ports=%~dp0\ports benchmark:x64-windows +REM Temporarily disable the build of Google Benchmark due to GitHub Actions runner 'hang' on it +REM vcpkg install --overlay-ports=%~dp0\ports benchmark:x64-windows vcpkg install ms-gsl:x64-windows if DEFINED INSTALL_LLVM (