message
stringlengths
6
474
diff
stringlengths
8
5.22k
llvm: update Requires on gcc
@@ -48,7 +48,7 @@ BuildRequires: binutils-devel BuildRequires: libstdc++-devel Requires: binutils Requires: gcc-c++ -Requires: gnu7-compilers%{PROJ_DELIM} = %{gnuver} +Requires: gnu7-compilers%{PROJ_DELIM} %if 0%{?rhel_version} || 0%{?centos_version} || 0%{?rhel} BuildRequires: perl-Data-Dumper %endif
Update sal_socket.c
@@ -489,8 +489,7 @@ int sal_shutdown(int socket, int how) if (sock->ops->shutdown((int) sock->user_data, how) == 0) { rt_free(sock); - sock = RT_NULL; - + socket_table.sockets[socket] = RT_NULL; return 0; }
add exception handling for iperf example's scan when no ap was found
@@ -63,6 +63,11 @@ static void scan_done_handler(void* arg, esp_event_base_t event_base, wifi_ap_record_t *ap_list_buffer; esp_wifi_scan_get_ap_num(&sta_number); + if (!sta_number) { + ESP_LOGE(TAG, "No AP found"); + return; + } + ap_list_buffer = malloc(sta_number * sizeof(wifi_ap_record_t)); if (ap_list_buffer == NULL) { ESP_LOGE(TAG, "Failed to malloc buffer to print scan results");
Tests: graceful shutdown.
@@ -102,7 +102,7 @@ class TestUnit(unittest.TestCase): with open(self.testdir + '/unit.pid', 'r') as f: pid = f.read().rstrip() - call(['kill', pid]) + call(['kill', '-s', 'QUIT', pid]) for i in range(50): if not os.path.exists(self.testdir + '/unit.pid'):
Update: Encode.h: Comment from minimal Narsese to expanded Narsese.
@@ -30,7 +30,7 @@ Atom atoms[TERMS_MAX][ATOMIC_TERM_LEN_MAX]; void Encode_INIT(); //Expands Narsese into by strtok(str," ") tokenizable string with canonical copulas char* Encode_Expand(char *narsese); -//Tokenize minimal Narsese in prefix copula order +//Tokenize expanded Narsese in prefix copula order char** Encode_PrefixTransform(char* narsese_expanded); //Parses a Narsese string to a compound term Term Encode_Term(char *narsese);
Disable complete rsa stack, because of inter dependencies
@@ -64,12 +64,12 @@ before_script: - cd - - mkdir build install - export BUILD_OPTIONS=" \ + -DBUILD_REMOTE_SERVICE_ADMIN=OFF \ -DBUILD_RSA_REMOTE_SERVICE_ADMIN_DFI=OFF \ -DBUILD_DEPLOYMENT_ADMIN=ON \ -DBUILD_DEPENDENCY_MANAGER=ON \ -DBUILD_EXAMPLES=ON -DBUILD_LOG_SERVICE=ON \ -DBUILD_LOG_WRITER=ON \ - -DBUILD_REMOTE_SERVICE_ADMIN=ON \ -DBUILD_RSA_DISCOVERY_CONFIGURED=ON \ -DBUILD_RSA_DISCOVERY_ETCD=ON \ -DBUILD_RSA_EXAMPLES=ON \
Fixup duplicate p9 entries in spira/xscom Fixes:
@@ -276,10 +276,6 @@ static struct dt_node *add_xscom_node(uint64_t base, uint32_t hw_id, dt_add_property_strings(node, "compatible", "ibm,xscom", "ibm,power9-xscom"); break; - case proc_gen_p9: - dt_add_property_strings(node, "compatible", - "ibm,xscom", "ibm,power9-xscom"); - break; default: dt_add_property_strings(node, "compatible", "ibm,xscom"); }
Simplify ffmpeg dependencies Makefile The fact that the current prebuilt FFmpeg is split into two separate zipfiles is an implementation detail. Use a single Makefile recipe for both files. PR <https://github.com/Genymobile/scrcpy/pull/2952>
.PHONY: prepare-win32 prepare-win64 \ - prepare-ffmpeg-shared-win32 \ - prepare-ffmpeg-dev-win32 \ - prepare-ffmpeg-shared-win64 \ - prepare-ffmpeg-dev-win64 \ + prepare-ffmpeg-win32 \ + prepare-ffmpeg-win64 \ prepare-sdl2 \ prepare-adb -prepare-win32: prepare-sdl2 prepare-ffmpeg-shared-win32 prepare-ffmpeg-dev-win32 prepare-adb -prepare-win64: prepare-sdl2 prepare-ffmpeg-shared-win64 prepare-ffmpeg-dev-win64 prepare-adb +prepare-win32: prepare-sdl2 prepare-ffmpeg-win32 prepare-adb +prepare-win64: prepare-sdl2 prepare-ffmpeg-win64 prepare-adb -prepare-ffmpeg-shared-win32: +prepare-ffmpeg-win32: @./prepare-dep https://github.com/Genymobile/scrcpy/releases/download/v1.16/ffmpeg-4.3.1-win32-shared.zip \ 357af9901a456f4dcbacd107e83a934d344c9cb07ddad8aaf80612eeab7d26d2 \ ffmpeg-4.3.1-win32-shared - -prepare-ffmpeg-dev-win32: @./prepare-dep https://github.com/Genymobile/scrcpy/releases/download/v1.16/ffmpeg-4.3.1-win32-dev.zip \ 230efb08e9bcf225bd474da29676c70e591fc94d8790a740ca801408fddcb78b \ ffmpeg-4.3.1-win32-dev -prepare-ffmpeg-shared-win64: +prepare-ffmpeg-win64: @./prepare-dep https://github.com/Genymobile/scrcpy/releases/download/v1.16/ffmpeg-4.3.1-win64-shared.zip \ dd29b7f92f48dead4dd940492c7509138c0f99db445076d0a597007298a79940 \ ffmpeg-4.3.1-win64-shared - -prepare-ffmpeg-dev-win64: @./prepare-dep https://github.com/Genymobile/scrcpy/releases/download/v1.16/ffmpeg-4.3.1-win64-dev.zip \ 2e8038242cf8e1bd095c2978f196ff0462b122cc6ef7e74626a6af15459d8b81 \ ffmpeg-4.3.1-win64-dev
change order of candidates
#include "common.h" - /*===========================================================================*/ /* globale Variablen */ @@ -114,6 +113,7 @@ char *weakword[] = { "12345678", "01234567", "123456789", "987654321", "0123456789", "0987654321", "87654321", "76543210", "12344321", "00000000", +"1357924680", "1q2w3e4r", "changeme", "Password" }; @@ -837,8 +837,9 @@ if(pskfilename != NULL) if((stdoutflag == true) || (fileflag == true)) { - processessid(hcxorgrecords); + keywriteweakpass(); processbssid(hcxorgrecords); + processessid(hcxorgrecords); if(wpsflag == true) keywriteallwpskeys(); if(eudateflag == true) @@ -848,7 +849,6 @@ if((stdoutflag == true) || (fileflag == true)) if((eudateflag == true) ||(usdateflag == true)) keywriteyearyear(); } - keywriteweakpass(); if(hcxdata != NULL) free(hcxdata);
improved broken packet detection
@@ -3967,13 +3967,13 @@ if(memcmp(&nullnonce, wpak->nonce, 32) == 0) return; } -if(memcmp(&fakeanonce1, wpak->nonce, 32) == 0) +if((rc == 17) && (memcmp(&fakeanonce1, wpak->nonce, 32) == 0)) { skippedpacketcount++; return; } -if(memcmp(&fakesnonce1, wpak->nonce, 32) == 0) +if((rc == 17) && (memcmp(&fakesnonce1, wpak->nonce, 32) == 0)) { skippedpacketcount++; return;
build: specify shell for cram tests This is an attempt to fix cram tests in non-POSIX-compliant environment.
@@ -18,7 +18,6 @@ if sh.found() and cram.found() test('cram tests', cram, timeout: 240, - args: [meson.current_source_dir()], + args: ['--shell=' + sh.path(), meson.current_source_dir()], env: env) endif -
groups: new buttons made consistent, dark mode
@@ -115,11 +115,11 @@ export class NewScreen extends Component { </div> <button onClick={this.onClickCreate.bind(this)} - className="f8 ba pa2 b--green2 green2 pointer"> + className="f9 ba pa2 b--green2 green2 pointer bg-transparent"> Start Group </button> <Link to="/~groups"> - <button className="f8 ml3 ba pa2 b--black pointer">Cancel</button> + <button className="f9 ml3 ba pa2 b--black pointer bg-transparent b--white-d white-d">Cancel</button> </Link> </div> </div>
fix openssl detection on macOS since brew --prefix FORMULA returns a path even if the formula is not installed.
@@ -57,7 +57,7 @@ IF ((CMAKE_SYSTEM_NAME STREQUAL "Darwin") AND NOT (DEFINED OPENSSL_ROOT_DIR OR D OUTPUT_STRIP_TRAILING_WHITESPACE ERROR_QUIET ) - IF (OPENSSL_ROOT_DIR STREQUAL "") + IF (NOT EXISTS ${OPENSSL_ROOT_DIR}) MESSAGE(STATUS "*************************************************************************\n" " * Setting OPENSSL_ROOT_DIR to /usr/local/opt/openssl. On macOS, OpenSSL *\n" " * should be installed using homebrew or OPENSSL_ROOT_DIR must be set to *\n"
Add back dynlibs in usefiles.
@@ -186,7 +186,7 @@ const myrdeps = {b, name, mt if mt.islib arcmd(b, go, mt, to) - musecmd(b, gu, mt, tu) + musecmd(b, gu, mt, tu, dynlibs) builtlib(b, mt, libs, dynlibs) else linkcmd(b, go, mt, to, libs, dynlibs, false) @@ -400,11 +400,14 @@ const checkloop = {g, n, visited, looped, stk std.htdel(looped, n) } -const musecmd = {b, n, mt, mu +const musecmd = {b, n, mt, mu, dynlibs std.slpush(&n.cmd, std.sldup(opt_muse)) for o : opt_museflags std.slpush(&n.cmd, o) ;; + for l : dynlibs + std.slpush(&n.cmd, std.fmt("-l{}", l)) + ;; std.slpush(&n.cmd, std.sldup("-o")) std.slpush(&n.cmd, std.sldup(mu)) std.slpush(&n.cmd, std.sldup("-p"))
disables unused _sist_text()
@@ -345,6 +345,9 @@ _sist_cask(c3_c* dir_c, u3_noun nun) return key; } +// XX unused, but may be needed for brainwallet +// +#if 0 /* _sist_text(): ask for a name string. */ static u3_noun @@ -378,7 +381,6 @@ _sist_text(c3_c* pom_c) return say; } -#if 0 /* _sist_bask(): ask a yes or no question. */ static u3_noun
make sure channel is set, than start channel test
@@ -3014,12 +3014,25 @@ static struct iwreq pwrq; static int frequency; static int testchannel; +memset(&pwrq, 0, sizeof(pwrq)); +strncpy(pwrq.ifr_name, interfacename, IFNAMSIZ -1); +pwrq.u.freq.e = 0; +pwrq.u.freq.flags = IW_FREQ_FIXED; +res = ioctl(fd_socket, SIOCGIWFREQ, &pwrq); + memset(&pwrq, 0, sizeof(pwrq)); strncpy(pwrq.ifr_name, interfacename, IFNAMSIZ -1); pwrq.u.freq.e = 0; pwrq.u.freq.flags = IW_FREQ_FIXED; pwrq.u.freq.m = 1; res = ioctl(fd_socket, SIOCSIWFREQ, &pwrq); + +memset(&pwrq, 0, sizeof(pwrq)); +strncpy(pwrq.ifr_name, interfacename, IFNAMSIZ -1); +pwrq.u.freq.e = 0; +pwrq.u.freq.flags = IW_FREQ_FIXED; +res = ioctl(fd_socket, SIOCGIWFREQ, &pwrq); + c = 0; while(channelscanlist[c] != 0) {
Analysis workflow, use matrix parameters.
@@ -14,17 +14,15 @@ jobs: strategy: matrix: include: - - os: ubuntu-latest - name: GCC on Linux - env: - - CONFIG_OPTS: '--enable-debug --disable-flto' - - MAKE_TEST: 'yes' - - os: ubuntu-latest - name: Clang on Linux, clang-analysis - env: - - CONFIG_OPTS: 'CC=clang --enable-debug --disable-flto' - - MAKE_TEST: 'yes' - - TEST_ANALYZER: 'yes' + - name: GCC on Linux + os: ubuntu-latest + config: --enable-debug --disable-flto + make_test: yes + - name: Clang on Linux, clang-analysis + os: ubuntu-latest + config: "CC=clang --enable-debug --disable-flto" + make_test: "yes" + clang_analysis: "yes" steps: - uses: actions/checkout@v2 @@ -32,20 +30,16 @@ jobs: submodules: false - name: checks run: | - echo $CONFIG_OPTS - echo $MAKE_TEST - echo $TEST_ANALYZER + echo ${{ matrix.config }} + echo ${{ matrix.make_test }} + echo ${{ matrix.clang_analysis }} - name: configure - run: ./configure $CONFIG_OPTS + run: ./configure ${{ matrix.config }} - name: make run: make - name: make test - run: | - if [ "$MAKE_TEST" = "yes" ]; then - make test - fi - - name: analyzer - run: | - if [ "$TEST_ANALYZER" = "yes" ]; then - (cd testdata/clang-analysis.tdir; bash clang-analysis.test) - fi + if: ${{ matrix.make_test == 'yes' }} + run: make test + - name: clang-analysis + if: ${{ matrix.clang_analysis == 'yes' }} + run: (cd testdata/clang-analysis.tdir; bash clang-analysis.test)
prov: use new MAC_init arguments in signature legacy code
@@ -117,11 +117,11 @@ static int mac_digest_sign_init(void *vpmacctx, const char *mdname, void *vkey) (char *)mdname, (char *)engine, pmacctx->key->properties, - pmacctx->key->priv_key, - pmacctx->key->priv_key_len)) + NULL, 0)) return 0; - if (!EVP_MAC_init(pmacctx->macctx)) + if (!EVP_MAC_init(pmacctx->macctx, pmacctx->key->priv_key, + pmacctx->key->priv_key_len, NULL)) return 0; return 1;
cpu: Add parentheses around assigment in if check
@@ -231,7 +231,7 @@ bool CPUStats::UpdateCoreMhz() { for (size_t i = 0; i < m_cpuData.size(); i++) { std::string path = "/sys/devices/system/cpu/cpu" + std::to_string(i) + "/cpufreq/scaling_cur_freq"; - if (fp = fopen(path.c_str(), "r")){ + if ((fp = fopen(path.c_str(), "r"))){ fscanf(fp, "%s", str); m_cpuData[i].mhz = atoi(str) / 1000; fclose(fp);
Squashed commit of the following: apps/system/nxplayer: Release buffer before session and release semaphore in nxplayer_setvolume system/nxplayer/nxplayer.c: Remove & for apb->samp reference. It is already a pointer.
@@ -642,7 +642,7 @@ static int nxplayer_readbuffer(FAR struct nxplayer_s *pPlayer, /* Read data into the buffer. */ - apb->nbytes = read(pPlayer->fd, &apb->samp, apb->nmaxbytes); + apb->nbytes = read(pPlayer->fd, apb->samp, apb->nmaxbytes); apb->curbyte = 0; apb->flags = 0; @@ -1131,20 +1131,6 @@ static void *nxplayer_playthread(pthread_addr_t pvarg) err_out: audinfo("Clean-up and exit\n"); - /* Unregister the message queue and release the session */ - - ioctl(pPlayer->devFd, AUDIOIOC_UNREGISTERMQ, (unsigned long) pPlayer->mq); -#ifdef CONFIG_AUDIO_MULTI_SESSION - ioctl(pPlayer->devFd, AUDIOIOC_RELEASE, (unsigned long) pPlayer->session); -#else - ioctl(pPlayer->devFd, AUDIOIOC_RELEASE, 0); -#endif - - /* Cleanup */ - - while (sem_wait(&pPlayer->sem) < 0) - ; - #ifdef CONFIG_AUDIO_DRIVER_SPECIFIC_BUFFERS if (pBuffers != NULL) { @@ -1155,6 +1141,9 @@ err_out: if (pBuffers[x] != NULL) { +#ifdef CONFIG_AUDIO_MULTI_SESSION + buf_desc.session = pPlayer->session; +#endif buf_desc.u.pBuffer = pBuffers[x]; ioctl(pPlayer->devFd, AUDIOIOC_FREEBUFFER, (unsigned long) &buf_desc); } @@ -1172,12 +1161,30 @@ err_out: if (pBuffers[x] != NULL) { +#ifdef CONFIG_AUDIO_MULTI_SESSION + buf_desc.session = pPlayer->session; +#endif buf_desc.u.pBuffer = pBuffers[x]; ioctl(pPlayer->devFd, AUDIOIOC_FREEBUFFER, (unsigned long) &buf_desc); } } #endif + /* Unregister the message queue and release the session */ + + ioctl(pPlayer->devFd, AUDIOIOC_UNREGISTERMQ, (unsigned long) pPlayer->mq); + +#ifdef CONFIG_AUDIO_MULTI_SESSION + ioctl(pPlayer->devFd, AUDIOIOC_RELEASE, (unsigned long) pPlayer->session); +#else + ioctl(pPlayer->devFd, AUDIOIOC_RELEASE, 0); +#endif + + /* Cleanup */ + + while (sem_wait(&pPlayer->sem) < 0) + ; + /* Close the files */ if (0 < pPlayer->fd) @@ -1252,6 +1259,7 @@ int nxplayer_setvolume(FAR struct nxplayer_s *pPlayer, uint16_t volume) DEBUGASSERT(errcode > 0); auderr("ERROR: AUDIOIOC_CONFIGURE ioctl failed: %d\n", errcode); + sem_post(&pPlayer->sem); return -errcode; } }
Add install of npm before deploying in travis.
@@ -77,6 +77,12 @@ after_script: -n "MetaCall ${TRAVIS_TAG} [${RELEASE_DATE}]" -b "${GIT_HISTORY}" -replace \ $TRAVIS_TAG $ARTIFACTS_PATH/packages/ +# Install NPM for deploy +before_deploy: + - sudo apt-get install curl + - curl -sL https://deb.nodesource.com/setup_12.x | sudo -E bash - + - sudo apt-get install nodejs + # Deploy artifacts to bintray and npm deploy: - provider: bintray @@ -87,7 +93,6 @@ deploy: on: master # TODO: Change to master or tags - provider: script script: - - cd $TRAVIS_BUILD_DIR/source/ports/node_port - - npm publish --access public + - NPM_API_KEY=${NPM_KEY} npm publish $TRAVIS_BUILD_DIR/source/ports/node_port --access public # TODO: --tag <tag> skip_cleanup: true on: master # TODO: Change to master or tags
Fix IV length caching in EVP encryption code The IV length cache value was being invalidated excessively, causing IV length caching to be ineffective. Related to
@@ -62,13 +62,20 @@ int EVP_CIPHER_CTX_reset(EVP_CIPHER_CTX *ctx) ENGINE_finish(ctx->engine); #endif memset(ctx, 0, sizeof(*ctx)); - ctx->iv_len = 0; + ctx->iv_len = -1; return 1; } EVP_CIPHER_CTX *EVP_CIPHER_CTX_new(void) { - return OPENSSL_zalloc(sizeof(EVP_CIPHER_CTX)); + EVP_CIPHER_CTX *ctx; + + ctx = OPENSSL_zalloc(sizeof(EVP_CIPHER_CTX)); + if (ctx == NULL) + return NULL; + + ctx->iv_len = -1; + return ctx; } void EVP_CIPHER_CTX_free(EVP_CIPHER_CTX *ctx) @@ -90,8 +97,6 @@ static int evp_cipher_init_internal(EVP_CIPHER_CTX *ctx, ENGINE *tmpimpl = NULL; #endif - ctx->iv_len = -1; - /* * enc == 1 means we are encrypting. * enc == 0 means we are decrypting. @@ -1267,13 +1272,17 @@ int EVP_CIPHER_CTX_set_params(EVP_CIPHER_CTX *ctx, const OSSL_PARAM params[]) r = ctx->cipher->set_ctx_params(ctx->algctx, params); if (r > 0) { p = OSSL_PARAM_locate_const(params, OSSL_CIPHER_PARAM_KEYLEN); - if (p != NULL && !OSSL_PARAM_get_int(p, &ctx->key_len)) + if (p != NULL && !OSSL_PARAM_get_int(p, &ctx->key_len)) { r = 0; + ctx->key_len = -1; + } } if (r > 0) { p = OSSL_PARAM_locate_const(params, OSSL_CIPHER_PARAM_IVLEN); - if (p != NULL && !OSSL_PARAM_get_int(p, &ctx->iv_len)) + if (p != NULL && !OSSL_PARAM_get_int(p, &ctx->iv_len)) { r = 0; + ctx->iv_len = -1; + } } } return r;
fixup! build CHANGE detect libyang version
@@ -200,7 +200,7 @@ find_package(YANG REQUIRED) target_link_libraries(sysrepo ${LIBYANG_LIBRARIES}) include_directories(${LIBYANG_INCLUDE_DIRS}) -find_path(LY_HEADER_PATH "libyang/libyang.h") +find_path(LY_HEADER_PATH "libyang/libyang.h" HINTS ${LIBYANG_INCLUDE_DIR}) file(READ "${LY_HEADER_PATH}/libyang/libyang.h" LY_HEADER) string(REGEX MATCH "#define LY_VERSION \"[0-9]+\\.[0-9]+\\.[0-9]+\"" LY_VERSION_MACRO "${LY_HEADER}") string(REGEX MATCH "[0-9]+\\.[0-9]+\\.[0-9]+" LY_VERSION "${LY_VERSION_MACRO}")
Add beta5 changelog
@@ -5,6 +5,12 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). +## [2.0.0-beta5] + +### Added + +- Add new Splash screen with animated template previews, easier access to documentation and credits easter egg (click the power light) + ## [2.0.0-beta4] ### Added
dm: virtio-net: apply new mevent API to avoid race issue Teardown callback is provided when mevent_add is called and it is used to free the virtio-net resources. Acked-by: Yin Fengwei
@@ -180,6 +180,7 @@ static int virtio_net_cfgwrite(void *vdev, int offset, int size, uint32_t value); static void virtio_net_neg_features(void *vdev, uint64_t negotiated_features); static void virtio_net_set_status(void *vdev, uint64_t status); +static void virtio_net_teardown(void *param); static struct vhost_net *vhost_net_init(struct virtio_base *base, int vhostfd, int tapfd, int vq_idx); static int vhost_net_deinit(struct vhost_net *vhost_net); @@ -707,7 +708,8 @@ virtio_net_tap_setup(struct virtio_net *net, char *devname) if (vhost_fd < 0) { net->mevp = mevent_add(net->tapfd, EVF_READ, - virtio_net_rx_callback, net, NULL, NULL); + virtio_net_rx_callback, net, + virtio_net_teardown, net); if (net->mevp == NULL) { WPRINTF(("Could not register event\n")); close(net->tapfd); @@ -934,10 +936,8 @@ virtio_net_set_status(void *vdev, uint64_t status) if (!net->vhost_net->vhost_started && (status & VIRTIO_CR_STATUS_DRIVER_OK)) { - if (net->mevp) { - mevent_delete(net->mevp); - net->mevp = NULL; - } + if (net->mevp) + mevent_disable(net->mevp); rc = vhost_net_start(net->vhost_net); if (rc < 0) { @@ -952,6 +952,24 @@ virtio_net_set_status(void *vdev, uint64_t status) } } +static void +virtio_net_teardown(void *param) +{ + struct virtio_net *net; + + net = (struct virtio_net *)param; + if (!net) + return; + + if (net->tapfd >= 0) { + close(net->tapfd); + net->tapfd = -1; + } else + fprintf(stderr, "net->tapfd is -1!\n"); + + free(net); +} + static void virtio_net_deinit(struct vmctx *ctx, struct pci_vdev *dev, char *opts) { @@ -969,16 +987,10 @@ virtio_net_deinit(struct vmctx *ctx, struct pci_vdev *dev, char *opts) net->vhost_net = NULL; } - if (net->tapfd >= 0) { - close(net->tapfd); - net->tapfd = -1; - } else - fprintf(stderr, "net->tapfd is -1!\n"); - if (net->mevp != NULL) mevent_delete(net->mevp); - - free(net); + else + virtio_net_teardown(net); DPRINTF(("%s: done\n", __func__)); } else
travis-ci: TEMPORARY remove lz4 tests on MacOS (broken lz4 package)
@@ -22,7 +22,7 @@ script: - | if [ $TRAVIS_OS_NAME = osx ]; then brew update > /dev/null - brew install openssl oniguruma pcre pcre2 lz4 snappy + brew install openssl oniguruma pcre pcre2 snappy else sudo apt-get install libonig-dev libpcre3-dev libssl-dev zlib1g-dev liblz4-dev libsnappy-dev fi
bootloader: add note about secure download mode for ESP32 target Closes Closes
@@ -892,6 +892,8 @@ menu "Security features" It is also possible to enable secure download mode at runtime by calling esp_efuse_enable_rom_secure_download_mode() + Note: Secure Download mode is not available for ESP32 (includes revisions till ECO3). + config SECURE_INSECURE_ALLOW_DL_MODE bool "UART ROM download mode (Enabled (not recommended))" help
Move NDEBUG from add_cxxflags to add_defines
@@ -8,7 +8,8 @@ add_cxflags("/bigobj") if is_mode("release") then add_ldflags("/LTCG", "/OPT:REF") - add_cxflags("/Ot", "/GL", "/Ob2", "/Oi", "/GS-", "/DNDEBUG") + add_cxflags("/Ot", "/GL", "/Ob2", "/Oi", "/GS-") + add_defines("NDEBUG") set_optimize("fastest") end
SOVERSION bump to version 4.2.6
@@ -39,7 +39,7 @@ set(SYSREPO_VERSION ${SYSREPO_MAJOR_VERSION}.${SYSREPO_MINOR_VERSION}.${SYSREPO_ # with backward compatible change and micro version is connected with any internal change of the library. set(SYSREPO_MAJOR_SOVERSION 4) set(SYSREPO_MINOR_SOVERSION 2) -set(SYSREPO_MICRO_SOVERSION 5) +set(SYSREPO_MICRO_SOVERSION 6) set(SYSREPO_SOVERSION_FULL ${SYSREPO_MAJOR_SOVERSION}.${SYSREPO_MINOR_SOVERSION}.${SYSREPO_MICRO_SOVERSION}) set(SYSREPO_SOVERSION ${SYSREPO_MAJOR_SOVERSION})
modified led param
@@ -122,6 +122,7 @@ float joint_states_eff[2] = {0.0, 0.0}; #define LED_RXD 1 #define LED_LOW_BATTERY 2 #define LED_ROS_CONNECT 3 +#define LED_WORKING_CHECK 13 /******************************************************************************* * Declaration for Battery @@ -225,7 +226,7 @@ void setup() prev_update_time = millis(); - pinMode(13, OUTPUT); + pinMode(LED_WORKING_CHECK, OUTPUT); SerialBT2.begin(57600); @@ -784,7 +785,7 @@ void showLedStatus(void) if ((millis()-t_time) >= 500) { t_time = millis(); - digitalWrite(13, !digitalRead(13)); + digitalWrite(LED_WORKING_CHECK, !digitalRead(LED_WORKING_CHECK)); } if (getPowerInVoltage() < 11.1)
Avoid adding envs repeatedly
@@ -90,7 +90,11 @@ function _on_run_target(target) end -- recursively target add env -function _add_target_pkgenvs(target, oldenvs) +function _add_target_pkgenvs(target, oldenvs, targets_added) + if targets_added[target:name()] then + return + end + targets_added[target:name()] = true for name, values in pairs(target:pkgenvs()) do if not oldenvs[name] then oldenvs[name] = os.getenv(name) @@ -98,7 +102,7 @@ function _add_target_pkgenvs(target, oldenvs) os.addenv(name, unpack(values)) end for _, dep in ipairs(target:orderdeps()) do - _add_target_pkgenvs(dep, oldenvs) + _add_target_pkgenvs(dep, oldenvs, targets_added) end end @@ -107,7 +111,7 @@ function _run(target) -- enter the environments of the target packages local oldenvs = {} - _add_target_pkgenvs(target, oldenvs) + _add_target_pkgenvs(target, oldenvs, {}) -- the target scripts local scripts =
[mod_extforward] simplify code: use light_isxdigit
@@ -425,19 +425,20 @@ static array *extract_forward_array(buffer *pbuffer) { array *result = array_init(); if (!buffer_string_is_empty(pbuffer)) { - char *base, *curr; + const char *base, *curr; /* state variable, 0 means not in string, 1 means in string */ int in_str = 0; for (base = pbuffer->ptr, curr = pbuffer->ptr; *curr; curr++) { + int hex_or_colon = (light_isxdigit(*curr) || *curr == ':'); if (in_str) { - if ((*curr > '9' || *curr < '0') && *curr != '.' && *curr != ':' && (*curr < 'a' || *curr > 'f') && (*curr < 'A' || *curr > 'F')) { + if (!hex_or_colon && *curr != '.') { /* found an separator , insert value into result array */ array_insert_value(result, base, curr - base); /* change state to not in string */ in_str = 0; } } else { - if ((*curr >= '0' && *curr <= '9') || *curr == ':' || (*curr >= 'a' && *curr <= 'f') || (*curr >= 'A' && *curr <= 'F')) { + if (hex_or_colon) { /* found leading char of an IP address, move base pointer and change state */ base = curr; in_str = 1;
pbio/serial: drop linux includes These are not used by pbio, only by pbdrv.
// Copyright (c) 2019 Laurens Valk // Copyright (c) 2019 LEGO System A/S -#include <fcntl.h> -#include <errno.h> -#include <sys/ioctl.h> -#include <termios.h> -#include <unistd.h> - #include <pbio/port.h> #include <pbdrv/config.h> #include <pbio/error.h>
travis: do gcov builds on fedora30 We've fixed up gcov for newer GCC.
@@ -17,11 +17,9 @@ make -j${MAKE_J} all make -j${MAKE_J} check (make clean; cd external/gard && CROSS= make -j${MAKE_J}) (cd external/pflash; make -j${MAKE_J}) -# GCOV build disabled for GCC 8.2 -# https://github.com/open-power/skiboot/issues/206 -#make clean -#SKIBOOT_GCOV=1 make -j${MAKE_J} -#SKIBOOT_GCOV=1 make -j${MAKE_J} check +make clean +SKIBOOT_GCOV=1 make -j${MAKE_J} +SKIBOOT_GCOV=1 make -j${MAKE_J} check make clean rm -rf builddir
Add omp_cpu option to run_baelstream.sh, not run by default - yet
@@ -42,6 +42,7 @@ setaompgpu RUN_OPTIONS=${RUN_OPTIONS:-"omp_default openmp hip"} omp_flags="-O3 -fopenmp -fopenmp-targets=amdgcn-amd-amdhsa -Xopenmp-target=amdgcn-amd-amdhsa -march=$AOMP_GPU -DOMP -DOMP_TARGET_GPU" +omp_cpu_flags="-O3 -fopenmp -DOMP" hip_flags="-O3 --offload-arch=$AOMP_GPU -DHIP -x hip" omp_src="main.cpp OMPStream.cpp" hip_src="main.cpp HIPStream.cpp" @@ -97,6 +98,14 @@ for option in $RUN_OPTIONS; do if [ $? -ne 1 ]; then ./$EXEC 2>&1 | tee -a results.txt fi + elif [ "$option" == "omp_cpu" ]; then + EXEC=omp-stream-cpu + rm -f $EXEC + echo $AOMP/bin/clang++ $omp_cpu_flags $omp_src $std -o $EXEC + $AOMP/bin/clang++ $omp_cpu_flags $omp_src $std -o $EXEC + if [ $? -ne 1 ]; then + ./$EXEC 2>&1 | tee -a results.txt + fi elif [ "$option" == "hip" ]; then EXEC=hip-stream rm -f $EXEC
BugID: update jsengine README
NAME := jsengine $(NAME)_MBINS_TYPE := kernel -$(NAME)_VERSION := 1.0.1 +$(NAME)_VERSION := 1.0.1.1 $(NAME)_SUMMARY := an engine for javascript application development $(NAME)_COMPONENTS-y += mbedtls libiot_mqtt ota cjson cli spiffs netmgr
usdt: Use uprobe refcnt if available in usdt C++ API
#include <cstdio> #include <cstring> #include <exception> +#include <fcntl.h> #include <iostream> #include <memory> #include <sstream> +#include <sys/stat.h> +#include <sys/types.h> #include <utility> #include <vector> #include "BPF.h" +namespace { +/* + * Kernels ~4.20 and later support specifying the ref_ctr_offset as an argument + * to attaching a uprobe, which negates the need to seek to this memory offset + * in userspace to manage semaphores, as the kernel will do it for us. This + * helper function checks if this support is available by reading the uprobe + * format for this value, added in a6ca88b241d5e929e6e60b12ad8cd288f0ffa +*/ +bool uprobe_ref_ctr_supported() { + const char *ref_ctr_pmu_path = + "/sys/bus/event_source/devices/uprobe/format/ref_ctr_offset"; + const char *ref_ctr_pmu_expected = "config:32-63\0"; + char ref_ctr_pmu_fmt[64]; // in Linux source this buffer is compared vs + // PAGE_SIZE, but 64 is probably ample + int fd = open(ref_ctr_pmu_path, O_RDONLY); + if (fd < 0) + return false; + + int ret = read(fd, ref_ctr_pmu_fmt, sizeof(ref_ctr_pmu_fmt)); + close(fd); + if (ret < 0) { + return false; + } + if (strncmp(ref_ctr_pmu_expected, ref_ctr_pmu_fmt, + strlen(ref_ctr_pmu_expected)) == 0) { + return true; + } + return false; +} +} // namespace + namespace ebpf { std::string uint_to_hex(uint64_t value) { @@ -268,7 +302,7 @@ StatusTuple BPF::attach_uprobe(const std::string& binary_path, StatusTuple BPF::attach_usdt_without_validation(const USDT& u, pid_t pid) { auto& probe = *static_cast<::USDT::Probe*>(u.probe_.get()); - if (!probe.enable(u.probe_func_)) + if (!uprobe_ref_ctr_supported() && !probe.enable(u.probe_func_)) return StatusTuple(-1, "Unable to enable USDT %s" + u.print_name()); bool failed = false; @@ -276,7 +310,8 @@ StatusTuple BPF::attach_usdt_without_validation(const USDT& u, pid_t pid) { int cnt = 0; for (const auto& loc : probe.locations_) { auto res = attach_uprobe(loc.bin_path_, std::string(), u.probe_func_, - loc.address_, BPF_PROBE_ENTRY, pid); + loc.address_, BPF_PROBE_ENTRY, pid, 0, + probe.semaphore_offset()); if (!res.ok()) { failed = true; err_msg += "USDT " + u.print_name() + " at " + loc.bin_path_ + @@ -507,7 +542,7 @@ StatusTuple BPF::detach_usdt_without_validation(const USDT& u, pid_t pid) { } } - if (!probe.disable()) { + if (!uprobe_ref_ctr_supported() && !probe.disable()) { failed = true; err_msg += "Unable to disable USDT " + u.print_name(); }
pybricks.pupdevices.PFMotor: use hue enum This takes less space than reading the hue from the color constants.
@@ -47,10 +47,10 @@ STATIC mp_obj_t pupdevices_PFMotor_make_new(const mp_obj_type_t *type, size_t n_ // Get port color indicator (blue or red) uint16_t hue = pb_type_Color_get_hsv(color_in)->h; - if (hue != pb_Color_BLUE_obj.hsv.h && hue != pb_Color_RED_obj.hsv.h) { + if (hue != PBIO_COLOR_HUE_BLUE && hue != PBIO_COLOR_HUE_RED) { pb_assert(PBIO_ERROR_INVALID_ARG); } - bool use_blue_port = hue == pb_Color_BLUE_obj.hsv.h; + bool use_blue_port = hue == PBIO_COLOR_HUE_BLUE; // Get positive direction. pbio_direction_t positive_direction = pb_type_enum_get_value(positive_direction_in, &pb_enum_type_Direction);
[CI] skip profiling in CI
@@ -6,7 +6,7 @@ var Urbit = runner.Urbit; var ERROR = runner.ERROR; var actions = runner.actions -var args = ['-cgPSF', 'zod', '-B', 'brass.pill', 'zod']; +var args = ['-cgSF', 'zod', '-B', 'brass.pill', 'zod']; var urbit = new Urbit(args); // vere hangs (always?) with run in travis-ci with -P
process: fix error in output_warnings when having multiple warnings in tests
@@ -406,11 +406,11 @@ int output_warnings (Key * warningKey) if (!metaWarnings) return 1; /* There are no current warnings */ int nrWarnings = atoi (keyString (metaWarnings)); - char buffer[] = "warnings/#00\0description"; printf ("There are %d warnings\n", nrWarnings + 1); for (int i = 0; i <= nrWarnings; ++i) { + char buffer[] = "warnings/#00\0description"; buffer[10] = i / 10 % 10 + '0'; buffer[11] = i % 10 + '0'; printf ("buffer is: %s\n", buffer);
Init fpga-shells submod in CI
@@ -19,6 +19,7 @@ trap clean EXIT cd $LOCAL_CHIPYARD_DIR ./scripts/init-submodules-no-riscv-tools.sh +./scripts/init-fpga.sh # set stricthostkeychecking to no (must happen before rsync) run "echo \"Ping $SERVER\""
tests/motors: Plot loop time
@@ -69,7 +69,12 @@ def gradient(data, time, smooth=8): def plot_servo_data(time, data, build_dir, subtitle=None): """Plots data for a servo motor.""" - # First column not currently used + # Get loop time. + wall_time = data[:, 1] + wall_time_shifted = numpy.append(2 * wall_time[0] - wall_time[1], wall_time[0:-1]) + loop_time = wall_time - wall_time_shifted + + # Read state columns. count = data[:, 2] rate = data[:, 3] voltage = data[:, 5] @@ -80,10 +85,10 @@ def plot_servo_data(time, data, build_dir, subtitle=None): title = "servo" if subtitle is None else "servo_" + subtitle - figure, axes = matplotlib.pyplot.subplots(nrows=4, ncols=1, figsize=(15, 12)) + figure, axes = matplotlib.pyplot.subplots(nrows=5, ncols=1, figsize=(15, 15)) figure.suptitle(title, fontsize=20) - position_axis, speed_axis, torque_axis, duty_axis = axes + position_axis, speed_axis, torque_axis, duty_axis, time_axis = axes position_axis.plot(time, count, drawstyle="steps-post", label="Reported count") position_axis.plot(time, count_est, drawstyle="steps-post", label="Observer") @@ -105,6 +110,10 @@ def plot_servo_data(time, data, build_dir, subtitle=None): duty_axis.set_ylim([-10000, 10000]) duty_axis.set_xlabel("time (s)") + time_axis.plot(time, loop_time, label="Loop time", drawstyle="steps-post") + time_axis.set_ylabel("Time (us)") + time_axis.set_xlabel("time (s)") + for axis in axes: axis.grid(True) axis.set_xlim([time[0], time[-1]])
Use path variables: platform nrf52dk
@@ -3,7 +3,7 @@ ifndef CONTIKI endif ### Include the board-specific makefile -PLATFORM_ROOT_DIR = $(ARCH_PATH)/platform/$(TARGET) +PLATFORM_ROOT_DIR = $(CONTIKI_NG_RELOC_PLATFORM_DIR)/$(TARGET) CONTIKI_TARGET_DIRS += . dev config CONTIKI_SOURCEFILES += platform.c leds-arch.c nrf52dk-sensors.c button-sensor.c temperature-sensor.c @@ -21,5 +21,5 @@ endif SMALL ?= 0 ### Define the CPU directory and pull in the correct CPU makefile. -CONTIKI_CPU=$(ARCH_PATH)/cpu/nrf52832 +CONTIKI_CPU = $(CONTIKI_NG_RELOC_CPU_DIR)/nrf52832 include $(CONTIKI_CPU)/Makefile.nrf52832
toml: Basic array writing done
@@ -39,7 +39,6 @@ static char * getRelativeKeyName (const Key * parent, const Key * key); static KeyType getKeyType (Key * key); static const Key * findMetaKey (Key * key, const char * metakeyName); - int tomlWrite (KeySet * keys, Key * rootKey) { Writer * w = createWriter (rootKey, keys); @@ -100,21 +99,25 @@ static int writeKeys (Writer * writer) Key * key = ksNext (writer->keys); while (result == 0 && key != NULL) { - if (keyCmp (key, writer->rootKey) != 0) + if (keyCmp (key, writer->rootKey) == 0) { + key = ksNext (writer->keys); + continue; + } + printf("LOOP KEY = %s\n", keyName (key)); switch (getKeyType (key)) { case KEY_TYPE_ASSIGNMENT: result |= writeAssignment (writer->rootKey, key, writer); + result |= writeNewline (writer); break; case KEY_TYPE_SIMPLE_TABLE: break; case KEY_TYPE_TABLE_ARRAY: break; } - } else { - key = ksNext (writer->keys); - } + key = ksCurrent (writer->keys); + printf("AFTER KEY = %s, type = %d, result = %d\n", keyName (key), getKeyType (key), result); } } @@ -123,7 +126,7 @@ static int writeAssignment (Key * parent, Key * key, Writer * writer) int result = 0; result |= writeRelativeKeyName (parent, key, writer); - result |= fputs(" = ", writer->f); + result |= fputs(" = ", writer->f) == EOF; if (isArray (key)) { result |= writeArrayBody (parent, key, writer); @@ -151,22 +154,24 @@ static int writeSimpleTableArray (Key * parent, Key * key, Writer * writer) static int writeArrayBody (Key * parent, Key * key, Writer * writer) { int result = 0; - result |= fputc ('[', writer->f); + result |= fputc ('[', writer->f) == EOF; result |= writeArrayElements (key, writer); - result |= fputc (']', writer->f); + result |= fputc (']', writer->f) == EOF; return result; } static int writeArrayElements (Key * parent, Writer * writer) { + int result = 0; Key * key = ksNext (writer->keys); while (keyIsDirectlyBelow (parent, key) == 1) { printf("Write array element\n"); - writeScalar (key, writer); - fputc (',', writer->f); + result |= writeScalar (key, writer); + result |= fputc (',', writer->f) == EOF; key = ksNext (writer->keys); } + return result; } static int writeRelativeKeyName (Key * parent, Key * key, Writer * writer) @@ -175,7 +180,7 @@ static int writeRelativeKeyName (Key * parent, Key * key, Writer * writer) char * relativeName = getRelativeKeyName (parent, key); if (relativeName != NULL) { - result |= fputs (relativeName, writer->f); + result |= fputs (relativeName, writer->f) == EOF; printf("Write relative name: %s\n", relativeName); elektraFree (relativeName); }
Fix: strsadd() will return fail if string length < 2
@@ -288,14 +288,14 @@ int strsadd( char ***strlist, const char *str ) if( str[i] != ' ' ) { continue; } - if( i - 1 > head ) { + if( i > head ) { strncpy( buff, &str[head], i - head ); buff[i - head] = 0; count += strsaddone( strlist, buff ); } head = i + 1; } - if( i - 1 > head ) { + if( i > head ) { strncpy( buff, &str[head], i - head ); buff[i - head] = 0; count += strsaddone( strlist, buff );
error: improved message to add filepath for insufficient permissions
if (errno == EACCES) \ ELEKTRA_SET_RESOURCE_ERRORF ( \ parentKey, \ - "Insufficient permissions to open configuration file for reading. Reason: %s. You might want " \ + "Insufficient permissions to open configuration file %s for reading. Reason: %s. You might want " \ "to retry as root or change access using chmod.", \ - strerror (errno)); \ + keyString (parentKey), strerror (errno)); \ else \ - ELEKTRA_SET_RESOURCE_ERRORF (parentKey, "Could not open configuration file for reading. Reason: %s", \ - strerror (errno)); \ + ELEKTRA_SET_RESOURCE_ERRORF (parentKey, "Could not open configuration file %s for reading. Reason: %s", \ + keyString (parentKey), strerror (errno)); \ } while (0) #define ELEKTRA_SET_ERROR_SET(parentKey) \ if (errno == EACCES) \ ELEKTRA_SET_RESOURCE_ERRORF ( \ parentKey, \ - "Insufficient permissions to open configuration file for writing. You might want to retry as " \ + "Insufficient permissions to open configuration file %s for writing. You might want to retry as " \ "root. Errno: %s", \ - strerror (errno)); \ + keyString (parentKey), strerror (errno)); \ else \ - ELEKTRA_SET_RESOURCE_ERRORF (parentKey, ":Could not open file for writing %s", strerror (errno)); \ + ELEKTRA_SET_RESOURCE_ERRORF (parentKey, ":Could not open file %s for writing %s", keyString (parentKey), \ + strerror (errno)); \ } while (0) #define ELEKTRA_MALLOC_ERROR(key, size) ELEKTRA_SET_RESOURCE_ERRORF (key, "Unable to allocate %zu bytes.", size);
Added missing 'extern' qualifier to tsch_timing_us
@@ -158,7 +158,7 @@ extern uint8_t tsch_current_channel; extern uint8_t tsch_hopping_sequence[TSCH_HOPPING_SEQUENCE_MAX_LEN]; extern struct tsch_asn_divisor_t tsch_hopping_sequence_length; /* TSCH timeslot timing (in micro-second) */ -uint16_t tsch_timing_us[tsch_ts_elements_count]; +extern uint16_t tsch_timing_us[tsch_ts_elements_count]; /* TSCH timeslot timing (in rtimer ticks) */ extern rtimer_clock_t tsch_timing[tsch_ts_elements_count]; /* Statistics on the current session */
ieee802154: Add linkage target library
@@ -7,6 +7,7 @@ idf_component_register( if(CONFIG_IEEE802154_ENABLED) idf_component_get_property(esp_phy_lib esp_phy COMPONENT_LIB) + idf_component_get_property(esp_system_lib esp_system COMPONENT_LIB) if($ENV{IEEE802154_LIB_FROM_INTERNAL_SRC}) idf_component_get_property(ieee802154_lib ieee802154_driver COMPONENT_LIB) target_link_libraries(${COMPONENT_LIB} INTERFACE $<TARGET_FILE:${ieee802154_lib}> @@ -25,6 +26,6 @@ if(CONFIG_IEEE802154_ENABLED) target_link_directories(${COMPONENT_LIB} INTERFACE "${CMAKE_CURRENT_SOURCE_DIR}/lib/${idf_target}") endif() target_link_libraries(${COMPONENT_LIB} INTERFACE $<TARGET_FILE:${esp_phy_lib}> lib802154.a libphy.a libbtbb.a - $<TARGET_FILE:${esp_phy_lib}>) + $<TARGET_FILE:${esp_phy_lib}> $<TARGET_FILE:${esp_system_lib}>) endif() endif()
hfuzz-cc: move var declaration to for loop, and try to use clang-(++)-7.0 first
@@ -120,6 +120,7 @@ static int execCC(int argc, char** argv) } else { if (isCXX) { execvp("clang++-devel", argv); + execvp("clang++-7.0", argv); execvp("clang++-6.0", argv); execvp("clang++-5.0", argv); execvp("clang++-4.0", argv); @@ -127,6 +128,7 @@ static int execCC(int argc, char** argv) execvp("clang", argv); } else { execvp("clang-devel", argv); + execvp("clang-7.0", argv); execvp("clang-6.0", argv); execvp("clang-5.0", argv); execvp("clang-4.0", argv); @@ -283,8 +285,7 @@ static int ldMode(int argc, char** argv) commonOpts(&j, args); - int i; - for (i = 1; i < argc; i++) { + for (int i = 1; i < argc; i++) { args[j++] = argv[i]; }
Add validation for texture creation;
@@ -99,6 +99,9 @@ Texture* lovrTextureCreate(TextureType type, TextureData** slices, int sliceCoun lovrTextureSetFilter(texture, lovrGraphicsGetDefaultFilter()); lovrTextureSetWrap(texture, (TextureWrap) { .s = wrap, .t = wrap, .r = wrap }); + lovrAssert(type != TEXTURE_CUBE || sliceCount == 6, "6 images are required for a cube texture\n"); + lovrAssert(type != TEXTURE_2D || sliceCount == 1, "2D textures can only contain a single image"); + if (slices) { for (int i = 0; i < sliceCount; i++) { lovrTextureReplacePixels(texture, slices[i], i); @@ -128,9 +131,10 @@ void lovrTextureReplacePixels(Texture* texture, TextureData* textureData, int sl texture->slices[slice] = textureData; if (!texture->allocated) { + lovrAssert(texture->type != TEXTURE_CUBE || textureData->width == textureData->height, "Cubemap images must be square"); lovrTextureAllocate(texture, textureData); } else { - // validation + lovrAssert(textureData->width == texture->width && textureData->height == texture->height, "All texture slices must have the same dimensions"); } if (!textureData->blob.data) {
Fix to update DIMM location correctly when PMTT table is missing.
@@ -307,21 +307,21 @@ GeneratePcdConfInput( pIdentInfo->DimmLocation.AsUint64 = 0; // Update the DIMM location field pPmttModuleInfo = GetDimmModuleByPidFromPmtt(pDimm->pRegionsGoal[Index]->pDimms[Index2]->DimmID, gNvmDimmData->PMEMDev.pPmttHead); - if (pPmttModuleInfo == NULL) { - NVDIMM_ERR("DIMM Module with pid: %d not found in PMTT", pDimm->DimmID); - pIdentInfo->DimmLocation.Split.SocketId = pDimm->SocketId; - pIdentInfo->DimmLocation.Split.DieId = MAX_DIEID_SINGLE_DIE_SOCKET; - pIdentInfo->DimmLocation.Split.MemControllerId = pDimm->ImcId; - pIdentInfo->DimmLocation.Split.ChannelId = pDimm->ChannelId; - pIdentInfo->DimmLocation.Split.SlotId = pDimm->ChannelPos; - } - else { + if (pPmttModuleInfo != NULL) { pIdentInfo->DimmLocation.Split.SocketId = pPmttModuleInfo->SocketId; pIdentInfo->DimmLocation.Split.DieId = pPmttModuleInfo->DieId; pIdentInfo->DimmLocation.Split.MemControllerId = pPmttModuleInfo->MemControllerId; pIdentInfo->DimmLocation.Split.ChannelId = pPmttModuleInfo->ChannelId; pIdentInfo->DimmLocation.Split.SlotId = pPmttModuleInfo->SlotId; } + else { + NVDIMM_ERR("DIMM Module with pid: %d not found in PMTT", pDimm->pRegionsGoal[Index]->pDimms[Index2]->DimmID); + pIdentInfo->DimmLocation.Split.SocketId = pDimm->pRegionsGoal[Index]->pDimms[Index2]->SocketId; + pIdentInfo->DimmLocation.Split.DieId = MAX_DIEID_SINGLE_DIE_SOCKET; + pIdentInfo->DimmLocation.Split.MemControllerId = pDimm->pRegionsGoal[Index]->pDimms[Index2]->ImcId; + pIdentInfo->DimmLocation.Split.ChannelId = pDimm->pRegionsGoal[Index]->pDimms[Index2]->ChannelId; + pIdentInfo->DimmLocation.Split.SlotId = pDimm->pRegionsGoal[Index]->pDimms[Index2]->ChannelPos; + } pCurrentOffset = (UINT8 *)pCurrentOffset + sizeof(NVDIMM_IDENTIFICATION_INFORMATION3); }
Invert gate on printf attribute Inverted the logic without thinking.
* This module provides debugging functions. */ #if defined(__GNUC__) -#define MBEDTLS_PRINTF_ATTRIBUTE(string_index, first_to_check) -#else #define MBEDTLS_PRINTF_ATTRIBUTE(string_index, first_to_check) \ __attribute__((format (printf, string_index, first_to_check))) +#else +#define MBEDTLS_PRINTF_ATTRIBUTE(string_index, first_to_check) #endif #ifdef __cplusplus
Add mcuboot to travis downloads Also clone only depth=1 since we don't need history.
@@ -120,7 +120,8 @@ before_script: - cp -R $HOME/ci/mynewt-nimble-targets targets - $HOME/ci/prepare_test.sh $VM_AMOUNT - mkdir -p repos && pushd repos/ - - git clone https://github.com/apache/mynewt-core apache-mynewt-core + - git clone --depth=1 https://github.com/apache/mynewt-core apache-mynewt-core + - git clone --depth=1 https://github.com/JuulLabs-OSS/mcuboot mcuboot - popd script:
zephyr/shim/src/pwm_hc.c: Format with clang-format BRANCH=none TEST=none
LOG_MODULE_REGISTER(pwm_shim, LOG_LEVEL_ERR); -#define PWM_RAW_TO_PERCENT(v) \ - DIV_ROUND_NEAREST((uint32_t)(v) * 100, UINT16_MAX) +#define PWM_RAW_TO_PERCENT(v) DIV_ROUND_NEAREST((uint32_t)(v)*100, UINT16_MAX) #define PWM_PERCENT_TO_RAW(v) ((uint32_t)(v)*UINT16_MAX / 100) #define HAS_PWM_GENERIC_CHANNEL(compat) \ @@ -28,8 +27,7 @@ LOG_MODULE_REGISTER(pwm_shim, LOG_LEVEL_ERR); generic_pwm_channel) #define PWM_GENERIC_CHANNEL_ID(compat) \ - DT_PROP(DT_COMPAT_GET_ANY_STATUS_OKAY(compat), \ - generic_pwm_channel) + DT_PROP(DT_COMPAT_GET_ANY_STATUS_OKAY(compat), generic_pwm_channel) #ifdef CONFIG_PWM_KBLIGHT static bool pwm_is_kblight(int type, int index) @@ -63,9 +61,8 @@ static bool pwm_is_displight(int type, int index) } #endif /* CONFIG_PLATFORM_EC_PWM_DISPLIGHT */ - -static enum ec_status host_command_pwm_set_duty( - struct host_cmd_handler_args *args) +static enum ec_status +host_command_pwm_set_duty(struct host_cmd_handler_args *args) { __maybe_unused const struct ec_params_pwm_set_duty *p = args->params; @@ -85,12 +82,11 @@ static enum ec_status host_command_pwm_set_duty( return EC_RES_INVALID_PARAM; } -DECLARE_HOST_COMMAND(EC_CMD_PWM_SET_DUTY, - host_command_pwm_set_duty, +DECLARE_HOST_COMMAND(EC_CMD_PWM_SET_DUTY, host_command_pwm_set_duty, EC_VER_MASK(0)); -static enum ec_status host_command_pwm_get_duty( - struct host_cmd_handler_args *args) +static enum ec_status +host_command_pwm_get_duty(struct host_cmd_handler_args *args) { __maybe_unused const struct ec_params_pwm_get_duty *p = args->params; __maybe_unused struct ec_response_pwm_get_duty *r = args->response; @@ -112,6 +108,5 @@ static enum ec_status host_command_pwm_get_duty( return EC_RES_INVALID_PARAM; } -DECLARE_HOST_COMMAND(EC_CMD_PWM_GET_DUTY, - host_command_pwm_get_duty, +DECLARE_HOST_COMMAND(EC_CMD_PWM_GET_DUTY, host_command_pwm_get_duty, EC_VER_MASK(0));
replace libretro-common 32
NP2_PATH := $(CORE_DIR) -INCFLAGS := -I$(NP2_PATH) \ +INCFLAGS += -I$(NP2_PATH) \ -I$(NP2_PATH)/cbus \ -I$(NP2_PATH)/common \ -I$(NP2_PATH)/diskimage \ @@ -25,7 +25,7 @@ INCFLAGS := -I$(NP2_PATH) \ -I$(NP2_PATH)/sdl2 \ -I$(NP2_PATH)/zlib -SOURCES_C := $(NP2_PATH)/calendar.c \ +SOURCES_C += $(NP2_PATH)/calendar.c \ $(NP2_PATH)/debugsub.c \ $(NP2_PATH)/keystat.c \ $(NP2_PATH)/nevent.c \ @@ -59,7 +59,7 @@ SOURCES_C := $(NP2_PATH)/calendar.c \ $(wildcard $(NP2_PATH)/wab/*.c) \ $(wildcard $(NP2_PATH)/zlib/*.c) -SOURCES_CXX := $(wildcard $(NP2_PATH)/sound/fmgen/*.cpp) +SOURCES_CXX += $(wildcard $(NP2_PATH)/sound/fmgen/*.cpp) ifeq ($(SUPPORT_NET), 1) INCFLAGS += -I$(NP2_PATH)/network
dispatcher: use separate read/close strategy for UDP connections Prepare for getting source IP for UDP connections. Use recvfrom(2) such that we can extract the sender address. The code doesn't use this information yet.
@@ -134,6 +134,30 @@ sockclose(void *strm) return ret; } +/* udp variant (in order to receive info about sender) */ +struct udp_strm { + int sock; + struct sockaddr saddr; + char *srcaddr[24]; +}; + +static inline ssize_t +udpsockread(void *strm, void *buf, size_t sze) +{ + struct udp_strm *s = (struct udp_strm *)strm; + socklen_t slen = sizeof(s->saddr); + return recvfrom(s->sock, buf, sze, 0, &s->saddr, &slen); +} + +static inline int +udpsockclose(void *strm) +{ + struct udp_strm *s = (struct udp_strm *)strm; + int ret = close(s->sock); + free(strm); + return ret; +} + #ifdef HAVE_GZIP /* gzip wrapped socket */ static inline ssize_t @@ -507,6 +531,7 @@ dispatch_addconnection(int sock, listener *lsnr) } connections[c].sock = sock; if (lsnr == NULL || lsnr->transport == W_PLAIN) { + if (lsnr->ctype != CON_UDP) { int *strm = malloc(sizeof(connections[c].sock)); if (strm == NULL) { logerr("cannot add new connection: " @@ -518,6 +543,19 @@ dispatch_addconnection(int sock, listener *lsnr) connections[c].strm = strm; connections[c].strmread = &sockread; connections[c].strmclose = &sockclose; + } else { + struct udp_strm *strm = malloc(sizeof(struct udp_strm)); + if (strm == NULL) { + logerr("cannot add new connection: " + "out of memory allocating udp stream\n"); + __sync_bool_compare_and_swap(&(connections[c].takenby), -2, -1); + return -1; + } + strm->sock = sock; + connections[c].strm = strm; + connections[c].strmread = &udpsockread; + connections[c].strmclose = &udpsockclose; + } } #ifdef HAVE_GZIP else if (lsnr->transport == W_GZIP) {
update tm1637 update tm1637 in the advance page
@@ -1321,24 +1321,26 @@ function init() { <block type="display_TM1637_init" > <value name="PIN1"> <shadow type="pins_digital"> - <field name="PIN">3</field> + <field name="PIN">5</field> </shadow> </value> <value name="PIN2"> <shadow type="pins_digital"> - <field name="PIN">2</field> + <field name="PIN">4</field> </shadow> </value> </block> <block type="display_TM1637_Brightness" > - <value name="bit"> + <value name="Brightness"> + <shadow type="math_number"> + <field name="NUM">20</field> + </shadow> </value> </block> - - <block type="display_TM1637_displayString"> +<block type="display_TM1637_displyPrint" > <value name="VALUE"> <shadow type="text"> - <field name="TEXT">012345</field> + <field name="TEXT">2345</field> </shadow> </value> <value name="Speed"> @@ -1359,9 +1361,6 @@ function init() { </shadow> </value> </block> - <!--<block type="display_TM1637_Stopwatch"> - - </block>--> <block type="display_Matrix_Init"> <value name="PIN1"> <shadow type="pins_digital">
updated text and disabled old search on main page
@@ -34,17 +34,6 @@ module.exports = function ($rootScope, $scope, Logger, $state, $anchorScroll, we // // } - this.goSearch = function () { - - Logger.log('Go to search'); - $state.go('main.entries.search'); - - }; - - this.goMySnippets = function () { - $rootScope.entriesSearchString = $rootScope.currentUser.username; - vm.goSearch(); - }; this.scrollToTop = function () { $anchorScroll();
sysdeps/managarm: Update .proto locations
@@ -4,12 +4,18 @@ pb2frigg = find_program('pb2frigg') proto_gen = generator(protoc, arguments: [ '--plugin=protoc-gen-frigg=' + pb2frigg.path(), '--frigg_out=@BUILD_DIR@', - '--proto_path=@CURRENT_SOURCE_DIR@/../../subprojects/managarm/bragi/proto', + '@EXTRA_ARGS@', '@INPUT@' ], output: '@[email protected]_pb.hpp') -fs_pb = proto_gen.process('../../subprojects/managarm/bragi/proto/fs.proto') -posix_pb = proto_gen.process('../../subprojects/managarm/bragi/proto/posix.proto') +fs_pb = proto_gen.process(meson.current_source_dir() + + '/../../subprojects/managarm/protocols/fs/fs.proto', + extra_args: ['--proto_path=' + meson.current_source_dir() + + '/../../subprojects/managarm/protocols/fs']) +posix_pb = proto_gen.process(meson.current_source_dir() + + '/../../subprojects/managarm/protocols/posix/posix.proto', + extra_args: ['--proto_path=' + meson.current_source_dir() + + '/../../subprojects/managarm/protocols/posix']) managarm_incl = include_directories( '../../subprojects/managarm/hel/include',
different saw version
@@ -32,7 +32,7 @@ mkdir -p "$DOWNLOAD_DIR" cd "$DOWNLOAD_DIR" #download saw binaries -curl --retry 3 https://s3-us-west-2.amazonaws.com/s2n-public-test-dependencies/saw-0.2-2018-01-21-Ubuntu14.04-64.tar.gz --output saw.tar.gz; +curl --retry 3 https://s3-us-west-2.amazonaws.com/s2n-public-test-dependencies/saw-0.2-2017-07-27-Ubuntu14.04-64.tar.gz --output saw.tar.gz; mkdir -p saw && tar -xzf saw.tar.gz --strip-components=1 -C saw mkdir -p "$INSTALL_DIR" && mv saw/* "$INSTALL_DIR"
complete options
@@ -121,13 +121,15 @@ function _complete_option_kv_v(options, current, completing, name, value) end -- match values starts with value first + local found_candidates = {} for _, v in ipairs(_find_candidates(values, value)) do if no_key then - _print_candidate(true, "%s", v) + table.insert(found_candidates, { value = v, is_complete = true }) else - _print_candidate(true, "--%s=%s", name, v) + table.insert(found_candidates, { value = format("--%s=%s", name, v), is_complete = true }) end end + _print_candidates(found_candidates) -- whether any candidates has been found, finish complete since we don't have more info return true @@ -142,11 +144,13 @@ function _complete_option_kv_k(options, current, completing, name) opcandi[opt[2]] = opt end end - + local found_candidates = {} for _, k in ipairs(_find_candidates((table.keys(opcandi)), name)) do local opt = opcandi[k] - _print_candidate((opt[3] == "k"), (opt[3] == "k") and "--%s" or "--%s=", opt[2]) + local name = format((opt[3] == "k") and "--%s" or "--%s=", opt[2]) + table.insert(found_candidates, { value = name, description = opt[5], is_complete = (opt[3] == "k") }) end + _print_candidates(found_candidates) return true end @@ -190,7 +194,7 @@ function _complete_option_v(options, current, completing) optvs = v end end - + local found_candidates = {} if opt then -- show candidates of values local values = opt.values @@ -199,14 +203,12 @@ function _complete_option_v(options, current, completing) end for _, v in ipairs(values) do if tostring(v):startswith(completing) then - _print_candidate(true, "%s", v) + table.insert(found_candidates, { value = v, is_complete = true }) end end - return true end - if optvs then - + if optvs and #found_candidates == 0 then -- show candidates of values local values = optvs.values if type(values) == "function" then @@ -214,13 +216,12 @@ function _complete_option_v(options, current, completing) end for _, v in ipairs(values) do if tostring(v):startswith(completing) then - _print_candidate(true, "%s", v) + table.insert(found_candidates, { value = v, is_complete = true }) end end - return true end - - return false + _print_candidates(found_candidates) + return #found_candidates > 0 end function _complete_option(options, segs, completing)
Added sin,cos,tan in math package
@@ -29,9 +29,11 @@ assert(Math.sqrt(25) == 5); assert(Math.sqrt(100) == 10); assert(Math.sqrt(20) == 4.47213595499958); assert(Math.sqrt(100_00) == 1_00); -assert(Math.sin( 1.5707963268) == 1); +assert(Math.sin(1) > 0.84); +assert(Math.sin(1) < 0.845); assert(Math.cos(0) == 1); -assert(Math.tan(0.7853981634) == 1); +assert(Math.tan(1) > 1.5); +assert(Math.tan(1) < 1.6); assert(Math.PI == 3.14159265358979); assert(Math.e == 2.71828182845905); \ No newline at end of file
vlib: fix memory leak in load_one_plugin Type: fix Fixes:
@@ -194,6 +194,8 @@ load_one_plugin (plugin_main_t * pm, plugin_info_t * pi, int from_early_init) reread_reg = 0; goto process_reg; } + else + clib_error_free (error); error = elf_get_section_by_name (&em, ".vlib_plugin_registration", &section);
fix jet discrepancies in ++fond
[(fork p.q.p.p.hax p.q.p.p.yor ~) q.q.p.p.hax] ?> ?=($& -.yor) ?> =(p.q.p.hax p.q.p.yor) - :^ %& - (join p.p.hax p.p.yor) - p.q.p.hax ?: &(?=($& -.q.q.p.hax) ?=($& -.q.q.p.yor)) + :^ %& (join p.p.hax p.p.yor) p.q.p.hax [%& (fork p.q.q.p.hax p.q.q.p.yor ~)] ?> &(?=($| -.q.q.p.hax) ?=($| -.q.q.p.yor)) ?> =(p.q.q.p.hax p.q.q.p.yor) =+ wal=(~(uni in q.q.q.p.hax) q.q.q.p.yor) + :^ %& ~ p.q.p.hax [%| p.q.q.p.hax wal] ++ $ ^- pony ?- sut - $void stop + $void ~ $noun stop {$atom *} stop {$cell *} next ?~ q.u.tyr $(sut q.sut, lon [~ lon], p.heg +(p.heg)) - ?. =(0 p.heg) - next(p.heg (dec p.heg)) =+ tor=(fund way u.q.u.tyr) ?- -.tor $& [%& ~ (weld p.p.tor `vein`[~ `axe lon]) q.p.tor]
Add missing WMI provider tab settings from commit
@@ -231,7 +231,9 @@ VOID PhAddDefaultSettings( PhpAddIntegerSetting(L"TreeListEnableHeaderTotals", L"1"); PhpAddIntegerSetting(L"UpdateInterval", L"3e8"); // 1000ms PhpAddIntegerSetting(L"WmiProviderEnableHiddenMenu", L"0"); - PhpAddStringSetting(L"WmiProviderListViewColumns", L""); + PhpAddStringSetting(L"WmiProviderTreeListColumns", L""); + PhpAddStringSetting(L"WmiProviderTreeListSort", L"0,0"); // 0, NoSortOrder + PhpAddIntegerSetting(L"WmiProviderTreeListFlags", L"0"); PhpAddStringSetting(L"VdmHostListViewColumns", L""); // Colors are specified with R in the lowest byte, then G, then B. So: bbggrr.
check of empty input size is not required
@@ -761,11 +761,9 @@ void reqread_on_read(h2o_socket_t *sock, const char *err) static void close_idle_connection(h2o_conn_t *_conn) { struct st_h2o_http1_conn_t *conn = (void *)_conn; - if (conn->sock->input->size == 0) { conn->req.http1_is_persistent = 0; close_connection(conn, 1); } -} static void on_timeout(struct st_h2o_http1_conn_t *conn) {
replace allow by support on frequency scan
@@ -7748,7 +7748,7 @@ for(c = 2412; c <= 2484; c++) } else { - fprintf(stderr, "driver doesn't allow frequency scan\n"); + fprintf(stderr, "driver doesn't support frequency scan\n"); continue; } memset(&pwrq, 0, sizeof(pwrq)); @@ -7795,7 +7795,7 @@ for(c = 5180; c <= 5905; c++) } else { - fprintf(stderr, "driver doesn't allow frequency scan\n"); + fprintf(stderr, "driver doesn't support frequency scan\n"); continue; } memset(&pwrq, 0, sizeof(pwrq)); @@ -7841,7 +7841,7 @@ for(c = 5955; c <= 7115; c++) } else { - fprintf(stderr, "driver doesn't allow frequency scan\n"); + fprintf(stderr, "driver doesn't support frequency scan\n"); continue; } memset(&pwrq, 0, sizeof(pwrq));
fix rounded-ending arc
@@ -243,8 +243,8 @@ static lv_design_res_t lv_arc_design(lv_obj_t * arc, const lv_area_t * clip_area /*Draw circle on the ends if enabled */ if(style->line.rounded) { lv_coord_t thick_half = style->line.width / 2; - lv_coord_t cir_x = ((r - thick_half) * lv_trigo_sin(ext->angle_start) >> LV_TRIGO_SHIFT); - lv_coord_t cir_y = ((r - thick_half) * lv_trigo_sin(ext->angle_start + 90) >> LV_TRIGO_SHIFT); + lv_coord_t cir_x = ((r - thick_half + 1) * lv_trigo_sin(90 - ext->angle_start) >> LV_TRIGO_SHIFT); + lv_coord_t cir_y = ((r - thick_half + 1) * lv_trigo_sin(ext->angle_start) >> LV_TRIGO_SHIFT); lv_style_t cir_style; lv_style_copy(&cir_style, &lv_style_plain); @@ -252,18 +252,18 @@ static lv_design_res_t lv_arc_design(lv_obj_t * arc, const lv_area_t * clip_area cir_style.body.main_color = cir_style.body.grad_color; cir_style.body.radius = LV_RADIUS_CIRCLE; lv_area_t cir_area; - cir_area.x1 = cir_x + x - thick_half; - cir_area.y1 = cir_y + y - thick_half; + cir_area.x1 = cir_x + x - thick_half +1; + cir_area.y1 = cir_y + y - thick_half +1; cir_area.x2 = cir_x + x + thick_half; cir_area.y2 = cir_y + y + thick_half; lv_draw_rect(&cir_area, clip_area, &cir_style, opa_scale); - cir_x = ((r - thick_half) * lv_trigo_sin(ext->angle_end) >> LV_TRIGO_SHIFT); - cir_y = ((r - thick_half) * lv_trigo_sin(ext->angle_end + 90) >> LV_TRIGO_SHIFT); + cir_x = ((r - thick_half + 1) * lv_trigo_sin(90 - ext->angle_end) >> LV_TRIGO_SHIFT); + cir_y = ((r - thick_half + 1) * lv_trigo_sin(ext->angle_end) >> LV_TRIGO_SHIFT); - cir_area.x1 = cir_x + x - thick_half; - cir_area.y1 = cir_y + y - thick_half; + cir_area.x1 = cir_x + x - thick_half +1; + cir_area.y1 = cir_y + y - thick_half +1; cir_area.x2 = cir_x + x + thick_half; cir_area.y2 = cir_y + y + thick_half;
fix my confused port numbers
@@ -17,27 +17,26 @@ To see the TLS-related environment variables, run the command: ldscope --help configuration | grep TLS ``` - ## Using TLS in Cribl.Cloud AppScope uses TLS by default to communicate with LogStream in Cribl.Cloud. LogStream has an AppScope Source ready to use out-of-the-box. Within Cribl.Cloud, a front-end load balancer (reverse proxy) handles the encrypted TLS traffic and relays it to the AppScope Source port in LogStream. The connection from the load balancer to LogStream does **not** use TLS, and you should not enable TLS on the [AppScope Source](https://docs.cribl.io/docs/sources-appscope) in LogStream. No changes in LogStream configuration are needed. -AppScope connects to your Cribl.Cloud Ingest Endpoint on port 10091. The Ingest Endpoint URL is always the same except for the Cribl.Cloud Organization ID, which LogStream uses in the hostname portion, in the following way: +AppScope connects to your Cribl.Cloud Ingest Endpoint on port 10090. The Ingest Endpoint URL is always the same except for the Cribl.Cloud Organization ID, which LogStream uses in the hostname portion, in the following way: ``` https://in.logstream.<organization-ID>.cribl.cloud:10091 ``` -If you **disable** TLS, the port is 10090. +If you **disable** TLS, the port is 10091. ### CLI usage Use scope with the `-c` option: ``` -scope -c tls://host:10091 +scope -c tls://host:10090 ``` ### Configuration for `LD_PRELOAD` or `ldscope` @@ -45,7 +44,7 @@ scope -c tls://host:10091 To connect AppScope to a LogStream Cloud instance using TLS: 1. Enable the `transport : tls` element in `scope.yml`. -1. Connect to port 10091 on your Cribl.Cloud Ingest Endpoint. +1. Connect to port 10090 on your Cribl.Cloud Ingest Endpoint. To enable TLS in `scope.yml`, adapt the example below to your environment: @@ -55,21 +54,13 @@ cribl: transport: type: tcp # don't use tls here, use tcp and enable tls below host: in.logstream.example-organization.cribl.cloud - port: 10091 # cribl.cloud's port for the TLS AppScope Source + port: 10090 # cribl.cloud's port for the TLS AppScope Source tls: enable: true validateserver: true cacertpath: '' ``` -## Adapting to Network Latency - -When you connect AppScope to LogStream or another application, you can usually assume that the process you are scoping will last long enough for AppScope to make the network connection and stream the data to the destination. - -This might not hold true if the command or application being scoped exits quickly and network connection latency is relatively high. Under these conditions, events and metrics can be dropped and never reach the destination. - -To mitigate this problem, you can set the `SCOPE_CONNECT_TIMEOUT_SECS` environment variable (which is unset by default) to `N`, where `N` is an integer, usually `1`. Then, the AppScope library will keep the scoped process open for `N` seconds, giving AppScope that amount of time to connect and stream data over the network. - ## Scoping Without TLS If you prefer to communicate without encryption, connect to port 10091 instead of port 10090.
Fix package script.
@@ -38,14 +38,7 @@ find "${MACOSX_X86_64}" -name '*.nupkg' -print0 | \ xargs -0 -I{} unzip -d "${NUPKG_TMP_DIR}" -o {} find "${LINUX_X86_64}" -name '*.nupkg' -print0 | \ xargs -0 -I{} unzip -d "${NUPKG_TMP_DIR}" -o {} -# Remove 'lib' prefix from the native library of the Windows DLL. -find "${SCRIPT_DIR}/nuget/runtimes/" \ - -name 'libtinyspline*.dll' \ - -exec /bin/bash -c \ - 'DIRNAME=$( dirname "${0}" ) && \ - BASENAME=$( basename "${0}" ) && \ - mv "${0}" "${DIRNAME}/${BASENAME#lib}"' {} \; -# Add 'lib' prefix to the native library of the Linux/OSX so file. +# Add 'lib' prefix to the native library of the Linux/OSX .so file. find "${SCRIPT_DIR}/nuget/runtimes/" \ -name 'tinyspline*.so' \ -exec /bin/bash -c \
[catboost] Add eval_metric docs Note: mandatory check (NEED_CHECK) was skipped
@@ -63,6 +63,34 @@ def create_cd( def eval_metric(label, approx, metric, weight=None, group_id=None, thread_count=-1): + """ + Evaluate metrics with raw approxes and labels. + + Parameters + ---------- + label : list or numpy.arrays or pandas.DataFrame or pandas.Series + Object labels. + + approx : list or numpy.arrays or pandas.DataFrame or pandas.Series + Object approxes. + + metrics : list of strings + List of eval metrics. + + weight : list or numpy.array or pandas.DataFrame or pandas.Series, optional (default=None) + Object weights. + + group_id : list or numpy.array or pandas.DataFrame or pandas.Series, optional (default=None) + Object group ids. + + thread_count : int, optional (default=-1) + Number of threads to work with. + If -1, then the number of threads is set to the number of cores. + + Returns + ------- + metric results : list with metric values. + """ if len(approx) == 0: approx = [[]] if not isinstance(approx[0], ARRAY_TYPES):
Trembyle: Adjust fan speeds and temps Reduce fan speeds and increase temperature limits. BRANCH=none TEST=check fan speed
@@ -329,9 +329,9 @@ const struct fan_conf fan_conf_0 = { .enable_gpio = -1, }; const struct fan_rpm fan_rpm_0 = { - .rpm_min = 3100, - .rpm_start = 3100, - .rpm_max = 6900, + .rpm_min = 3000, + .rpm_start = 3000, + .rpm_max = 4900, }; const struct fan_t fans[] = { [FAN_CH_0] = { @@ -343,26 +343,26 @@ BUILD_ASSERT(ARRAY_SIZE(fans) == FAN_CH_COUNT); const static struct ec_thermal_config thermal_thermistor = { .temp_host = { - [EC_TEMP_THRESH_HIGH] = C_TO_K(75), - [EC_TEMP_THRESH_HALT] = C_TO_K(80), + [EC_TEMP_THRESH_HIGH] = C_TO_K(90), + [EC_TEMP_THRESH_HALT] = C_TO_K(92), }, .temp_host_release = { - [EC_TEMP_THRESH_HIGH] = C_TO_K(65), + [EC_TEMP_THRESH_HIGH] = C_TO_K(80), }, .temp_fan_off = C_TO_K(25), - .temp_fan_max = C_TO_K(50), + .temp_fan_max = C_TO_K(58), }; const static struct ec_thermal_config thermal_cpu = { .temp_host = { - [EC_TEMP_THRESH_HIGH] = C_TO_K(85), - [EC_TEMP_THRESH_HALT] = C_TO_K(95), + [EC_TEMP_THRESH_HIGH] = C_TO_K(90), + [EC_TEMP_THRESH_HALT] = C_TO_K(92), }, .temp_host_release = { - [EC_TEMP_THRESH_HIGH] = C_TO_K(65), + [EC_TEMP_THRESH_HIGH] = C_TO_K(80), }, .temp_fan_off = C_TO_K(25), - .temp_fan_max = C_TO_K(50), + .temp_fan_max = C_TO_K(58), }; struct ec_thermal_config thermal_params[TEMP_SENSOR_COUNT];
Ensure that we performed the embedding before replying
@@ -133,6 +133,7 @@ void Application::onMessage(const clap::RemoteChannel::Message &msg) { #ifdef Q_OS_LINUX hostWindow_.reset(QWindow::fromWinId(rq.window)); quickView_->setParent(hostWindow_.get()); + sync(); rp.succeed = true; #endif
LICENSE: Update copyright year.
The MIT License (MIT) Copyright (c) 2013-2020 Damien P. George -Copyright (c) 2014-2019 Paul Sokolovsky +Copyright (c) 2014-2021 Paul Sokolovsky Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal
prevent overlay from becoming tiled
@@ -4766,7 +4766,7 @@ applysize(Client *c) { void togglefloating(const Arg *arg) { - if (!selmon->sel) + if (!selmon->sel || selmon->sel == selmon->overlay) return; if (selmon->sel->isfullscreen && !selmon->sel->isfakefullscreen) /* no support for fullscreen windows */ return;
Print test suite logs in case of failure.
@@ -34,7 +34,8 @@ jobs: run: make clean && make - name: Run tests run: make check - - name: Show tests results + - name: Print test logs + if: ${{ failure() }} run: cat test-suite.log mingw-build:
tidy JSON output
@@ -404,7 +404,7 @@ def main(): for i, event in enumerate(source_events): handler = QLOG_EVENT_HANDLERS.get(event["type"]) if handler: - print(json.dumps(handler(source_events, i))) + print(json.dumps(handler(source_events, i), separators=(',', ':'))) if __name__ == "__main__": main()
Avoid using undefined value in generate_stateless_cookie_callback
@@ -823,6 +823,7 @@ int generate_cookie_callback(SSL *ssl, unsigned char *cookie, size_t temp = 0; int res = generate_stateless_cookie_callback(ssl, cookie, &temp); + if (res != 0) *cookie_len = (unsigned int)temp; return res; }
Fixed a warning that could appear when starting the plugin.
@@ -1112,6 +1112,8 @@ getHarsPath(std::string &harsPath) { char *hHarsLocation = getenv("HOUDINI_HARS_LOCATION"); const MString path = MGlobal::executeCommandStringResult("getenv PATH;"); + + MGlobal::executeCommand("source \"houdiniEngineUtils.mel\";"); const MString hfsPath = MGlobal::executeCommandStringResult("houdiniEngine_getHfsPath(false)"); #if defined(_WIN32)
updated dcp.1.md
@@ -6,8 +6,7 @@ dcp - distributed file copy program # SYNOPSIS -dcp [cCdfhpRrUv] [--] source_file target_file -dcp [cCdfhpRrUv] [--] source_file ... target_directory +**dcp [OPTION] SOURCE DEST** # DESCRIPTION @@ -20,16 +19,6 @@ termination. # OPTIONS --c, \--conditional -: When copying a source directory to a destination directory, copy the source - directory over the destination directory. The default behavior is to copy - the source directory inside the destination directory. - --C, \--skip-compare -: Skip the compare operation to confirm file integrity. When using this - option, a file integrity check, such as md5sum, should be performed after - the file(s) have been copied. - -d, \--debug=*level* : Specify the level of debug information to output. Level may be one of: *fatal*, *err*, *warn*, *info*, or *dbg*. Increasingly verbose debug @@ -41,32 +30,21 @@ termination. (`-U`, `--unreliable-filesystem`), this option may lower performance since each failure will cause the entire file to be invalidated and copied again. --h, \--help -: Print a brief message listing the *dcp(1)* options and usage. - -p, \--preserve -: Preserve the original files' owner, group, permissions (including the +: Preserve the original files owner, group, permissions (including the setuid and setgid bits), time of last modification and time of last access. In case duplication of owner or group fails, the setuid and setgid bits are cleared. --R, \--recursive -: Copy directories recursively, and do the right thing when objects other - than ordinary files or directories are encountered. - --r, \--recursive-unspecified -: Copy directories recursively, and ignore objects other than ordinary files - or directories. - --U, \--unreliable-filesystem -: If the filesystem is very unreliable, this option may be used to always - retry an operation when a failure occurs. If failures are permanent, this - option will cause an infinite loop. Specifying this option when force is - enabled (`-f`, `--force`) may lower performance. +-s, \--synchronous +: Use synchronous read/write calls (0_DIRECT) -v, \--version : Print version information and exit. +-h, \--help +: Print a brief message listing the *dcp(1)* options and usage. + ### Known bugs When the force option is specified and truncation fails, the copy and truncation will be stuck in an infinite loop until the truncation operation @@ -76,8 +54,11 @@ The maximum supported filename length for any file transfered is approximately 4068 characters. This may be less than the number of characters that your operating system supports. +(these bugs were from old dcp, not sure if this works now?) + # SEE ALSO +`dchmod` (1). `dcmp` (1). `dcp` (1). `dfilemaker` (1).
Build: Simplify code for Haskell find module
@@ -48,27 +48,17 @@ mark_as_advanced (GHC_EXECUTABLE if (NOT GHC_EXECUTABLE) set (HASKELL_NOTFOUND_INFO "GHC not found") -endif (NOT GHC_EXECUTABLE) - -if (NOT CABAL_EXECUTABLE) +elseif (NOT CABAL_EXECUTABLE) set (HASKELL_NOTFOUND_INFO "cabal not found") -endif (NOT CABAL_EXECUTABLE) - -if (NOT ALEX_EXECUTABLE) +elseif (NOT ALEX_EXECUTABLE) set (HASKELL_NOTFOUND_INFO "alex not found") -endif (NOT ALEX_EXECUTABLE) - -if (NOT HAPPY_EXECUTABLE) +elseif (NOT HAPPY_EXECUTABLE) set (HASKELL_NOTFOUND_INFO "happy not found") -endif (NOT HAPPY_EXECUTABLE) - -if (NOT C2HS_EXECUTABLE) +elseif (NOT C2HS_EXECUTABLE) set (HASKELL_NOTFOUND_INFO "c2hs not found") -endif (NOT C2HS_EXECUTABLE) - -if (NOT GHC-PKG_EXECUTABLE) +elseif (NOT GHC-PKG_EXECUTABLE) set (HASKELL_NOTFOUND_INFO "ghc-pkg not found") -endif (NOT GHC-PKG_EXECUTABLE) +endif (NOT GHC_EXECUTABLE) if (HASKELL_NOTFOUND_INFO) set (HASKELL_NOTFOUND_INFO "${HASKELL_NOTFOUND_INFO}, please refer to the readme in src/bindings/haskell/README.md")
fix: the generated function types for callbacks
@@ -650,11 +650,11 @@ static void gen_wrapper(FILE *fp, struct jc_struct *s) " %s_list_free((struct %s**)p);\n" "}\n", t, t, t); - fprintf(fp, "void %s_list_from_json_v(char *str, size_t len, void ***p) {\n" + fprintf(fp, "void %s_list_from_json_v(char *str, size_t len, void *p) {\n" " %s_list_from_json(str, len, (struct %s ***)p);\n" "}\n", t, t, t); - fprintf(fp, "size_t %s_list_to_json_v(char *str, size_t len, void **p){\n" + fprintf(fp, "size_t %s_list_to_json_v(char *str, size_t len, void *p){\n" " return %s_list_to_json(str, len, (struct %s **)p);\n" "}\n", t, t, t); } @@ -688,11 +688,11 @@ static void gen_forward_declare(FILE *fp, struct jc_struct *s) fprintf(fp, "void %s_list_free_v(void **p);\n", t); fprintf(fp, "void %s_list_free(struct %s **p);\n", t, t); - fprintf(fp, "void %s_list_from_json_v(char *str, size_t len, void ***p);\n", t); + fprintf(fp, "void %s_list_from_json_v(char *str, size_t len, void *p);\n", t); fprintf(fp, "void %s_list_from_json(char *str, size_t len, struct %s ***p);\n", t, t); - fprintf(fp, "size_t %s_list_to_json_v(char *str, size_t len, void **p);\n", t); + fprintf(fp, "size_t %s_list_to_json_v(char *str, size_t len, void *p);\n", t); fprintf(fp, "size_t %s_list_to_json(char *str, size_t len, struct %s **p);\n", t,t); }
GRIB2: Prevent error when setting localDefinitionNumber
@@ -333,8 +333,8 @@ static int pack_long(grib_accessor* a, const long* val, size_t* len) break; default: - grib_context_log(a->context, GRIB_LOG_ERROR, "Invalid localDefinitionNumber %d", localDefinitionNumber); - return GRIB_ENCODING_ERROR; + grib_context_log(a->context, GRIB_LOG_WARNING, "Set localDefinitionNumber: keeping the same PDTN"); + productDefinitionTemplateNumberNew = productDefinitionTemplateNumber; break; }
check the return value of OSSL_PARAM_BLD_new in dsa_kmgmt.c:195
@@ -210,12 +210,16 @@ static int dsa_export(void *keydata, int selection, OSSL_CALLBACK *param_cb, void *cbarg) { DSA *dsa = keydata; - OSSL_PARAM_BLD *tmpl = OSSL_PARAM_BLD_new(); + OSSL_PARAM_BLD *tmpl; OSSL_PARAM *params = NULL; int ok = 1; if (!ossl_prov_is_running() || dsa == NULL) - goto err; + return 0; + + tmpl = OSSL_PARAM_BLD_new(); + if (tmpl == NULL) + return 0; if ((selection & OSSL_KEYMGMT_SELECT_ALL_PARAMETERS) != 0) ok = ok && ossl_ffc_params_todata(ossl_dsa_get0_params(dsa), tmpl, NULL);
SOVERSION bump to version 4.3.3
@@ -39,7 +39,7 @@ set(SYSREPO_VERSION ${SYSREPO_MAJOR_VERSION}.${SYSREPO_MINOR_VERSION}.${SYSREPO_ # with backward compatible change and micro version is connected with any internal change of the library. set(SYSREPO_MAJOR_SOVERSION 4) set(SYSREPO_MINOR_SOVERSION 3) -set(SYSREPO_MICRO_SOVERSION 2) +set(SYSREPO_MICRO_SOVERSION 3) set(SYSREPO_SOVERSION_FULL ${SYSREPO_MAJOR_SOVERSION}.${SYSREPO_MINOR_SOVERSION}.${SYSREPO_MICRO_SOVERSION}) set(SYSREPO_SOVERSION ${SYSREPO_MAJOR_SOVERSION})
replay BUGFIX timeout units Fixes
@@ -374,7 +374,7 @@ sr_notif_write(const struct lys_module *ly_mod, sr_mod_t *shm_mod, char *notif_l SR_CHECK_INT_GOTO(notif_lyb_len == -1, err_info, cleanup); /* REPLAY WRITE LOCK */ - if ((err_info = sr_rwlock(&shm_mod->replay_lock, SR_MOD_LOCK_TIMEOUT, SR_LOCK_WRITE, __func__))) { + if ((err_info = sr_rwlock(&shm_mod->replay_lock, SR_MOD_LOCK_TIMEOUT * 1000, SR_LOCK_WRITE, __func__))) { goto cleanup; }
grid: fix loop caused by useEffect in tilegrid
@@ -46,11 +46,7 @@ export const TileGrid = ({ menu }: TileGridProps) => { } else if (order.length > chargeKeys.length && chargeKeys.length !== 0) { useSettingsState .getState() - .putEntry( - 'tiles', - 'order', - uniq(order.filter((key) => !(key in charges)).concat(chargeKeys)) - ); + .putEntry('tiles', 'order', uniq(order.filter((key) => key in charges).concat(chargeKeys))); } }, [charges, order]);
Solve bugs from node port.
@@ -214,23 +214,6 @@ mod.prototype.require = function (name) { // /* Continue loading */ // } - /* Try to load it with NodeJS first */ - try { - return node_require.apply(this, [ name ]); - } catch (e) { - if (e.code !== 'MODULE_NOT_FOUND') { - throw e; - } - } - - try { - return node_require.apply(this, [ require.resolve(name) ]); - } catch (e) { - if (e.code !== 'MODULE_NOT_FOUND') { - throw e; - } - } - const index = name.lastIndexOf('.'); if (index !== -1) { @@ -244,6 +227,14 @@ mod.prototype.require = function (name) { } } + try { + return node_require.apply(this, [ name ]); + } catch (e) { + if (e.code !== 'MODULE_NOT_FOUND') { + throw e; + } + } + /* If there is no extension or the extension is not supported or it is 'node', load it with NodeJS require */ try { const filename = require.resolve(name);
null-terminates (and strips port from) Host header
@@ -1465,12 +1465,19 @@ _proxy_parse_host(const uv_buf_t* buf_u, c3_c** hot_c) if ( 0 != (tok_t = h2o_lookup_token(hed_u[i].name, hed_u[i].name_len)) ) { if ( tok_t->is_init_header_special && H2O_TOKEN_HOST == tok_t ) { + c3_c* val_c; + c3_c* por_c; - *hot_c = c3_malloc(1 + hed_u[i].value_len); - // XX cores??? - // *hot_c[hed_u[i].value_len] = 0; - // XX skip port if present - memcpy(*hot_c, hed_u[i].value, hed_u[i].value_len); + val_c = c3_malloc(1 + hed_u[i].value_len); + val_c[hed_u[i].value_len] = 0; + memcpy(val_c, hed_u[i].value, hed_u[i].value_len); + + // 'truncate' by replacing port separator ':' with 0 + if ( 0 != (por_c = strchr(val_c, ':')) ) { + por_c[0] = 0; + } + + *hot_c = val_c; break; } }
libhfuzz: avoid bus locking in instrumentLimitEvery()
@@ -173,8 +173,8 @@ __attribute__((weak)) size_t instrumentReserveGuard(size_t cnt) { /* Used to limit certain expensive actions, like adding values to dictionaries */ static inline bool instrumentLimitEvery(uint64_t step) { - static uint64_t staticCnt = 0; - if ((ATOMIC_POST_INC(staticCnt) % step) == 0) { + static __thread uint64_t staticCnt = 0; + if (((staticCnt++) % step) == 0) { return true; } return false;
Fix a copy&paste error in the TLSv1.3 server side PSK documentation The introductory paragraph for the TLSv1.3 server side PSK documentation is a copy & paste of the client side documentation which has not been updated with the server side equivalent information.
@@ -39,9 +39,9 @@ SSL_set_psk_find_session_callback =head1 DESCRIPTION -A client application wishing to use TLSv1.3 PSKs should set a callback -using either SSL_CTX_set_psk_use_session_callback() or -SSL_set_psk_use_session_callback() as appropriate. +A server application wishing to use TLSv1.3 PSKs should set a callback +using either SSL_CTX_set_psk_find_session_callback() or +SSL_set_psk_find_session_callback() as appropriate. The callback function is given a pointer to the SSL connection in B<ssl> and an identity in B<identity> of length B<identity_len>. The callback function
Test that we ignore a bad record version in a plaintext TLSv1.3 record The RFC requires us to ignore this field in plaintext records - so even if it is set incorrectly we should tolerate it.
@@ -44,7 +44,7 @@ my $inject_recs_num = 1; $proxy->serverflags("-tls1_2"); $proxy->clientflags("-no_tls1_3"); $proxy->start() or plan skip_all => "Unable to start up Proxy for tests"; -plan tests => 20; +plan tests => 21; ok($fatal_alert, "Out of context empty records test"); #Test 2: Injecting in context empty records should succeed @@ -175,7 +175,7 @@ ok($fatal_alert, "Changed record version in TLS1.2"); #TLS1.3 specific tests SKIP: { - skip "TLSv1.3 disabled", 8 + skip "TLSv1.3 disabled", 9 if disabled("tls1_3") || (disabled("ec") && disabled("dh")); #Test 13: Sending a different record version in TLS1.3 should fail @@ -247,6 +247,22 @@ SKIP: { $boundary_test_type = NO_DATA_BETWEEN_KEY_UPDATE; $proxy->start(); ok(TLSProxy::Message->success(), "No data between KeyUpdate"); + + SKIP: { + skip "EC disabled", 1 if disabled("ec"); + + #Test 21: Force an HRR and change the "real" ServerHello to have a protocol + # record version of 0x0301 (TLSv1.0). At this point we have already + # decided that we are doing TLSv1.3 but are still using plaintext + # records. The server should be sending a record version of 0x303 + # (TLSv1.2), but the RFC requires us to ignore this field so we + # should tolerate the incorrect version. + $proxy->clear(); + $proxy->filter(\&change_server_hello_version); + $proxy->serverflags("-groups P-256"); # Force an HRR + $proxy->start(); + ok(TLSProxy::Message->success(), "Bad ServerHello record version after HRR"); + } } @@ -535,6 +551,26 @@ sub change_version } } +sub change_server_hello_version +{ + my $proxy = shift; + my $records = $proxy->record_list; + + # We're only interested in changing the ServerHello after an HRR + if ($proxy->flight != 3) { + return; + } + + # The ServerHello has index 5 + # 0 - ClientHello + # 1 - HRR + # 2 - CCS + # 3 - ClientHello(2) + # 4 - CCS + # 5 - ServerHello + @{$records}[5]->version(TLSProxy::Record::VERS_TLS_1_0); +} + sub change_outer_record_type { my $proxy = shift;
tests: runtime: out_splunk: add test for 'Splunk_Send_Raw'
@@ -32,11 +32,76 @@ static void cb_check_basic(void *ctx, int ffd, char *index_line = "\"event\":{\"key\":\"value\"}"; p = strstr(out_js, index_line); - TEST_CHECK(p != NULL); + if (!TEST_CHECK(p != NULL)) { + TEST_MSG("Given:%s", out_js); + } + + flb_sds_destroy(out_js); +} + +static void cb_check_send_raw(void *ctx, int ffd, + int res_ret, void *res_data, size_t res_size, + void *data) +{ + char *p; + flb_sds_t out_js = res_data; + char *not_match_line = "\"event\":{\"key\":\"value\"}"; + char *match_line = "\"key\":\"value\""; + + p = strstr(out_js, not_match_line); + if (!TEST_CHECK(p == NULL)) { + TEST_MSG("Given:%s", out_js); + } + p = strstr(out_js, match_line); + if (!TEST_CHECK(p != NULL)) { + TEST_MSG("Given:%s", out_js); + } flb_sds_destroy(out_js); } +// Test "Splunk_Send_Raw" property. +void flb_test_send_raw() +{ + int ret; + int size = sizeof(JSON_BASIC) - 1; + flb_ctx_t *ctx; + int in_ffd; + int out_ffd; + + /* Create context, flush every second (some checks omitted here) */ + ctx = flb_create(); + flb_service_set(ctx, "flush", "1", "grace", "1", NULL); + + /* Lib input mode */ + in_ffd = flb_input(ctx, (char *) "lib", NULL); + flb_input_set(ctx, in_ffd, "tag", "test", NULL); + + /* Elasticsearch output */ + out_ffd = flb_output(ctx, (char *) "splunk", NULL); + flb_output_set(ctx, out_ffd, + "match", "test", + "http_user", "alice", + "splunk_send_raw", "true", + NULL); + + /* Enable test mode */ + ret = flb_output_set_test(ctx, out_ffd, "formatter", + cb_check_send_raw, + NULL, NULL); + + /* Start */ + ret = flb_start(ctx); + TEST_CHECK(ret == 0); + + /* Ingest data sample */ + flb_lib_push(ctx, in_ffd, (char *) JSON_BASIC, size); + + sleep(2); + flb_stop(ctx); + flb_destroy(ctx); +} + void flb_test_basic() { int ret; @@ -80,5 +145,6 @@ void flb_test_basic() /* Test list */ TEST_LIST = { {"basic" , flb_test_basic }, + {"send_raw" , flb_test_send_raw}, {NULL, NULL} };
Delete duplicates in device_descriptors table Issue
@@ -123,15 +123,19 @@ void DeRestPluginPrivate::cleanUpDb() "DELETE from sensors " " WHERE modelid like 'RWL02%' " " AND type = 'ZHAPresence'", - NULL + + // delete duplicates in device_descriptors + "DELETE FROM device_descriptors WHERE rowid NOT IN" + " (SELECT max(rowid) FROM device_descriptors GROUP BY device_id,type,endpoint)", + nullptr }; - for (int i = 0; sql[i] != NULL; i++) + for (int i = 0; sql[i] != nullptr; i++) { - errmsg = NULL; + errmsg = nullptr; /* Execute SQL statement */ - rc = sqlite3_exec(db, sql[i], NULL, NULL, &errmsg); + rc = sqlite3_exec(db, sql[i], nullptr, nullptr, &errmsg); if (rc != SQLITE_OK) {
hv: virq: fix wrong coding style hypervisor/arch/x86/virq.c missed a new line at: if (bitmap_test_and_clear_lock(...)) { vioapic_update_tmr(vcpu); Acked-by: Eddie Dong
@@ -402,7 +402,8 @@ int32_t acrn_handle_pending_request(struct acrn_vcpu *vcpu) flush_vpid_single(arch->vpid); } - if (bitmap_test_and_clear_lock(ACRN_REQUEST_TMR_UPDATE, pending_req_bits)) { vioapic_update_tmr(vcpu); + if (bitmap_test_and_clear_lock(ACRN_REQUEST_TMR_UPDATE, pending_req_bits)) { + vioapic_update_tmr(vcpu); } /* handling cancelled event injection when vcpu is switched out */
Same call params as the game
@@ -230,7 +230,7 @@ struct ResourcesList char workingMemory[0x80000]; auto size = OodleLZ_Decompress(content.data() + headerSize, content.size() - headerSize, buffer.data(), - buffer.size(), 0, 0, 0, 0, 0, 0, 0, workingMemory, std::size(workingMemory), 0); + buffer.size(), 1, 1, 0, 0, 0, 0, 0, workingMemory, std::size(workingMemory), 3); if (size > 0) {
Fix PhGetCapabilitySidName assert
@@ -593,12 +593,12 @@ PPH_STRING PhGetCapabilitySidName( if (RtlEqualSid(entry->CapabilitySid, CapabilitySid)) { - return entry->Name; + return PhReferenceObject(entry->Name); } if (RtlEqualSid(entry->CapabilityGroupSid, CapabilitySid)) { - return entry->Name; + return PhReferenceObject(entry->Name); } }
jni: fix memleak
@@ -321,8 +321,14 @@ int elektraJniClose (Plugin * handle, Key * errorKey) { Data * data = elektraPluginGetData (handle); - if (!data || data->module == 1) + if (!data) + { + return 0; + } + + if (data->module == 1) { + elektraFree (data); return 0; }
diff BUGFIX handle first array allocation correctly
@@ -370,8 +370,7 @@ lyd_diff_userord_attrs(const struct lyd_node *first, const struct lyd_node *seco */ if (*op == LYD_DIFF_OP_CREATE) { /* insert the instance */ - LY_ARRAY_RESIZE_ERR_RET(schema->module->ctx, userord_item->inst, LY_ARRAY_COUNT(userord_item->inst) + 1, - ; , LY_EMEM); + LY_ARRAY_CREATE_RET(schema->module->ctx, userord_item->inst, 1, LY_EMEM); if (second_pos < LY_ARRAY_COUNT(userord_item->inst)) { memmove(userord_item->inst + second_pos + 1, userord_item->inst + second_pos, (LY_ARRAY_COUNT(userord_item->inst) - second_pos) * sizeof *userord_item->inst);
tools/metrics.py: Add option to diff to error if delta above threshold. Useful for things like CI where the size check is automated.
@@ -121,13 +121,20 @@ def read_build_log(filename): def do_diff(args): """Compute the difference between firmware sizes.""" + # Parse arguments. + error_threshold = None + if len(args) >= 2 and args[0] == "--error-threshold": + args.pop(0) + error_threshold = int(args.pop(0)) + if len(args) != 2: - print("usage: %s diff <out1> <out2>" % sys.argv[0]) + print("usage: %s diff [--error-threshold <x>] <out1> <out2>" % sys.argv[0]) sys.exit(1) data1 = read_build_log(args[0]) data2 = read_build_log(args[1]) + max_delta = None for key, value1 in data1.items(): value2 = data2[key] for port in port_data.values(): @@ -156,6 +163,11 @@ def do_diff(args): if warn: warn = "[incl%s]" % warn print("%11s: %+5u %+.3f%% %s%s" % (name, delta, percent, board, warn)) + max_delta = delta if max_delta is None else max(max_delta, delta) + + if error_threshold is not None and max_delta is not None: + if max_delta > error_threshold: + sys.exit(1) def do_clean(args):