message
stringlengths
6
474
diff
stringlengths
8
5.22k
fix(indev): fix warning about formatting uint32_t with %d
@@ -420,7 +420,7 @@ static void indev_keypad_proc(lv_indev_t * i, lv_indev_data_t * data) /*Key press happened*/ if(data->state == LV_INDEV_STATE_PRESSED && prev_state == LV_INDEV_STATE_RELEASED) { - LV_LOG_INFO("%d key is pressed", data->key); + LV_LOG_INFO("%" LV_PRIu32 " key is pressed", data->key); i->proc.pr_timestamp = lv_tick_get(); /*Simulate a press on the object if ENTER was pressed*/ @@ -507,7 +507,7 @@ static void indev_keypad_proc(lv_indev_t * i, lv_indev_data_t * data) } /*Release happened*/ else if(data->state == LV_INDEV_STATE_RELEASED && prev_state == LV_INDEV_STATE_PRESSED) { - LV_LOG_INFO("%d key is released", data->key); + LV_LOG_INFO("%" LV_PRIu32 " key is released", data->key); /*The user might clear the key when it was released. Always release the pressed key*/ data->key = prev_key; if(data->key == LV_KEY_ENTER) { @@ -770,10 +770,10 @@ static void indev_button_proc(lv_indev_t * i, lv_indev_data_t * data) static lv_indev_state_t prev_state = LV_INDEV_STATE_RELEASED; if(prev_state != data->state) { if(data->state == LV_INDEV_STATE_PRESSED) { - LV_LOG_INFO("button %d is pressed (x:%d y:%d)", data->btn_id, x, y); + LV_LOG_INFO("button %" LV_PRIu32 " is pressed (x:%d y:%d)", data->btn_id, x, y); } else { - LV_LOG_INFO("button %d is released (x:%d y:%d)", data->btn_id, x, y); + LV_LOG_INFO("button %" LV_PRIu32 " is released (x:%d y:%d)", data->btn_id, x, y); } }
Fix crash in Material:setTexture;
@@ -89,7 +89,7 @@ Texture* lovrMaterialGetTexture(Material* material, MaterialTexture textureType) void lovrMaterialSetTexture(Material* material, MaterialTexture textureType, Texture* texture) { if (material->textures[textureType] != texture) { - lovrAssert(lovrTextureGetType(texture) == TEXTURE_2D, "Material textures must be 2D"); + lovrAssert(!texture || lovrTextureGetType(texture) == TEXTURE_2D, "Material textures must be 2D"); lovrGraphicsFlushMaterial(material); lovrRetain(texture); lovrRelease(material->textures[textureType], lovrTextureDestroy);
zonemd, harden result length for unsupported algo in nettle digest final.
@@ -1636,6 +1636,7 @@ int secalgo_hash_final(struct secalgo_hash* hash, uint8_t* result, sha512_digest(&hash->ctx512, SHA512_DIGEST_SIZE, (unsigned char*)result); } else { + *resultlen = 0; return 0; } return 1;
Don't treat lexer errors as a format string It would break if they contained special characters like '%'.
@@ -23,7 +23,7 @@ end function Parser:_advance() local tok, err = self.lexer:next() if not tok then - self:syntax_error(self.lexer:loc(), err) + self:syntax_error(self.lexer:loc(), "%s", err) end local ret = self.next self.next = self.look @@ -489,11 +489,8 @@ function Parser:PrimaryExp(is_statement) return ast.Exp.Paren(open.loc, exp) else - if is_statement then - self:unexpected_token_error("a statement") - else - self:unexpected_token_error("an expression") - end + local what = (is_statement and "a statement" or "an expression") + self:unexpected_token_error(what) end end
honggfuzz.h: increase number of available PC guards to 64Mo - see for details
#define _HF_REPORT_FILE "HONGGFUZZ.REPORT.TXT" /* Default stack-size of created threads. */ -#define _HF_PTHREAD_STACKSIZE (1024 * 1024 * 2) /* 2MB */ +#define _HF_PTHREAD_STACKSIZE (1024ULL * 1024ULL * 2ULL) /* 2MB */ /* Name of envvar which indicates sequential number of fuzzer */ #define _HF_THREAD_NO_ENV "HFUZZ_THREAD_NO" /* Perf bitmap size */ #define _HF_PERF_BITMAP_SIZE_16M (1024U * 1024U * 16U) -#define _HF_PERF_BITMAP_BITSZ_MASK 0x7ffffff +#define _HF_PERF_BITMAP_BITSZ_MASK 0x7FFFFFFULL /* Maximum number of PC guards (=trace-pc-guard) we support */ -#define _HF_PC_GUARD_MAX (1024U * 1024U * 16U) +#define _HF_PC_GUARD_MAX (1024ULL * 1024ULL * 64ULL) /* Maximum size of the input file in bytes (128 MiB) */ -#define _HF_INPUT_MAX_SIZE (1024 * 1024 * 128) +#define _HF_INPUT_MAX_SIZE (1024ULL * 1024ULL * 128ULL) /* FD used to log inside the child process */ #define _HF_LOG_FD 1020
Fix error message on iOS 14
@@ -253,10 +253,16 @@ try: FONT_TEXT_STYLE_TITLE_2 = "UICTFontTextStyleTitle2" FONT_TEXT_STYLE_TITLE_3 = "UICTFontTextStyleTitle3" + try: FONT_LABEL_SIZE = __UIFont__.labelFontSize() FONT_BUTTON_SIZE = __UIFont__.buttonFontSize() FONT_SMALL_SYSTEM_SIZE = __UIFont__.smallSystemFontSize() FONT_SYSTEM_SIZE = __UIFont__.systemFontSize() + except TypeError: # iOS / iPadOS 14 + FONT_LABEL_SIZE = __UIFont__.labelFontSize + FONT_BUTTON_SIZE = __UIFont__.buttonFontSize + FONT_SMALL_SYSTEM_SIZE = __UIFont__.smallSystemFontSize + FONT_SYSTEM_SIZE = __UIFont__.systemFontSize PRESENTATION_MODE_SHEET = __PyView__.PresentationModeSheet PRESENTATION_MODE_FULLSCREEN = __PyView__.PresentationModeFullScreen
test: missing mark cases, further cleanup
+:: remaining cases to test: +:: call dud +:: take dud +:: TODO when can dud happen? +:: /+ *test /= khan-raw /sys/vane/khan =/ khan-gate (khan-raw ~nul) =/ results-0 (expect-eq !>(~) !>(born-moves)) =/ fyrd=(fyrd:khan (pair mark (cask))) [%base %nonexistent %noun %noun ~] =/ now=@da (add ~1111.1.1 ~s1) - =/ =dais:clay dais-noun - =/ args - :* ~ `%'khan-fyrd--0vsome.ductt' [~nul %base %da now] - %nonexistent (vale.dais ~) - == =^ start-moves khan-gate %- khan-call :* khan-gate ?> ?=(%pass -.q.fard-move) ?> ?=(%k -.note.q.fard-move) =* wir wire.q.fard-move - :: do not test the structure of wir; it is an implementation - :: detail. also do not plan the %fard move, i.e. suppose that - :: %khan is stateless. + :: XX may erroneously break if %khan keeps state dependent on + :: its inner %fard. :: =^ arow-moves khan-gate %- khan-take :* !>([~[//khan/0v0/1/0v0] %give %avow %| %watch-ack ~['fail']]) !>(mev) :(weld results-0 results-1 results-2) -:: remaining cases to test: -:: call dud -:: take dud -:: input/output mark scry failure -:: TODO when can dud happen? -:: +++ test-khan-fyrd-no-input-mark + =^ born-moves khan-gate + %- khan-call :* + khan-gate + ~1111.1.1 + scry-provides-mark + ~[/a] ~ %born ~ + == + %- expect-fail + |. + %- khan-call :* + khan-gate + (add ~1111.1.1 ~s1) + scry-provides-mark + ~[//khan/0v0/1/0v0] ~ + %fyrd %base %a %noun %bad-mark ~ + == +++ test-khan-fyrd-no-output-mark + =^ call-moves khan-gate + %- khan-call-all :* + khan-gate ~1111.1.1 ~s1 scry-provides-mark + :~ [~[/a] ~ %born ~] + [~[//khan/0v0/1/0v0] ~ %fyrd %base %a %bad-mark %noun ~] + == + == + %- expect-fail + |. + %- khan-take :* + khan-gate + ~1111.1.2 + scry-provides-mark + /fyrd/~nul/base/da/~1111.1.1..00.00.01/bad-mark + ~[//khan/0v0/1/0v0] ~ + [%khan %arow %& !>(~)] + == ++ khan-call |= $: khan-gate=_khan-gate now=@da
Add missing newline in one libpq error message. Oversight in commit Back-patch, as that was. Noted by Peter Eisentraut. Discussion:
@@ -1126,7 +1126,7 @@ initialize_SSL(PGconn *conn) if (!S_ISREG(buf.st_mode)) { printfPQExpBuffer(&conn->errorMessage, - libpq_gettext("private key file \"%s\" is not a regular file"), + libpq_gettext("private key file \"%s\" is not a regular file\n"), fnbuf); return -1; }
build: Add missing version.h dependency in vnet Two modules in vnet include vpp/app/version.h but there is no explicit build dependency for this generated file. This leaves a race condition in the build system that the Coverity build has recently started triggering. Type: fix
@@ -1583,7 +1583,7 @@ add_vpp_library(vnet INSTALL_HEADERS ${VNET_HEADERS} API_FILES ${VNET_API_FILES} LINK_LIBRARIES vppinfra svm vlib ${OPENSSL_LIBRARIES} - DEPENDS api_headers + DEPENDS vpp_version_h api_headers ) ##############################################################################
[tools] change the cpp eclipse project check function.
@@ -20,6 +20,8 @@ from utils import xml_indent import xml.etree.ElementTree as etree from xml.etree.ElementTree import SubElement +from building import * + MODULE_VER_NUM = 0 source_pattern = ['*.c', '*.cpp', '*.cxx', '*.s', '*.S', '*.asm'] @@ -139,11 +141,7 @@ def IsRttEclipsePathFormat(path): def IsCppProject(): - with open('.project', mode = 'r') as f: - for line in f.readlines(): - if line.find('org.eclipse.cdt.core.ccnature') != -1: - return True - return False + return GetDepend('RT_USING_CPLUSPLUS') def HandleToolOption(tools, env, project, reset):
VERSION bump to version 0.12.37
@@ -33,7 +33,7 @@ set(CMAKE_C_FLAGS_DEBUG "-g -O0") # set version set(LIBNETCONF2_MAJOR_VERSION 0) set(LIBNETCONF2_MINOR_VERSION 12) -set(LIBNETCONF2_MICRO_VERSION 36) +set(LIBNETCONF2_MICRO_VERSION 37) set(LIBNETCONF2_VERSION ${LIBNETCONF2_MAJOR_VERSION}.${LIBNETCONF2_MINOR_VERSION}.${LIBNETCONF2_MICRO_VERSION}) set(LIBNETCONF2_SOVERSION ${LIBNETCONF2_MAJOR_VERSION}.${LIBNETCONF2_MINOR_VERSION})
SOVERSION bump to version 2.28.7
@@ -66,7 +66,7 @@ set(LIBYANG_VERSION ${LIBYANG_MAJOR_VERSION}.${LIBYANG_MINOR_VERSION}.${LIBYANG_ # set version of the library set(LIBYANG_MAJOR_SOVERSION 2) set(LIBYANG_MINOR_SOVERSION 28) -set(LIBYANG_MICRO_SOVERSION 6) +set(LIBYANG_MICRO_SOVERSION 7) set(LIBYANG_SOVERSION_FULL ${LIBYANG_MAJOR_SOVERSION}.${LIBYANG_MINOR_SOVERSION}.${LIBYANG_MICRO_SOVERSION}) set(LIBYANG_SOVERSION ${LIBYANG_MAJOR_SOVERSION})
Address compilation issues with Java > 1.8 This patch addresses the changes in the JDK to build headers (javah no longer available)
@@ -71,9 +71,7 @@ jvpp-registry/io_fd_vpp_jvpp_VppJNIConnection.h: $(jvpp_registry_src_files) @echo " JVPP GEN $@" @rm -rf jvpp-registry/target @mkdir -p jvpp-registry/target - @$(JAVAC) -d jvpp-registry/target $^ - @$(JAVAH) -force -classpath jvpp-registry/target -d jvpp-registry io.fd.vpp.jvpp.VppJNIConnection - @$(JAVAH) -force -classpath jvpp-registry/target -d jvpp-registry io.fd.vpp.jvpp.JVppRegistryImpl + @$(JAVAC) -source 8 -target 8 -d jvpp-registry/target -h jvpp-registry $^ @touch jvpp-registry.ok define japigen @@ -83,11 +81,8 @@ define japigen -i $(jvpp_$(1)_json_files) @find jvpp-$(1)/target -name \*.java > jvpp-$(1).generated.files @find @srcdir@/jvpp-$(1) -name \*.java > jvpp-$(1).static.files - @$(JAVAC) -classpath jvpp-registry/target \ - -d jvpp-$(1)/target @jvpp-$(1).generated.files @jvpp-$(1).static.files - @$(JAVAH) -force \ - -classpath jvpp-registry/target:jvpp-$(1)/target \ - -d jvpp-$(1) io.fd.vpp.jvpp.$(1).$(2) + @$(JAVAC) -source 8 -target 8 -classpath jvpp-registry/target \ + -d jvpp-$(1)/target -h jvpp-$(1) @jvpp-$(1).generated.files @jvpp-$(1).static.files endef #
Distance CLI from the VM by removing memory allocator macro usage
@@ -15,8 +15,7 @@ void cleanupSockets(void) { #endif #include "../vm/common.h" -#include "../vm/memory.h" -#include "../vm/util.h" +#include "../vm/vm.h" #define VERSION "Dictu Version: 0.12.0\n" @@ -84,7 +83,7 @@ static void repl(VM *vm, int argc, char *argv[]) { while((line = linenoise(">>> ")) != NULL) { int fullLineLength = strlen(line); - char *fullLine = ALLOCATE(vm, char, fullLineLength + 1); + char *fullLine = malloc(sizeof(char) * (fullLineLength + 1)); snprintf(fullLine, fullLineLength + 1, "%s", line); linenoiseHistoryAdd(line); @@ -99,8 +98,7 @@ static void repl(VM *vm, int argc, char *argv[]) { return; } - - char *temp = GROW_ARRAY(vm, fullLine, char, fullLineLength, fullLineLength + lineLength); + char *temp = realloc(fullLine, sizeof(char) * fullLineLength + lineLength); if (temp == NULL) { printf("Unable to allocate memory\n"); @@ -118,7 +116,7 @@ static void repl(VM *vm, int argc, char *argv[]) { interpret(vm, "repl", fullLine); free(line); - FREE_ARRAY(vm, char, fullLine, fullLineLength + 1); + free(fullLine); } #else #define BUFFER_SIZE 8 @@ -160,10 +158,38 @@ static void repl(VM *vm, int argc, char *argv[]) { #endif } +static char *readFile(const char *path) { + FILE *file = fopen(path, "rb"); + if (file == NULL) { + return NULL; + } + + fseek(file, 0L, SEEK_END); + size_t fileSize = ftell(file); + rewind(file); + + char *buffer = malloc(sizeof(char) * (fileSize + 1)); + if (buffer == NULL) { + fprintf(stderr, "Not enough memory to read \"%s\".\n", path); + exit(74); + } + + size_t bytesRead = fread(buffer, sizeof(char), fileSize, file); + if (bytesRead < fileSize) { + fprintf(stderr, "Could not read file \"%s\".\n", path); + exit(74); + } + + buffer[bytesRead] = '\0'; + + fclose(file); + return buffer; +} + static void runFile(VM *vm, int argc, char *argv[]) { UNUSED(argc); - char *source = readFile(vm, argv[1]); + char *source = readFile(argv[1]); if (source == NULL) { fprintf(stderr, "Could not open file \"%s\".\n", argv[1]); @@ -171,7 +197,7 @@ static void runFile(VM *vm, int argc, char *argv[]) { } InterpretResult result = interpret(vm, argv[1], source); - FREE_ARRAY(vm, char, source, strlen(source) + 1); + free(source); if (result == INTERPRET_COMPILE_ERROR) exit(65); if (result == INTERPRET_RUNTIME_ERROR) exit(70);
better EXTENDED style
}, "jstyle_runner": { "formula": { - "sandbox_id": [390839884], + "sandbox_id": [441717449], "match": "JSTYLERUNNER" } },
DM USB: xHCI: add write function for extended capability registers. Some xHCI extended capabilities are writable. This patch adds the writing function for excap.
@@ -958,6 +958,17 @@ pci_xhci_portregs_write(struct pci_xhci_vdev *xdev, } } +static void +pci_xhci_excap_write(struct pci_xhci_vdev *xdev, uint64_t offset, + uint64_t value) +{ + /* TODO: The default extended capabilities are readonly. Need implement + * related write operations once writable capabilities get supported in + * future. + */ + UPRINTF(LWRN, "write invalid offset 0x%lx\r\n", offset); +} + struct xhci_dev_ctx * pci_xhci_get_dev_ctx(struct pci_xhci_vdev *xdev, uint32_t slot) { @@ -2732,6 +2743,8 @@ pci_xhci_write(struct vmctx *ctx, pci_xhci_dbregs_write(xdev, offset, value); else if (offset < xdev->excapoff) pci_xhci_rtsregs_write(xdev, offset, value); + else if (offset < xdev->regsend) + pci_xhci_excap_write(xdev, offset, value); else UPRINTF(LWRN, "write invalid offset %ld\r\n", offset);
mangoapp: disable checking vulkan layer for now
@@ -158,18 +158,18 @@ static void msg_read_thread(){ } else { steam_focused = false; } - if (!steam_focused && mangoapp_v1->pid != previous_pid){ - string path = "/tmp/mangoapp/" + to_string(mangoapp_v1->pid) + ".json"; - ifstream i(path); - if (i.fail()){ - sw_stats.engine = EngineTypes::GAMESCOPE; - } else { - json j; - i >> j; - sw_stats.engine = static_cast<EngineTypes> (j["engine"]); - } - previous_pid = mangoapp_v1->pid; - } + // if (!steam_focused && mangoapp_v1->pid != previous_pid){ + // string path = "/tmp/mangoapp/" + to_string(mangoapp_v1->pid) + ".json"; + // ifstream i(path); + // if (i.fail()){ + // sw_stats.engine = EngineTypes::GAMESCOPE; + // } else { + // json j; + // i >> j; + // sw_stats.engine = static_cast<EngineTypes> (j["engine"]); + // } + // previous_pid = mangoapp_v1->pid; + // } if (msg_size > offsetof(mangoapp_msg_v1, latency_ns)) gamescope_frametime(mangoapp_v1->app_frametime_ns, mangoapp_v1->latency_ns);
BugID:17023359:fix white scan issue
@@ -936,10 +936,6 @@ static int _dm_shw_array_int_set(_IN_ dm_shw_data_value_t *data_value, _IN_ void dm_shw_data_value_complex_t *complex_array = data_value->value; int int_set = (value == NULL) ? (0) : (*(int *)value); - if (((int *)(complex_array->value) + index) == NULL) { - return DM_INVALID_PARAMETER; - } - *((int *)(complex_array->value) + index) = int_set; dm_log_debug("Current Array Value Be Set(Int), Index: %d, Value: %d", index, *((int *)(complex_array->value) + index));
sanitizers: add detect_leaks=0 in regular (non-asan) mode
"wrap_signals=0:print_stats=1" /* If no sanitzer support was requested, simply make it use abort() on errors */ -#define kSAN_REGULAR "abort_on_error=1:handle_segv=0:allocator_may_return_null=1:symbolize=0" +#define kSAN_REGULAR "abort_on_error=1:handle_segv=0:allocator_may_return_null=1:symbolize=0:detect_leaks=0" /* * If the program ends with a signal that ASan does not handle (or can not
New ya
@@ -4,8 +4,8 @@ import sys import platform import json -URLS = ["https://storage.mds.yandex.net/get-devtools-opensource/233854/ff886c4c7cce4516a1f7050937c3cce7"] -MD5 = "ff886c4c7cce4516a1f7050937c3cce7" +URLS = ["https://storage.mds.yandex.net/get-devtools-opensource/250854/672122ed0e1710953407e0acda1cbafe"] +MD5 = "672122ed0e1710953407e0acda1cbafe" RETRIES = 5 HASH_PREFIX = 10
Update paths in REAME file to account for new location of file
@@ -826,12 +826,12 @@ examples/module and use that be build the ELF executables for the ROMFS file system. 6. Linker scripts. You might also want to use a linker scripts to combine - sections better. An example linker script is at nuttx/sched/module/gnu-elf.ld. + sections better. An example linker script is at nuttx/libc/modlib/gnu-elf.ld. That example might have to be tuned for your particular linker output to position additional sections correctly. The GNU LD LDMODULEFLAGS then might be: - LDMODULEFLAGS = -r -e module_initialize -T$(TOPDIR)/sched/module/gnu-elf.ld + LDMODULEFLAGS = -r -e module_initialize -T$(TOPDIR)/libc/modlib/gnu-elf.ld examples/modbus ^^^^^^^^^^^^^^^ @@ -1908,12 +1908,12 @@ examples/sotest and use that be build the ELF executables for the ROMFS file system. 6. Linker scripts. You might also want to use a linker scripts to combine - sections better. An example linker script is at nuttx/sched/module/gnu-elf.ld. + sections better. An example linker script is at nuttx/libc/modlib/gnu-elf.ld. That example might have to be tuned for your particular linker output to position additional sections correctly. The GNU LD LDMODULEFLAGS then might be: - LDMODULEFLAGS = -r -e module_initialize -T$(TOPDIR)/sched/module/gnu-elf.ld + LDMODULEFLAGS = -r -e module_initialize -T$(TOPDIR)/libc/modlib/gnu-elf.ld examples/system ^^^^^^^^^^^^^^^
Added -P/--output-pill argument
@@ -251,6 +251,8 @@ class sinkAction(argparse.Action): def construct_value(self, new_value): if self.which == 'output-file': return {self.which: new_value[::-1].replace('.','/',1)[::-1]} + elif self.which == 'output-pill': + return {self.which: new_value[::-1].replace('.','/',1)[::-1]} else: return {self.which: new_value} @@ -334,6 +336,9 @@ sinks.add_argument('-s', '--stdout', const={'stdout': None}, sinks.add_argument('-f', '--output-file', which='output-file', metavar='path', action=sinkAction) +sinks.add_argument('-P', '--output-pill', which='output-pill', + metavar='path', + action=sinkAction) sinks.add_argument('-C', '--output-clay', which='output-clay', metavar='clay-path', action=sinkAction) @@ -382,7 +387,9 @@ else: sys.exit(1) url = "http://localhost:%s" % PORT + r = requests.post(url, data=json.dumps(payload)) + if r.text[0] == '"': print r.text[1:-1].decode('string_escape') elif r.text[0] == '{':
add log func
#ifndef OMDEBUG_HPP_ #define OMDEBUG_HPP_ -#include <Arduino.h> #include <Eigen.h> +#define USB Serial +#define DEBUG SerialBT2 + +namespace LOG +{ +void init() +{ + DEBUG.begin(57600); +} + +void log(String form, String msg) +{ + DEBUG.println(form + msg); +} + +void INFO(String msg) +{ + log("[INFO] ", msg); +} + +void WARN(String msg) +{ + log("[WARN] ", msg); +} + +void ERROR(String msg) +{ + log("[ERROR] ", msg); +} + +// void print_mt3f(const Eigen::Matrix3f& m) +// { +// uint8_t i = 0 , j = 0; + +// for (i=0; i<3; i++) +// { +// for (j=0; j<3; j++) +// { +// Serial.print(m(i,j), 3); // print 6 decimal places +// Serial.print(", "); +// } +// Serial.println(); +// } +// Serial.println(); +// } + +// void print_vt3f(const Eigen::Vector3f& v) +// { +// uint8_t i = 0; + +// for (i=0; i<3; i++) +// { +// Serial.print(v(i), 3); +// Serial.print(", "); +// } +// Serial.println(); +// } + +// void print_mtXf(const Eigen::MatrixXf& m) +// { +// uint8_t i = 0 , j = 0; + +// for (i=0; i<m.rows(); i++) +// { +// for (j=0; j<m.cols(); j++) +// { +// Serial.print(m(i,j), 3); // print 6 decimal places +// Serial.print(", "); +// } +// Serial.println(); +// } +// Serial.println(); +// } + +// void print_vtXf(const Eigen::VectorXf& v) +// { +// uint8_t i = 0; + +// for (i=0; i<v.size(); i++) +// { +// Serial.print(v(i), 3); +// Serial.print(", "); +// } +// Serial.println(); +// } + +// void showJointAngle(String unit, OPMLink* link, int from, int to) +// { +// int num = 0; + +// if (unit == "rad") +// { +// for (num = from; num <= to; num++) +// { +// Serial.print(link[num].joint_angle_); +// Serial.print(" "); +// } +// Serial.println(""); +// } +// else if (unit == "deg") +// { +// for (num = from; num <= to; num++) +// { +// Serial.print(link[num].joint_angle_*RAD2DEG); +// Serial.print(" "); +// } +// Serial.println(""); +// } +// } + +// void showFKResult(OPMLink* link, int from, int to) +// { +// int num = 0; + +// for (num = from; num <= to; num++) +// { +// Serial.print("link : "); Serial.println(link[num].name_); +// Serial.println("p_ : "); print_vt3f(link[num].p_); +// Serial.println("R_ : "); print_mt3f(link[num].R_); +// } +// } + +} + /* Manager Error
nimble/ll: Do not fragment control PDUs Only data PDUs can be fragmented. Control PDUs are not fragmented and we assume that appropriate checks (e.g. remote features) were performed before putting control PDU on TX queue. This is required to properly send LL_SYNC_TRANSFER_IND which is 35 bytes long.
@@ -806,6 +806,11 @@ ble_ll_conn_tx_data_pdu(struct ble_ll_conn_sm *connsm) struct ble_ll_empty_pdu empty_pdu; ble_phy_tx_end_func txend_func; int tx_phy_mode; + uint8_t llid; +#if MYNEWT_VAL(BLE_LL_CFG_FEAT_LE_ENCRYPTION) + int is_ctrl; + uint8_t opcode; +#endif /* For compiler warnings... */ ble_hdr = NULL; @@ -870,12 +875,21 @@ ble_ll_conn_tx_data_pdu(struct ble_ll_conn_sm *connsm) ble_hdr = BLE_MBUF_HDR_PTR(m); /* - * We dequeued new packet for transmission so need to calculate payload - * length we can send over current PHY. Effectively, this determines - * fragmentation of packet into PDUs. + * We dequeued new packet for transmission. + * If this is a data PDU we need to calculate payload length we can send + * over current PHY. Effectively, this determines fragmentation of packet + * into PDUs. + * If this is a control PDU we send complete PDU as only data PDU can be + * fragmented. We assume that checks (i.e. if remote supports such PDU) + * were already performed before putting packet on queue. */ + llid = ble_hdr->txinfo.hdr_byte & BLE_LL_DATA_HDR_LLID_MASK; pktlen = pkthdr->omp_len; + if (llid == BLE_LL_LLID_CTRL) { + cur_txlen = pktlen; + } else { cur_txlen = ble_ll_conn_adjust_pyld_len(connsm, pktlen); + } ble_hdr->txinfo.pyld_len = cur_txlen; /* NOTE: header was set when first enqueued */ @@ -1039,10 +1053,6 @@ conn_tx_pdu: } #if MYNEWT_VAL(BLE_LL_CFG_FEAT_LE_ENCRYPTION) - int is_ctrl; - uint8_t llid; - uint8_t opcode; - llid = ble_hdr->txinfo.hdr_byte & BLE_LL_DATA_HDR_LLID_MASK; if (llid == BLE_LL_LLID_CTRL) { is_ctrl = 1;
Improve CMake file
@@ -48,10 +48,12 @@ option(ZYDIS_FUZZ_AFL_FAST option(ZYDIS_LIBFUZZER "Enables LLVM libfuzzer mode and reduces prints in ZydisFuzzIn" OFF) -option(ZYDIS_SYSTEM_ZYCORE + +# Dependencies +option(ZYAN_SYSTEM_ZYCORE "Use system Zycore library" OFF) -set(ZYDIS_ZYCORE_PATH +set(ZYAN_ZYCORE_PATH "${CMAKE_CURRENT_LIST_DIR}/dependencies/zycore" CACHE PATH @@ -61,12 +63,12 @@ set(ZYDIS_ZYCORE_PATH # Dependencies # # =============================================================================================== # -if (ZYDIS_SYSTEM_ZYCORE) +if (ZYAN_SYSTEM_ZYCORE) find_package(Zycore) else () # Try to initialize the Zycore submodule using Git - if (NOT EXISTS "${ZYDIS_ZYCORE_PATH}/CMakeLists.txt" AND - "${ZYDIS_ZYCORE_PATH}" STREQUAL "${CMAKE_CURRENT_LIST_DIR}/dependencies/zycore") + if (NOT EXISTS "${ZYAN_ZYCORE_PATH}/CMakeLists.txt" AND + "${ZYAN_ZYCORE_PATH}" STREQUAL "${CMAKE_CURRENT_LIST_DIR}/dependencies/zycore") find_package(Git QUIET) if(GIT_FOUND AND EXISTS "${PROJECT_SOURCE_DIR}/.git") execute_process( @@ -76,7 +78,7 @@ else () endif() endif () - if (NOT EXISTS "${ZYDIS_ZYCORE_PATH}/CMakeLists.txt") + if (NOT EXISTS "${ZYAN_ZYCORE_PATH}/CMakeLists.txt") message( FATAL_ERROR "Can't find zycore submodule. Please make sure to clone the repo recursively.\n" @@ -88,7 +90,7 @@ else () ) endif () - add_subdirectory(${ZYDIS_ZYCORE_PATH} "zycore" EXCLUDE_FROM_ALL) + add_subdirectory(${ZYAN_ZYCORE_PATH} "zycore" EXCLUDE_FROM_ALL) endif () # =============================================================================================== #
Add "none" build to CI
@@ -34,6 +34,7 @@ pipeline { make CXX=clang++ VEC=avx2 make CXX=clang++ VEC=sse4.1 make CXX=clang++ VEC=sse2 + make CXX=clang++ VEC=none ''' } } @@ -120,6 +121,7 @@ pipeline { make VEC=avx2 make VEC=sse4.1 make VEC=sse2 + make VEC=none ''' } }
Replaced As/s8 implementation by new norm_pk. I verified that the same results are obtained for the Cls as with previous implementation
#define W0 -1.0 #define WA 0.00 #define NS 0.96 -#define S8 0.80 +#define NORMPS 0.80 #define ZD 0.5 #define NZ 128 #define Z0_GC 0.50 @@ -39,8 +39,7 @@ int main(int argc,char **argv){ // Initialize cosmological parameters ccl_configuration config=default_config; config.transfer_function_method=ccl_bbks; - ccl_parameters params=ccl_parameters_create(OC,OB,OK,ON,W0,WA,HH,NAN,NS,-1,NULL,NULL); - params.sigma_8=S8; + ccl_parameters params=ccl_parameters_create(OC,OB,OK,ON,W0,WA,HH,NORMPS,NS,-1,NULL,NULL); // Initialize cosmology object given cosmo params ccl_cosmology *cosmo=ccl_cosmology_create(params,config);
libhfuzz: __sanitizer_cov_trace_const_cmp* doesn't need to be a weak alias to __sanitizer_cov_trace_cmp*
@@ -138,13 +138,13 @@ ATTRIBUTE_X86_REQUIRE_SSE42 void __sanitizer_cov_trace_cmp8(uint64_t Arg1, uint6 * now) */ void __sanitizer_cov_trace_const_cmp1(uint8_t Arg1, uint8_t Arg2) - __attribute__((weak, alias("__sanitizer_cov_trace_cmp1"))); + __attribute__((alias("__sanitizer_cov_trace_cmp1"))); void __sanitizer_cov_trace_const_cmp2(uint16_t Arg1, uint16_t Arg2) - __attribute__((weak, alias("__sanitizer_cov_trace_cmp2"))); + __attribute__((alias("__sanitizer_cov_trace_cmp2"))); void __sanitizer_cov_trace_const_cmp4(uint32_t Arg1, uint32_t Arg2) - __attribute__((weak, alias("__sanitizer_cov_trace_cmp4"))); + __attribute__((alias("__sanitizer_cov_trace_cmp4"))); void __sanitizer_cov_trace_const_cmp8(uint64_t Arg1, uint64_t Arg2) - __attribute__((weak, alias("__sanitizer_cov_trace_cmp8"))); + __attribute__((alias("__sanitizer_cov_trace_cmp8"))); /* * Cases[0] is number of comparison entries
SOVERSION bump to version 2.8.24
@@ -67,7 +67,7 @@ set(LIBYANG_VERSION ${LIBYANG_MAJOR_VERSION}.${LIBYANG_MINOR_VERSION}.${LIBYANG_ # set version of the library set(LIBYANG_MAJOR_SOVERSION 2) set(LIBYANG_MINOR_SOVERSION 8) -set(LIBYANG_MICRO_SOVERSION 23) +set(LIBYANG_MICRO_SOVERSION 24) set(LIBYANG_SOVERSION_FULL ${LIBYANG_MAJOR_SOVERSION}.${LIBYANG_MINOR_SOVERSION}.${LIBYANG_MICRO_SOVERSION}) set(LIBYANG_SOVERSION ${LIBYANG_MAJOR_SOVERSION})
Add "Edit Image" button to sprite tiles panel
@@ -7,6 +7,35 @@ import { spriteSheetSelectors } from "store/features/entities/entitiesState"; import editorActions from "store/features/editor/editorActions"; import entitiesActions from "store/features/entities/entitiesActions"; import { roundDown8 } from "lib/helpers/8bit"; +import styled from "styled-components"; +import l10n from "lib/helpers/l10n"; +import electronActions from "store/features/electron/electronActions"; + +const PillWrapper = styled.div` + position: absolute; + display: flex; + align-items: center; + bottom: 10px; + left: 10px; + z-index: 11; + border-radius: 16px; + background: ${(props) => props.theme.colors.document.background}; + box-shadow: 0 0 0 2px ${(props) => props.theme.colors.document.background}; + font-size: ${(props) => props.theme.typography.fontSize}; +`; + +const Pill = styled.button` + color: ${(props) => props.theme.colors.button.text}; + background: ${(props) => props.theme.colors.list.activeBackground}; + border: 0px; + border-radius: 16px; + padding: 3px 10px; + font-size: ${(props) => props.theme.typography.fontSize}; + + :active { + background: ${(props) => props.theme.colors.list.selectedBackground}; + } +`; interface SpriteTilePaletteProps { id: string; @@ -190,6 +219,17 @@ const SpriteTilePalette = ({ id, precisionMode }: SpriteTilePaletteProps) => { return () => {}; }, [isDragging, onDrag]); + const onEdit = useCallback(() => { + if (spriteSheet) { + dispatch( + electronActions.openFile({ + filename: `${projectRoot}/assets/sprites/${spriteSheet.filename}`, + type: "image", + }) + ); + } + }, [spriteSheet, dispatch, projectRoot]); + if (!spriteSheet) { return null; } @@ -213,6 +253,10 @@ const SpriteTilePalette = ({ id, precisionMode }: SpriteTilePaletteProps) => { minWidth: 0, }} > + <PillWrapper> + <Pill onClick={onEdit}>{l10n("FIELD_EDIT_IMAGE")}</Pill> + </PillWrapper> + <div style={{ display: "flex",
hark: correct link styling Fixes urbit/landscape#147
@@ -51,8 +51,8 @@ function describeNotification(description: string, plural: boolean) { } const GraphUrl = ({ url, title }) => ( - <Box borderRadius="1" p="2" bg="washedGray"> - <Anchor target="_blank" color="gray" href={url}> + <Box borderRadius="2" p="2" bg="scales.black05"> + <Anchor underline={false} target="_blank" color="black" href={url}> <Icon verticalAlign="bottom" mr="2" icon="ArrowExternal" /> {title} </Anchor>
router_optimise: add some NULL checks
@@ -1336,6 +1336,10 @@ router_optimise(router *r, int threshold) * expression we have defined. */ seq = 0; blast = bstart = blocks = ra_malloc(r->a, sizeof(block)); + if (blocks == NULL) { + logerr("out of memory allocating blocks, skipping optimisation\n"); + return; + } blocks->refcnt = 0; blocks->pattern = NULL; blocks->hash = 0; @@ -1348,6 +1352,11 @@ router_optimise(router *r, int threshold) if (rwalk->matchtype == MATCHALL || rwalk->dests->cl->type == REWRITE) { tracef("skipping %s\n", rwalk->pattern ? rwalk->pattern : "*"); blast->next = ra_malloc(r->a, sizeof(block)); + if (blast->next == NULL) { + logerr("out of memory allocating new block, " + "skipping optimisation\n"); + return; + } blast->next->prev = blast; blast = blast->next; blast->pattern = NULL; @@ -1394,6 +1403,11 @@ router_optimise(router *r, int threshold) /* nothing we can do with a pattern like this */ tracef("skipping unusable %s\n", p); blast->next = ra_malloc(r->a, sizeof(block)); + if (blast->next == NULL) { + logerr("out of memory allocating new block, " + "skipping optimisation\n"); + return; + } blast->next->prev = blast; blast = blast->next; blast->pattern = NULL; @@ -1431,6 +1445,11 @@ router_optimise(router *r, int threshold) tracef("skipping too small pattern %s from %s\n", b, rwalk->pattern); blast->next = ra_malloc(r->a, sizeof(block)); + if (blast->next == NULL) { + logerr("out of memory allocating new block, " + "skipping optimisation\n"); + return; + } blast->next->prev = blast; blast = blast->next; blast->pattern = NULL; @@ -1458,6 +1477,11 @@ router_optimise(router *r, int threshold) if (bwalk == NULL) { tracef("creating new group %s for %s\n", b, rwalk->pattern); blast->next = ra_malloc(r->a, sizeof(block)); + if (blast->next == NULL) { + logerr("out of memory allocating new block, " + "skipping optimisation\n"); + return; + } blast->next->prev = blast; blast = blast->next; blast->pattern = ra_strdup(r->a, b);
Make member declarations consistent.
@@ -65,7 +65,7 @@ class Backoff_ExponentialWithJitter : public IBackoff { } protected: - double m_initialValue, m_maximumValue, m_multiplier, m_jitter; + double m_initialValue {}, m_maximumValue {}, m_multiplier {}, m_jitter {}; double m_currentBase {}, m_currentRange {}, m_step {}; PAL::PseudoRandomGenerator m_rand;
sysdeps/managarm: Improve error handling in sys_ftruncate
@@ -4303,9 +4303,13 @@ int sys_ftruncate(int fd, size_t size) { managarm::fs::SvrResponse<MemoryAllocator> resp(getSysdepsAllocator()); resp.ParseFromArray(recv_resp->data, recv_resp->length); + if(resp.error() == managarm::fs::Errors::ILLEGAL_OPERATION_TARGET) { + return EINVAL; + } else { __ensure(resp.error() == managarm::fs::Errors::SUCCESS); return 0; } +} int sys_fallocate(int fd, off_t offset, size_t size) { SignalGuard sguard;
cli: Fix off-by-one in the pager The last line in the pager buffer was sometimes missed when using space/pg-dn; simple off-by-one error.
@@ -1832,7 +1832,7 @@ unix_cli_line_process_one (unix_cli_main_t * cm, case UNIX_CLI_PARSE_ACTION_PAGER_NEXT: case UNIX_CLI_PARSE_ACTION_PAGER_PGDN: /* show next page of the buffer */ - if (cf->height + cf->pager_start < vec_len (cf->pager_index)) + if (cf->height + cf->pager_start <= vec_len (cf->pager_index)) { u8 *line = NULL; unix_cli_pager_index_t *pi = NULL; @@ -1863,7 +1863,7 @@ unix_cli_line_process_one (unix_cli_main_t * cm, case UNIX_CLI_PARSE_ACTION_PAGER_DN: case UNIX_CLI_PARSE_ACTION_PAGER_CRLF: /* display the next line of the buffer */ - if (cf->pager_start < vec_len (cf->pager_index) - (cf->height - 1)) + if (cf->height + cf->pager_start <= vec_len (cf->pager_index)) { u8 *line; unix_cli_pager_index_t *pi;
Update netcore project for make it work with Guix.
@@ -41,17 +41,30 @@ if(OPTION_BUILD_GUIX) OUTPUT_VARIABLE DOTNET_SOURCE OUTPUT_STRIP_TRAILING_WHITESPACE ) + set(DOTNET_SOURCE --source ${DOTNET_SOURCE}) else() set(DOTNET_SOURCE) - message(FATAL_ERROR ".NET Core support not implemented in Guix build for versions less than 2.0.") + message(WARNING ".NET Core support not implemented in Guix build for versions less than 2.0.") endif() - message(STATUS "Using DotNet source ${DOTNET_SOURCE} for Guix build.") + set(DOTNET_ADDITIONAL_PACKAGES "" CACHE PATH "Define a folder for additional packages in NetCore.") + + if(DOTNET_ADDITIONAL_PACKAGES) + set(DOTNET_ADDITIONAL_PACKAGES_SOURCE --source ${DOTNET_ADDITIONAL_PACKAGES}) + else() + set(DOTNET_ADDITIONAL_PACKAGES_SOURCE) + endif() + + if(DOTNET_CORE_PATH) + set(DOTNET_CORE_PATH_SOURCE --source ${DOTNET_CORE_PATH}) + else() + set(DOTNET_CORE_PATH_SOURCE) + endif() # Build without internet access add_custom_target(${target} ALL - COMMAND ${DOTNET_COMMAND} restore --source ${DOTNET_SOURCE} ${CMAKE_CURRENT_SOURCE_DIR}/source/project.csproj - COMMAND ${DOTNET_COMMAND} publish --source ${DOTNET_SOURCE} ${CMAKE_CURRENT_SOURCE_DIR}/source/project.csproj -o ${CMAKE_BINARY_DIR} + COMMAND ${DOTNET_COMMAND} restore ${DOTNET_CORE_PATH_SOURCE} ${DOTNET_ADDITIONAL_PACKAGES_SOURCE} ${DOTNET_SOURCE} ${CMAKE_CURRENT_SOURCE_DIR}/source/project.csproj + COMMAND ${DOTNET_COMMAND} publish ${DOTNET_CORE_PATH_SOURCE} ${DOTNET_ADDITIONAL_PACKAGES_SOURCE} ${DOTNET_SOURCE} ${CMAKE_CURRENT_SOURCE_DIR}/source/project.csproj -o ${CMAKE_BINARY_DIR} ) else() if(DOTNET_VERSION VERSION_EQUAL "2.0" OR DOTNET_VERSION VERSION_GREATER "2.0")
Add theme support to search window
#include <mainwnd.h> #include <memsrch.h> #include <procprv.h> +#include <phsettings.h> #define WM_PH_MEMORY_STATUS_UPDATE (WM_APP + 301) @@ -582,6 +583,8 @@ INT_PTR CALLBACK PhpMemoryStringDlgProc( Button_SetCheck(GetDlgItem(hwndDlg, IDC_DETECTUNICODE), BST_CHECKED); Button_SetCheck(GetDlgItem(hwndDlg, IDC_PRIVATE), BST_CHECKED); + + PhInitializeWindowTheme(hwndDlg, PhEnableThemeSupport); } break; case WM_DESTROY:
Remove wrongly added EDE comments
@@ -1643,9 +1643,6 @@ processInit(struct module_qstate* qstate, struct val_qstate* vq, /* no retries, stop bothering the authority until timeout */ vq->restart_count = ve->max_restart; vq->chase_reply->security = sec_status_bogus; - - // @TODO ADD Error Code 6 - DNSSEC Bogus + text chain of trust? - vq->state = VAL_FINISHED_STATE; return 1; } @@ -1852,7 +1849,6 @@ processValidate(struct module_qstate* qstate, struct val_qstate* vq, LDNS_RR_TYPE_DNSKEY, vq->key_entry->key_class); vq->chase_reply->security = sec_status_bogus; errinf(qstate, "while building chain of trust"); - // @TODO ADD Error Code 6 - DNSSEC Bogus + text chain of trust? if(vq->restart_count >= ve->max_restart) key_cache_insert(ve->kcache, vq->key_entry, qstate); return 1;
Update telnet link
@@ -13,7 +13,7 @@ handle two led strips at the same time. **WARNING**: In dual mode, you will loose access to the Lua's console through the serial port (it will be reconfigured to support WS2812-like protocol). If you want to keep access to Lua's console, you will have to -use an other input channel like a TCP server (see [example](https://github.com/nodemcu/nodemcu-firmware/blob/master/examples/telnet.lua)) +use an other input channel like a TCP server (see [example](https://github.com/nodemcu/nodemcu-firmware/blob/master/lua_examples/telnet.lua)) ## ws2812.init() Initialize UART1 and GPIO2, should be called once and before write().
Fix build for jenkins test
@@ -54,6 +54,7 @@ RUN curl -L https://github.com/pyenv/pyenv-installer/raw/master/bin/pyenv-instal ENV PATH="/root/.pyenv/bin:/root/.pyenv/shims:${PATH}" RUN pyenv install 3.7.3 +RUN pyenv install 2.7.12 RUN pyenv global 3.7.3 RUN pyenv rehash @@ -68,6 +69,7 @@ ENV HOME /home/batman ENV PYTHONPATH /tmp:$PYTHONPATH COPY ./boardesp/get_sdk_ci.sh /tmp/panda/boardesp/ +COPY ./boardesp/python2_make.py /tmp/panda/boardesp/ RUN useradd --system -s /sbin/nologin pandauser RUN mkdir -p /tmp/panda/boardesp/esp-open-sdk
Ignoring long running syscall tests
"openat02_child", "open12", "fork09", - "pwritev03_64" + "pwritev03_64", + "fcntl15", + "fcntl14_64", + "fcntl15_64", + "fcntl36", + "fcntl14", + "fcntl36_64", + "fork14", + "sendfile09_64", + "sendfile09", + "sendmsg02" ] }, {
imlib: Add ImageIO finaliser to close the stream when deleted.
@@ -508,7 +508,7 @@ STATIC MP_DEFINE_CONST_FUN_OBJ_1(py_imageio_close_obj, py_imageio_close); STATIC mp_obj_t py_imageio_make_new(const mp_obj_type_t *type, size_t n_args, size_t n_kw, const mp_obj_t *args) { mp_arg_check_num(n_args, n_kw, 2, 2, false); - py_imageio_obj_t *stream = m_new_obj(py_imageio_obj_t); + py_imageio_obj_t *stream = m_new_obj_with_finaliser(py_imageio_obj_t); stream->base.type = &py_imageio_type; stream->closed = false; @@ -614,6 +614,7 @@ STATIC mp_obj_t py_imageio_make_new(const mp_obj_type_t *type, size_t n_args, si STATIC const mp_rom_map_elem_t py_imageio_locals_dict_table[] = { { MP_ROM_QSTR(MP_QSTR___name__), MP_ROM_QSTR(MP_QSTR_imageio) }, + { MP_ROM_QSTR(MP_QSTR___del__), MP_ROM_PTR(&py_imageio_close_obj) }, { MP_ROM_QSTR(MP_QSTR_FILE_STREAM), MP_ROM_INT(IMAGE_IO_FILE_STREAM) }, { MP_ROM_QSTR(MP_QSTR_MEMORY_STREAM), MP_ROM_INT(IMAGE_IO_MEMORY_STREAM) }, { MP_ROM_QSTR(MP_QSTR_type), MP_ROM_PTR(&py_imageio_get_type_obj) },
Fix auto-inclusion of module makefiles
@@ -176,7 +176,7 @@ ifdef MODULES MODULEDIRS = ${wildcard ${addprefix $(CONTIKI)/, $(UNIQUEMODULES)}} MODULES_SOURCES = ${foreach d, $(MODULEDIRS), ${subst ${d}/,,${wildcard $(d)/*.c}}} MODULES_INCLUDES = ${wildcard ${foreach d, $(MODULEDIRS), $(d)/Makefile.${notdir $(d)}}} - -include $(MODULE_INCLUDES) + include $(MODULES_INCLUDES) CONTIKI_SOURCEFILES += $(MODULES_SOURCES) endif
Fix some additional over-long lines
@@ -20,8 +20,8 @@ Mbed TLS is distributed under the Apache License, version 2.0. #### Platform Security Architecture (PSA) Arm's Platform Security Architecture (PSA) is a holistic set of threat models, -security analyses, hardware and firmware architecture specifications, and an open -source firmware reference implementation. PSA provides a recipe, based on +security analyses, hardware and firmware architecture specifications, and an +open source firmware reference implementation. PSA provides a recipe, based on industry best practice, that enables you to design security into both hardware and firmware consistently. Part of the API provided by PSA is the cryptography interface, which provides access to a set of primitives. @@ -204,8 +204,9 @@ symmetric cipher algorithms (both block and stream ciphers). **Prerequisites to working with the symmetric cipher API:** * Initialize the library with a successful call to `psa_crypto_init()`. -* Have a symmetric key. This key's usage flags must include `PSA_KEY_USAGE_ENCRYPT` - to allow encryption or `PSA_KEY_USAGE_DECRYPT` to allow decryption. +* Have a symmetric key. This key's usage flags must include + `PSA_KEY_USAGE_ENCRYPT` to allow encryption or `PSA_KEY_USAGE_DECRYPT` to + allow decryption. **To encrypt a message with a symmetric cipher:** 1. Allocate an operation (`psa_cipher_operation_t`) structure to pass to the @@ -602,11 +603,13 @@ including other keys and data, and functions to generate outputs, such as new keys or other data. You must first initialize and set up a key derivation context, -provided with a key and, optionally, other data. Then, use the key derivation context -to either read derived data to a buffer or send derived data directly to a key slot. +provided with a key and, optionally, other data. Then, use the key derivation +context to either read derived data to a buffer or send derived data directly +to a key slot. -See the documentation for the particular algorithm (such as HKDF or the TLS1.2 PRF) for -information about which inputs to pass when, and when you can obtain which outputs. +See the documentation for the particular algorithm (such as HKDF or the +TLS 1.2 PRF) for information about which inputs to pass when, and when you can +obtain which outputs. **Prerequisites to working with the key derivation APIs:** * Initialize the library with a successful call to `psa_crypto_init()`. @@ -623,11 +626,11 @@ with a given key, salt and info:** function, specifying the derivation algorithm `PSA_ALG_HKDF(PSA_ALG_SHA_256)`. 1. Provide an optional salt with `psa_key_derivation_input_bytes()`. 1. Provide info with `psa_key_derivation_input_bytes()`. -1. Provide a secret with `psa_key_derivation_input_key()`, referencing a key that - can be used for key derivation. +1. Provide a secret with `psa_key_derivation_input_key()`, referencing a key + that can be used for key derivation. 1. Set the key attributes desired for the new derived key. We'll set - the `PSA_KEY_USAGE_ENCRYPT` usage flag and the `PSA_ALG_CTR` algorithm for this - example. + the `PSA_KEY_USAGE_ENCRYPT` usage flag and the `PSA_ALG_CTR` algorithm for + this example. 1. Derive the key by calling `psa_key_derivation_output_key()`. 1. Clean up the key derivation context.
CBLK: Adjust timeout a little bit
#undef CONFIG_PRINT_STATUS /* health checking if needed */ #define CONFIG_MAX_RETRIES 5 -#define CONFIG_BUSY_TIMEOUT_SEC 4 +#define CONFIG_BUSY_TIMEOUT_SEC 5 #define CONFIG_REQ_TIMEOUT_SEC 3 #define CONFIG_REQ_DURATION_USEC 100000 /* usec */
fix volatile declaration on function pointer
@@ -153,7 +153,7 @@ static void mi_out_stderr(const char* msg) { // Should be atomic but gives errors on many platforms as generally we cannot cast a function pointer to a uintptr_t. // For now, don't register output from multiple threads. #pragma warning(suppress:4180) -static volatile mi_output_fun* mi_out_default; // = NULL +static mi_output_fun* volatile mi_out_default; // = NULL static mi_output_fun* mi_out_get_default(void) { mi_output_fun* out = mi_out_default;
Removes unecessary statement After other changes had taken place the call to PSA_ASSERT( psa_get_key_attributes( key, &attributes ) ) was no longer needed.
@@ -2481,7 +2481,6 @@ void aead_decrypt_setup( int key_type_arg, data_t *key_data, PSA_ASSERT( psa_import_key( &attributes, key_data->x, key_data->len, &key ) ); - PSA_ASSERT( psa_get_key_attributes( key, &attributes ) ); output_size = input_ciphertext->len;
removed delay_ms from loop
#include <stdio.h> #include <button.h> -#include <timer.h> #include <ieee802154.h> #include <udp.h> static unsigned char BUF_BIND_CFG[2 * sizeof(sock_addr_t)]; -static bool button_press; +static int button_press; void print_ipv6(ipv6_addr_t *); @@ -19,25 +18,10 @@ void print_ipv6(ipv6_addr_t *ipv6_addr) { printf("%02x%02x", ipv6_addr->addr[14], ipv6_addr->addr[15]); } -static void button_callback(__attribute__ ((unused)) int btn_num, - int val, - __attribute__ ((unused)) int arg2, - __attribute__ ((unused)) void *ud) { - if (val == 1) { - button_press = true; - } -} - int main(void) { - button_subscribe(button_callback, NULL); - int count = button_count(); - for (int i = 0; i < count; i++) { - button_enable_interrupt(i); - } - char packet[64]; - button_press = false; + button_press = 0; ieee802154_set_pan(0xABCD); ieee802154_config_commit(); @@ -74,10 +58,9 @@ int main(void) { while (1) { // wait for gpio pin to be pressed - while (!button_press) { - delay_ms(1); + while (button_press == 0) { + button_press = button_read(0); } - button_press = false; printf("Button press detected\n"); @@ -96,5 +79,10 @@ int main(void) { default: printf("Error sending packet %d\n", result); } + + // Debounce + while (button_press != 0) { + button_press = button_read(0); + } } }
link-store: ensure latest-first ordering of state We may %hear or %read content that was posted some time ago, so we need to make sure we add it at the appropriate position (wrt timestamp) rather than just sticking it at the head of the list.
:: add link to group submissions :: =/ =links (~(gut by by-group) path *links) - =. submissions.links [submission submissions.links] + =. submissions.links + (submissions:merge submissions.links ~[submission]) =. by-group (~(put by by-group) path links) :: add submission to global sites :: :: =/ urls (~(gut by discussions) path *(map ^url discussion)) =/ =discussion (~(gut by urls) url *discussion) - =. comments.discussion [comment comments.discussion] + =. comments.discussion + (comments:merge comments.discussion ~[comment]) =. urls (~(put by urls) url discussion) =. discussions (~(put by discussions) path urls) :: send updates to subscribers
storvsc_request_type: fix sense_info_len
@@ -104,7 +104,6 @@ enum storvsc_request_type { }; #define STORVSC_CDB_SIZE 16 -#define STORVSC_SENSE_SIZE 256 struct storvsc_hcb { struct list links; @@ -122,7 +121,7 @@ struct storvsc_hcb { u32 alloc_len; // allocated data length void *data; // allocated data - u8 sense[STORVSC_SENSE_SIZE]; + u8 sense[SENSE_BUFFER_SIZE]; }; @@ -1055,7 +1054,7 @@ static void create_storvsc_request(struct storvsc_hcb *hcb, struct hv_storvsc_re } reqp->sense_data = &hcb->sense; - reqp->sense_info_len = sizeof(&hcb->sense); + reqp->sense_info_len = sizeof(hcb->sense); reqp->hcb = hcb;
Separate function to encode CoAP header.
opencoap_vars_t opencoap_vars; //=========================== prototype ======================================= +void opencoap_header_encode(OpenQueueEntry_t *msg, + uint8_t version, + coap_type_t type, + uint8_t TKL, + coap_code_t code, + uint16_t messageID, + uint8_t *token); + //=========================== public ========================================== //===== from stack @@ -411,14 +419,13 @@ void opencoap_receive(OpenQueueEntry_t* msg) { memcpy(&msg->l3_destinationAdd.addr_128b[0],&msg->l3_sourceAdd.addr_128b[0],LENGTH_ADDR128b); // fill in CoAP header - packetfunctions_reserveHeaderSize(msg,4+coap_header.TKL); - msg->payload[0] = (COAP_VERSION << 6) | - (response_type << 4) | - (coap_header.TKL << 0); - msg->payload[1] = coap_header.Code; - msg->payload[2] = coap_header.messageID/256; - msg->payload[3] = coap_header.messageID%256; - memcpy(&msg->payload[4], &coap_header.token[0], coap_header.TKL); + opencoap_header_encode(msg, + COAP_VERSION, + response_type, + coap_header.TKL, + coap_header.Code, + coap_header.messageID, + &coap_header.token[0]); if ((openudp_send(msg))==E_FAIL) { openqueue_freePacketBuffer(msg); @@ -646,15 +653,7 @@ owerror_t opencoap_send( class); // pre-pend CoAP header (version,type,TKL,code,messageID,Token) - packetfunctions_reserveHeaderSize(msg,4+request->TKL); - msg->payload[0] = (COAP_VERSION << 6) | - (type << 4) | - (request->TKL << 0); - msg->payload[1] = code; - msg->payload[2] = (request->messageID>>8) & 0xff; - msg->payload[3] = (request->messageID>>0) & 0xff; - - memcpy(&msg->payload[4],&token,request->TKL); + opencoap_header_encode(msg, COAP_VERSION, type, request->TKL, code, request->messageID, request->token); return openudp_send(msg); } @@ -893,4 +892,22 @@ uint8_t opencoap_options_parse( return index; } +void opencoap_header_encode(OpenQueueEntry_t *msg, + uint8_t version, + coap_type_t type, + uint8_t TKL, + coap_code_t code, + uint16_t messageID, + uint8_t *token) { + // pre-pend CoAP header (version,type,TKL,code,messageID,Token) + packetfunctions_reserveHeaderSize(msg,4+TKL); + msg->payload[0] = (version << 6) | + (type << 4) | + (TKL << 0); + msg->payload[1] = code; + msg->payload[2] = (messageID>>8) & 0xff; + msg->payload[3] = (messageID>>0) & 0xff; + + memcpy(&msg->payload[4],token,TKL); +}
C11 %zd is bit overkill here. Especially requiring conditional compile.
@@ -90,11 +90,7 @@ void print_json_object(json_t *element, int indent) { print_json_indent(indent); size = json_object_size(element); -#if defined(__STDC_VERSION__) && __STDC_VERSION__ >= 201112L - printf("JSON Object of %zd pair%s:\n", size, json_plural(size)); -#else printf("JSON Object of %lld pair%s:\n", (long long)size, json_plural(size)); -#endif json_object_foreach(element, key, value) { print_json_indent(indent + 2); printf("JSON Key: \"%s\"\n", key); @@ -107,11 +103,7 @@ void print_json_array(json_t *element, int indent) { size_t size = json_array_size(element); print_json_indent(indent); -#if defined(__STDC_VERSION__) && __STDC_VERSION__ >= 201112L - printf("JSON Array of %zd element%s:\n", size, json_plural(size)); -#else printf("JSON Array of %lld element%s:\n", (long long)size, json_plural(size)); -#endif for (i = 0; i < size; i++) { print_json_aux(json_array_get(element, i), indent + 2); }
RTX5: corrected typo in Cortex-A core header
@@ -80,7 +80,7 @@ __STATIC_INLINE uint32_t xPSR_InitVal (bool_t privileged, bool_t thumb) { // - Basic: R4-R11, R0-R3, R12, LR, PC, CPSR /// Stack Frame Initialization Value -#define STACK_FRAME_INIT 0x00U +#define STACK_FRAME_INIT_VAL 0x00U /// Stack Offset of Register R0 /// \param[in] stack_frame Stack Frame @@ -159,7 +159,6 @@ __STATIC_INLINE bool_t IsIrqMode (void) { /// \return true=masked, false=not masked __STATIC_INLINE bool_t IsIrqMasked (void) { return FALSE; -#endif }
VERSION bump to version 1.1.37
@@ -40,7 +40,7 @@ set(CMAKE_C_FLAGS_PACKAGE "-g -O2 -DNDEBUG") # micro version is changed with a set of small changes or bugfixes anywhere in the project. set(LIBNETCONF2_MAJOR_VERSION 1) set(LIBNETCONF2_MINOR_VERSION 1) -set(LIBNETCONF2_MICRO_VERSION 36) +set(LIBNETCONF2_MICRO_VERSION 37) set(LIBNETCONF2_VERSION ${LIBNETCONF2_MAJOR_VERSION}.${LIBNETCONF2_MINOR_VERSION}.${LIBNETCONF2_MICRO_VERSION}) # Version of the library
Do not match RFC 5114 groups without q as it is significant
@@ -110,7 +110,9 @@ const DH_NAMED_GROUP *ossl_ffc_numbers_to_dh_named_group(const BIGNUM *p, if (BN_cmp(p, dh_named_groups[i].p) == 0 && BN_cmp(g, dh_named_groups[i].g) == 0 /* Verify q is correct if it exists */ - && (q == NULL || BN_cmp(q, dh_named_groups[i].q) == 0)) + && ((q != NULL && BN_cmp(q, dh_named_groups[i].q) == 0) + /* Do not match RFC 5114 groups without q */ + || (q == NULL && dh_named_groups[i].uid > 3))) return &dh_named_groups[i]; } return NULL;
qlog-adapter: Add handler for `max_streams_receive` The `receive` handler is missing while the `send` version exists. I assume this is due to an error.
@@ -137,6 +137,17 @@ def handle_max_streams_send(event): "maximum": event["maximum"] } +def handle_max_streams_receive(event): + if event["is-unidirectional"]: + stream_type = "unidirectional" + else: + stream_type = "bidirectional" + return { + "frame_type": "max_streams", + "stream_type": stream_type, + "maximum": event["maximum"] + } + def handle_max_stream_data_receive(event): return { "frame_type": "max_stream_data", @@ -304,6 +315,7 @@ FRAME_EVENT_HANDLERS = { "max-data-receive": handle_max_data_receive, "max-data-send": handle_max_data_send, "max-streams-send": handle_max_streams_send, + "max-streams-receive": handle_max_streams_receive, "max-stream-data-receive": handle_max_stream_data_receive, "max-stream-data-send": handle_max_stream_data_send, "new-connection-id-receive": handle_new_connection_id_receive,
Fix bug that extra ngtcp2_ack_entry is removed
@@ -881,6 +881,10 @@ static int conn_create_ack_frame(ngtcp2_conn *conn, ngtcp2_frame **pfr, ngtcp2_ksl_it_next(&it); for (; !ngtcp2_ksl_it_end(&it); ngtcp2_ksl_it_next(&it)) { + if (ack->num_blks == NGTCP2_MAX_ACK_BLKS) { + break; + } + rpkt = ngtcp2_ksl_it_get(&it); blk_idx = ack->num_blks++; @@ -895,10 +899,6 @@ static int conn_create_ack_frame(ngtcp2_conn *conn, ngtcp2_frame **pfr, blk->blklen = rpkt->len - 1; last_pkt_num = rpkt->pkt_num - (int64_t)(rpkt->len - 1); - - if (ack->num_blks == NGTCP2_MAX_ACK_BLKS) { - break; - } } /* TODO Just remove entries which cannot fit into a single ACK frame
Updater: Add PhGetKernelFileName2 and PhGetFileVersionInfoEx
@@ -207,9 +207,8 @@ PPH_STRING UpdateWindowsString( VS_FIXEDFILEINFO* rootBlock; PH_FORMAT fileVersionFormat[3]; - fileName = PhGetKernelFileName(); - PhMoveReference(&fileName, PhGetFileName(fileName)); - versionInfo = PhGetFileVersionInfo(fileName->Buffer); + fileName = PhGetKernelFileName2(); + versionInfo = PhGetFileVersionInfoEx(&fileName->sr); PhDereferenceObject(fileName); if (versionInfo)
king: disable "bullshit scry tester"
@@ -362,6 +362,7 @@ pier (serf, log) vSlog startedSig multi = do void $ atomically $ tryPutTMVar saveSig () -- TODO bullshit scry tester + when False $ do void $ acquireWorker "bullshit scry tester" $ do env <- ask forever $ do
docs: make Items display by list Fix issue
@@ -26,17 +26,15 @@ The intended readers of this article are customers who integrate the BoAT IoT Fr BoAT IoT Framework is a C language blockchain client framework software for cellular modules, which is easy to be ported to various modules and helps IoT applications based on cellular modules connect to the blockchain and access on-chain services. The functions provided by the BoAT IoT Framework SDK to IoT applications include initiating on-chain transactions, automatic generation of smart contract C interface code, calling smart contracts, and managing blockchain keys. **Supported blockchain:** -Ethereum -PlatON -PlatONE -FISCO-BCOS -Hyperledger Fabric - +Ethereum<br> +PlatON<br> +PlatONE<br> +FISCO-BCOS<br> +Hyperledger Fabric<br> **Supported Target Operating System:** -Linux -RTOS - +Linux<br> +RTOS<br> **Supported Build Operating System:** Linux/Cygwin
vm: fixed freeing contiguous object
@@ -120,10 +120,16 @@ int vm_objectPut(vm_object_t *o) proc_lockDone(&o->lock); + /* Contiguous object 'holds' all pages in pages[0] */ + if ((o->oid.port == -1) && (o->oid.id == -1)) { + vm_pageFree(o->pages[0]); + } + else { for (i = 0; i < round_page(o->size) / SIZE_PAGE; ++i) { if (o->pages[i] != NULL) vm_pageFree(o->pages[i]); } + } vm_kfree(o); @@ -240,11 +246,14 @@ vm_object_t *vm_objectContiguous(size_t size) } hal_memset(o, 0, sizeof(*o)); + /* Mark object as contiguous by setting its oid.port and oid.id to -1 */ + o->oid.port = -1; + o->oid.id = -1; o->refs = 1; o->size = size; proc_lockInit(&o->lock); - for (i = 0; i < size / SIZE_PAGE; ++i) + for (i = 0; i < n; ++i) o->pages[i] = p + i; return o;
examples: fix handle passed to `esp_https_ota_is_complete_data_received`
@@ -87,7 +87,7 @@ void advanced_ota_example_task(void *pvParameter) ESP_LOGD(TAG, "Image bytes read: %d", esp_https_ota_get_image_len_read(https_ota_handle)); } - if (esp_https_ota_is_complete_data_received(&https_ota_handle) != true) { + if (esp_https_ota_is_complete_data_received(https_ota_handle) != true) { // the OTA image was not completely received and user can customise the response to this situation. ESP_LOGE(TAG, "Complete data was not received."); } @@ -99,7 +99,7 @@ ota_end: vTaskDelay(1000 / portTICK_PERIOD_MS); esp_restart(); } else { - ESP_LOGE(TAG, "ESP_HTTPS_OTA upgrade failed..."); + ESP_LOGE(TAG, "ESP_HTTPS_OTA upgrade failed %d", ota_finish_err); } while (1) {
fix(memory leak): add exception catch to platon demo.
@@ -240,7 +240,7 @@ BOAT_RESULT platonTransfer(BoatPlatONWallet *wallet_ptr) int main(int argc, char *argv[]) { BOAT_RESULT result = BOAT_SUCCESS; - + boat_try_declare; /* step-1: Boat SDK initialization */ BoatIotSdkInit(); @@ -256,12 +256,14 @@ int main(int argc, char *argv[]) result = platon_loadPersistWallet("platon.cfg"); #else //BoatLog(BOAT_LOG_NORMAL, ">>>>>>>>> none wallet type selected."); - return -1; + //return -1; + result = BOAT_ERROR; #endif if (result != BOAT_SUCCESS) { //BoatLog(BOAT_LOG_CRITICAL, "platonWalletPrepare_create failed : %d.", result); - return -1; + //return -1; + boat_throw(result, platon_demo_catch); } /* step-3: execute balance transfer */ @@ -269,20 +271,14 @@ int main(int argc, char *argv[]) if (result != BOAT_SUCCESS) { //BoatLog(BOAT_LOG_NORMAL, "PlatON get balance Failed: %d.", result); - } - else - { - //BoatLog(BOAT_LOG_NORMAL, "PlatON get balance success."); + boat_throw(result, platon_demo_catch); } result = platonTransfer(g_platon_wallet_ptr); if (result != BOAT_SUCCESS) { //BoatLog(BOAT_LOG_NORMAL, "PlatON get balance Failed: %d.", result); - } - else - { - //BoatLog(BOAT_LOG_NORMAL, "PlatON get balance success."); + boat_throw(result, platon_demo_catch); } @@ -295,7 +291,9 @@ int main(int argc, char *argv[]) { //BoatLog(BOAT_LOG_NORMAL, "PlatON get balance success."); } - + boat_catch(platon_demo_catch) + { + } /* step-4: Boat SDK Deinitialization */ BoatIotSdkDeInit();
Fix cpu usage formatting (float parsed as int)
@@ -1124,12 +1124,11 @@ void render_benchmark(swapchain_stats& data, struct overlay_params& params, ImVe ImGui::PopStyleColor(2); ImGui::End(); } + void render_mango(swapchain_stats& data, struct overlay_params& params, ImVec2& window_size, bool is_vulkan){ static int tableCols = 2; static float ralign_width = 0, old_scale = 0; window_size = ImVec2(300, params.height); - unsigned height = ImGui::GetIO().DisplaySize.y; - auto now = Clock::now(); if (old_scale != params.font_scale) { ralign_width = ImGui::CalcTextSize("A").x * 4 /* characters */; @@ -1159,7 +1158,7 @@ void render_mango(swapchain_stats& data, struct overlay_params& params, ImVec2& cpu_text = params.cpu_text.c_str(); ImGui::TextColored(ImGui::ColorConvertU32ToFloat4(params.cpu_color), "%s", cpu_text); ImGui::TableNextCell(); - right_aligned_text(ralign_width, "%d", cpuStats.GetCPUDataTotal().percent); + right_aligned_text(ralign_width, "%d", int(cpuStats.GetCPUDataTotal().percent)); ImGui::SameLine(0, 1.0f); ImGui::Text("%%"); } @@ -1272,7 +1271,7 @@ void render_imgui(swapchain_stats& data, struct overlay_params& params, ImVec2& cpu_text = params.cpu_text.c_str(); ImGui::TextColored(ImGui::ColorConvertU32ToFloat4(params.cpu_color), "%s", cpu_text); ImGui::TableNextCell(); - right_aligned_text(ralign_width, "%d", cpuStats.GetCPUDataTotal().percent); + right_aligned_text(ralign_width, "%d", int(cpuStats.GetCPUDataTotal().percent)); ImGui::SameLine(0, 1.0f); ImGui::Text("%%"); // ImGui::SameLine(150);
added last hcxpcapngtool changes
+25.08.2021 +========== +hcxpcapngtool: advanced handling of BEACON and PROBERESPOSNE frames + distinguish between SSID set, SSID unset and SSID zeroed + + 20.06.2021 ========== Makefile: added compiler flag to disable zlib support
Test PI in big-endian
@@ -5495,6 +5495,29 @@ START_TEST(test_utf16_pi) } END_TEST +START_TEST(test_utf16_be_pi) +{ + const char text[] = + /* <?{KHO KHWAI}{CHO CHAN}?> + * where {KHO KHWAI} = U+0E04 + * and {CHO CHAN} = U+0E08 + */ + "\0<\0?\x0e\x04\x0e\x08\0?\0>" + /* <q/> */ + "\0<\0q\0/\0>"; + const XML_Char *expected = "\xe0\xb8\x84\xe0\xb8\x88: \n"; + CharData storage; + + CharData_Init(&storage); + XML_SetProcessingInstructionHandler(parser, accumulate_pi_characters); + XML_SetUserData(parser, &storage); + if (_XML_Parse_SINGLE_BYTES(parser, text, sizeof(text)-1, + XML_TRUE) == XML_STATUS_ERROR) + xml_failure(parser); + CharData_CheckXMLChars(&storage, expected); +} +END_TEST + /* Test that the unknown encoding handler with map entries that expect * conversion but no conversion function is faulted */ @@ -11866,6 +11889,7 @@ make_suite(void) tcase_add_test(tc_basic, test_pi_xnl); tcase_add_test(tc_basic, test_pi_xmm); tcase_add_test(tc_basic, test_utf16_pi); + tcase_add_test(tc_basic, test_utf16_be_pi); tcase_add_test(tc_basic, test_missing_encoding_conversion_fn); tcase_add_test(tc_basic, test_failing_encoding_conversion_fn); tcase_add_test(tc_basic, test_unknown_encoding_success);
docs(flex) fix typo in flex grow section
@@ -70,7 +70,7 @@ For example let's there is 400 px remaining space and 4 object with grow: `A` and `B` will have 100 px size, and `C` will have 200 px size. -Flex grow can be set on a child with `lv_obj_set_flex_flow(child, value)`. `value` needs to be &gt; 1 or 0 to disable grow on the child. +Flex grow can be set on a child with `lv_obj_set_flex_grow(child, value)`. `value` needs to be &gt; 1 or 0 to disable grow on the child. ## Style interface
Only use language part of locale string
@@ -2,13 +2,16 @@ import electron from "electron"; import en from "../../lang/en"; const app = electron.app || electron.remote.app; -const locale = app.getLocale(); +const locale = app.getLocale().split('-').shift(); let languageOverrides = {}; + +if (locale && locale !== "en") { try { languageOverrides = require(`../../lang/${locale}.json`); } catch (e) { - // No language pack for user setting, falling back to en + console.warn("No language pack for user setting, falling back to en"); + } } const translations = Object.keys(en).reduce((memo, key) => {
Docs: Update SSDT-PLUG.dsl, thx to gengik84
* Please note that this table is only a sample and may need to be * adapted to fit your board's ACPI stack. For instance, both scope * and device name may vary (e.g. _SB_.PR00 instead of _PR_.CPU0). + * + * While the table contains several examples of CPU paths, you should + * remove all the ones irrelevant for your board. */ DefinitionBlock ("", "SSDT", 2, "ACDT", "CpuPlug", 0x00003000) { - External (_PR_.CPU0, ProcessorObj) + External (_SB_.CPU0, DeviceObj) + External (_PR_.CPU0, DeviceObj) + External (_SB_.PR00, DeviceObj) + External (_PR_.PR00, DeviceObj) + External (_SB_.SCK0.CP00, DeviceObj) - Scope (\_PR.CPU0) - { - Method (DTGP, 5, NotSerialized) - { - If ((Arg0 == ToUUID ("a0b5b7c6-1318-441c-b0c9-fe695eaf949b"))) - { - If ((Arg1 == One)) - { - If ((Arg2 == Zero)) - { - Arg4 = Buffer (One) - { - 0x03 // . + If (CondRefOf (\_SB.CPU0)) { + Scope (\_SB.CPU0) { + Method (_DSM, 4, NotSerialized) { + If (LEqual (Arg2, Zero)) { + Return (Buffer (One) { 0x03 }) + } + + Return (Package (0x02) { + "plugin-type", + One + }) + } } - Return (One) } - If ((Arg2 == One)) - { - Return (One) + If (CondRefOf (\_PR.CPU0)) { + Scope (\_PR.CPU0) { + Method (_DSM, 4, NotSerialized) { + If (LEqual (Arg2, Zero)) { + Return (Buffer (One) { 0x03 }) + } + + Return (Package (0x02) { + "plugin-type", + One + }) } } } - Arg4 = Buffer (One) - { - 0x00 // . + If (CondRefOf (\_SB.PR00)) { + Scope (\_SB.PR00) { + Method (_DSM, 4, NotSerialized) { + If (LEqual (Arg2, Zero)) { + Return (Buffer (One) { 0x03 }) + } + + Return (Package (0x02) { + "plugin-type", + One + }) + } } - Return (Zero) } - Method (_DSM, 4, NotSerialized) // _DSM: Device-Specific Method - { - Local0 = Package (0x02) - { + If (CondRefOf (\_PR.PR00)) { + Scope (\_PR.PR00) { + Method (_DSM, 4, NotSerialized) { + If (LEqual (Arg2, Zero)) { + Return (Buffer (One) { 0x03 }) + } + + Return (Package (0x02) { + "plugin-type", + One + }) + } + } + } + + If (CondRefOf (\_SB.SCK0.CP00)) { + Scope (\_SB.SCK0.CP00) { + Method (_DSM, 4, NotSerialized) { + If (LEqual (Arg2, Zero)) { + Return (Buffer (One) { 0x03 }) + } + + Return (Package (0x02) { "plugin-type", One + }) } - DTGP (Arg0, Arg1, Arg2, Arg3, RefOf (Local0)) - Return (Local0) } } }
Switch deprecation method for BIO
@@ -731,12 +731,13 @@ int BIO_sock_init(void); # define BIO_sock_cleanup() while(0) continue # endif int BIO_set_tcp_ndelay(int sock, int turn_on); - -DEPRECATEDIN_1_1_0(struct hostent *BIO_gethostbyname(const char *name)) -DEPRECATEDIN_1_1_0(int BIO_get_port(const char *str, unsigned short *port_ptr)) -DEPRECATEDIN_1_1_0(int BIO_get_host_ip(const char *str, unsigned char *ip)) -DEPRECATEDIN_1_1_0(int BIO_get_accept_socket(char *host_port, int mode)) -DEPRECATEDIN_1_1_0(int BIO_accept(int sock, char **ip_port)) +# ifndef OPENSSL_NO_DEPRECATED_1_1_0 +OSSL_DEPRECATEDIN_1_1_0 struct hostent *BIO_gethostbyname(const char *name); +OSSL_DEPRECATEDIN_1_1_0 int BIO_get_port(const char *str, unsigned short *port_ptr); +OSSL_DEPRECATEDIN_1_1_0 int BIO_get_host_ip(const char *str, unsigned char *ip); +OSSL_DEPRECATEDIN_1_1_0 int BIO_get_accept_socket(char *host_port, int mode); +OSSL_DEPRECATEDIN_1_1_0 int BIO_accept(int sock, char **ip_port); +# endif union BIO_sock_info_u { BIO_ADDR *addr;
removes hardcoded-url in :acme tests
:: ++ test-first-order-wake =^ moves app (~(wake app *bowl:gall *acme:app) /acme/try/1/directory ~) - =/ url - =- (need (de-purl:html -)) - 'https://acme-staging-v02.api.letsencrypt.org/directory' %+ expect-eq - !> ~[[ost.bow.app [%hiss /acme/try/2/directory ~ %httr %hiss url %get ~ ~]]] + !> ~[[ost.bow.app [%hiss /acme/try/2/directory ~ %httr %hiss directory-base:app %get ~ ~]]] !> moves --
Fix OpenSSL API usage bug.
@@ -1583,7 +1583,7 @@ http_x509_add_san(X509 *cert, // I - Certificate return; ASN1_OCTET_STRING_set(san_asn1, (unsigned char *)dns_name, strlen(dns_name)); - if (!X509_EXTENSION_create_by_NID(&san_ext, NID_subject_alt_name, 0, san_asn1)) + if ((san_ext = X509_EXTENSION_create_by_NID(NULL, NID_subject_alt_name, 0, san_asn1)) == NULL) { ASN1_OCTET_STRING_free(san_asn1); return;
relay: update copyright
/* - * Copyright 2013-2019 Fabian Groffen + * Copyright 2013-2020 Fabian Groffen * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License.
io: tls: fix hard-coded value in error message. Changing the hard-coded value `/etc/ssl/certs` to the variable `ca_path`. The user could enter a different value for `ca_path` in the `.conf` file. When this happens, this error displays incorrect path.
@@ -118,7 +118,7 @@ struct flb_tls_context *flb_tls_context_new(int verify, ret = mbedtls_x509_crt_parse_path(&ctx->ca_cert, ca_path); if (ret < 0) { io_tls_error(ret); - flb_error("[TLS] error reading certificates from /etc/ssl/certs/"); + flb_error("[TLS] error reading certificates from %s", ca_path); goto error; } }
Add BUILD_SHARED_LIBS option Fix
@@ -92,6 +92,7 @@ option (PIO_USE_MPIIO "Enable support for MPI-IO auto detect" ON) option (PIO_USE_MPISERIAL "Enable mpi-serial support (instead of MPI)" OFF) option (PIO_USE_PNETCDF_VARD "Use pnetcdf put_vard " OFF) option (WITH_PNETCDF "Require the use of PnetCDF" ON) +option (BUILD_SHARED_LIBS "Build shared libraries" ON) if(APPLE) # The linker on macOS does not include `common symbols` by default
Nightly builds: add kernel libraries This change adds the klibs to the nightly tarballs. Closes
@@ -40,7 +40,7 @@ jobs: - run: sudo gcloud config set project ${GOOGLE_PROJECT_ID} - run: gcloud --quiet config set compute/zone ${GOOGLE_COMPUTE_ZONE} - - run: mkdir temp && cp output/platform/pc/bin/kernel.img temp/ && cp output/platform/pc/boot/boot.img temp/ && cp output/tools/bin/mkfs temp/ + - run: mkdir temp && cp output/platform/pc/bin/kernel.img temp/ && cp output/platform/pc/boot/boot.img temp/ && cp output/tools/bin/mkfs temp/ && mkdir temp/klibs && cp output/klib/bin/* temp/klibs - run: cd temp && tar cvzf nanos-nightly-linux.tar.gz * && gsutil cp nanos-nightly-linux.tar.gz gs://nanos/release/nightly - run: gsutil acl ch -u AllUsers:R gs://nanos/release/nightly/nanos-nightly-linux.tar.gz - run: rm -r temp @@ -92,7 +92,7 @@ jobs: - run: sudo gcloud config set project ${GOOGLE_PROJECT_ID} - run: gcloud --quiet config set compute/zone ${GOOGLE_COMPUTE_ZONE} - - run: mkdir temp && cp output/platform/pc/bin/kernel.img temp/ && cp output/platform/pc/boot/boot.img temp/ && cp output/tools/bin/mkfs temp/ + - run: mkdir temp && cp output/platform/pc/bin/kernel.img temp/ && cp output/platform/pc/boot/boot.img temp/ && cp output/tools/bin/mkfs temp/ && mkdir temp/klibs && cp output/klib/bin/* temp/klibs - run: cd temp && tar cvzf nanos-nightly-darwin.tar.gz * && gsutil cp nanos-nightly-darwin.tar.gz gs://nanos/release/nightly - run: gsutil acl ch -u AllUsers:R gs://nanos/release/nightly/nanos-nightly-darwin.tar.gz - run: rm -r temp
xive: Fix opal_xive_check_pending() We were calculating the mask all wrong... we got lucky in the normal case though.
@@ -2916,7 +2916,7 @@ static uint8_t xive_sanitize_cppr(uint8_t cppr) static inline uint8_t opal_xive_check_pending(struct xive_cpu_state *xs, uint8_t cppr) { - uint8_t mask = (cppr > 7) ? 0xff : ((1 << cppr) - 1); + uint8_t mask = (cppr > 7) ? 0xff : ~((0x100 >> cppr) - 1); return xs->pending & mask; } @@ -2926,9 +2926,9 @@ static int64_t opal_xive_eoi(uint32_t xirr) struct cpu_thread *c = this_cpu(); struct xive_cpu_state *xs = c->xstate; uint32_t isn = xirr & 0x00ffffff; - uint8_t cppr, irqprio; struct xive *src_x; bool special_ipi = false; + uint8_t cppr; /* * In exploitation mode, this is supported as a way to perform
test: the prerelease text has a dash
@@ -492,6 +492,7 @@ class CommitToMboxTest < Rugged::TestCase @repo.config['core.abbrev'] = 7 prerelease = Rugged.libgit2_prerelease + prerelease = "-#{prerelease}" unless prerelease.empty? @version_string = "#{Rugged.libgit2_version.join('.')}#{prerelease unless prerelease.empty?}" end
Add LayoutManager
@@ -9,5 +9,6 @@ public unsafe partial struct LayoutWorld [StaticAddress("48 89 05 ? ? ? ? 48 8B 00", isPointer: true)] public static partial LayoutWorld* Instance(); + [FieldOffset(0x20)] public LayoutManager* ActiveLayout; [FieldOffset(0x218)] public StdMap<Utf8String, Pointer<byte>>* RsvMap; } \ No newline at end of file
Fixes in the release note
@@ -27,7 +27,7 @@ enhancements and bug-fixes that were added to this release.</p> <ul> <li>Fixed a bug in the Stimulate Image reader (file extensions spr, sdt), where a negative pixel delta in the metadata resulted in incorrect pick results, incorrect sampled lineouts and potentially other erroneous behavior.</li> <li>Fixed a bug in the Histogram Options GUI where the plot was not updating with changes when the Apply button was clicked.</li> - <li>Fixed a bug in teh Histogram Plot where Use Current Plot will now use the actual data extents.</li> + <li>Fixed a bug in the Histogram Plot where <i>Use Current Plot</i> will now use the actual data extents.</li> </ul> <a name="Enhancements"></a>
OcHdaDevicesLib: Add missing CX8200 and CX20724 thanks
@@ -224,6 +224,7 @@ STATIC HDA_CODEC_LIST_ENTRY mHdaCodecList[] = { /// /// Conexant. /// + { HDA_CODEC (CONEXANT, 0x2008), 0x0000, "Conexant CX8200" }, { HDA_CODEC (CONEXANT, 0x5045), 0x0000, "Conexant CX20549 (Venice)" }, { HDA_CODEC (CONEXANT, 0x5047), 0x0000, "Conexant CX20551 (Waikiki)" }, { HDA_CODEC (CONEXANT, 0x5051), 0x0000, "Conexant CX20561 (Hermosa)" }, @@ -241,6 +242,7 @@ STATIC HDA_CODEC_LIST_ENTRY mHdaCodecList[] = { { HDA_CODEC (CONEXANT, 0x50AC), 0x0000, "Conexant CX20652" }, { HDA_CODEC (CONEXANT, 0x50B8), 0x0000, "Conexant CX20664" }, { HDA_CODEC (CONEXANT, 0x50B9), 0x0000, "Conexant CX20665" }, + { HDA_CODEC (CONEXANT, 0x50F4), 0x0000, "Conexant CX20724" }, { HDA_CODEC (CONEXANT, 0xFFFF), 0x0000, "Conexant (Unknown)" }, /// /// Creative.
Solve bugs from espree cmake.
@@ -53,6 +53,9 @@ if(NOT OPTION_BUILD_GUIX) COMMAND ${NPM_EXECUTABLE} --prefix ${CMAKE_CURRENT_BINARY_DIR} install ${CMAKE_CURRENT_BINARY_DIR} COMMAND ${CMAKE_COMMAND} -E make_directory ${PROJECT_OUTPUT_DIR}/node_modules COMMAND ${CMAKE_COMMAND} -E copy_directory ${CMAKE_CURRENT_BINARY_DIR}/node_modules/espree ${PROJECT_OUTPUT_DIR}/node_modules/espree + COMMAND ${CMAKE_COMMAND} -E copy_directory ${CMAKE_CURRENT_BINARY_DIR}/node_modules/acorn ${PROJECT_OUTPUT_DIR}/node_modules/acorn + COMMAND ${CMAKE_COMMAND} -E copy_directory ${CMAKE_CURRENT_BINARY_DIR}/node_modules/acorn-jsx ${PROJECT_OUTPUT_DIR}/node_modules/acorn-jsx + COMMAND ${CMAKE_COMMAND} -E copy_directory ${CMAKE_CURRENT_BINARY_DIR}/node_modules/eslint-visitor-keys ${PROJECT_OUTPUT_DIR}/node_modules/eslint-visitor-keys COMMAND ${CMAKE_COMMAND} -E echo "${target} dependencies copied from ${CMAKE_CURRENT_BINARY_DIR}/node_modules to ${PROJECT_OUTPUT_DIR}/node_modules" DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/lib/package.json ${CMAKE_CURRENT_SOURCE_DIR}/lib/package-lock.json ) @@ -67,6 +70,9 @@ if(NOT OPTION_BUILD_GUIX) install(DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/node_modules/espree + ${CMAKE_CURRENT_BINARY_DIR}/node_modules/acorn + ${CMAKE_CURRENT_BINARY_DIR}/node_modules/acorn-jsx + ${CMAKE_CURRENT_BINARY_DIR}/node_modules/eslint-visitor-keys DESTINATION ${INSTALL_LIB}/node_modules COMPONENT runtime ) @@ -74,6 +80,9 @@ else() # Guix stores espree dependency previously to the build in the output directory install(DIRECTORY ${PROJECT_OUTPUT_DIR}/node_modules/espree + ${PROJECT_OUTPUT_DIR}/node_modules/acorn + ${PROJECT_OUTPUT_DIR}/node_modules/acorn-jsx + ${PROJECT_OUTPUT_DIR}/node_modules/eslint-visitor-keys DESTINATION ${INSTALL_LIB}/node_modules COMPONENT runtime )
fs/lustre-client: pull in new yaml requirements for latest release
@@ -140,12 +140,18 @@ BuildRequires: kernel-devel = %{centos_kernel} %global modules_fs_path /lib/modules/%{kversion}/%{kmoddir} %if %{_vendor}=="redhat" || %{_vendor}=="fedora" + %global requires_yaml_name libyaml %global requires_kmod_name kmod-%{lustre_name} + %if %{with lustre_tests} %global requires_kmod_tests_name kmod-%{lustre_name}-tests + %endif %global requires_kmod_version %{version} %else #for Suse + %global requires_yaml_name libyaml-0-2 %global requires_kmod_name %{lustre_name}-kmp + %if %{with lustre_tests} %global requires_kmod_tests_name %{lustre_name}-tests-kmp + %endif %define krequires %(echo %{kversion} | sed -e 's/\.x86_64$//' -e 's/\.i[3456]86$//' -e 's/-smp$//' -e 's/-bigsmp$//' -e 's/[-.]ppc64$//' -e 's/\.aarch64$//' -e 's/-default$//') %if 0%{?suse_version} >= 1200 %global requires_kmod_version %{version}_k%(echo %{krequires} | sed -r 'y/-/_/; s/^(2\.6\.[0-9]+)_/\\1.0_/;')
fsutils:ipcfg Add extern 'C' under cpp
@@ -92,6 +92,13 @@ struct ipcfg_s /**************************************************************************** * Public Function Prototypes ****************************************************************************/ +#ifdef __cplusplus +#define EXTERN extern "C" +extern "C" +{ +#else +#define EXTERN extern +#endif /**************************************************************************** * Name: ipcfg_read @@ -132,5 +139,9 @@ int ipcfg_read(FAR const char *netdev, FAR struct ipcfg_s *ipcfg); #ifdef CONFIG_IPCFG_WRITABLE int ipcfg_write(FAR const char *netdev, FAR const struct ipcfg_s *ipcfg); #endif +#undef EXTERN +#ifdef __cplusplus +} +#endif #endif /* __APPS_INCLUDE_FSUTILS_IPCFG_H */
Simplify the abstract.
@@ -35,20 +35,18 @@ TABLE OF CONTENTS: 1. ABOUT: - Myrddin is designed to be a simple, low-level programming - language. It is designed to provide the programmer with - predictable behavior and a transparent compilation model, - while at the same time providing the benefits of strong type - checking, generics, type inference, and similar. Myrddin is - not a language designed to explore the forefront of type - theory or compiler technology. It is not a language that is - focused on guaranteeing perfect safety. Its focus is on being - a practical, small, fairly well defined, and easy to - understand language for work that needs to be close to the - hardware. - - Myrddin is a computer language influenced strongly by C and - ML, with ideas from too many other places to name. + Myrddin is designed to be a simple programming language. + It is designed to provide the programmer with predictable + behavior and a pragmatic set of semantics, providing the + benefits of strong type checking, generics, type inference, + and modern features with a high cost-benefit ratio. Myrddin + is not a language designed to explore the forefront of type + theory or compiler technology. Its focus is on being a + practical, small, well defined, and easy to understand + language for work that needs to be close to the hardware. + + Myrddin is influenced strongly by C and ML, with ideas from + too many other places to name. 2. LEXICAL CONVENTIONS:
Completed mining.suggest_difficulty stratum method implementation for Bitcoin Family of Pools
@@ -12,6 +12,7 @@ using MiningCore.Persistence; using MiningCore.Persistence.Repositories; using MiningCore.Stratum; using Newtonsoft.Json; +using NLog; namespace MiningCore.Blockchain.Bitcoin { @@ -171,8 +172,29 @@ namespace MiningCore.Blockchain.Bitcoin { var request = tsRequest.Value; - // success + // acknowledge client.Respond(true, request.Id); + + try + { + var requestedDiff = (double) Convert.ChangeType(request.Params, TypeCode.Double); + + // client may suggest higher-than-base difficulty, but not a lower one + var poolEndpoint = poolConfig.Ports[client.PoolEndpoint.Port]; + + if (requestedDiff > poolEndpoint.Difficulty) + { + client.Context.SetDifficulty(requestedDiff); + client.Notify(BitcoinStratumMethods.SetDifficulty, new object[] { client.Context.Difficulty }); + + logger.Info(() => $"[{LogCat}] [{client.ConnectionId}] Difficulty set to {requestedDiff} as requested by miner"); + } + } + + catch (Exception ex) + { + logger.Error(ex, () => $"[{LogCat}] Enable to convert suggested difficulty {request.Params}"); + } } private void OnNewJob(object jobParams)
chat: leave button gets border in dark mode
@@ -85,7 +85,7 @@ export class SettingsScreen extends Component { let chatOwner = (deSig(props.match.params.ship) === window.ship); - let deleteButtonClasses = (chatOwner) ? 'b--red2 red2 pointer bg-gray0-d' : 'b--grey3 grey3 bg-gray0-d c-default'; + let deleteButtonClasses = (chatOwner) ? 'b--red2 red2 pointer bg-gray0-d' : 'b--gray3 gray3 bg-gray0-d c-default'; let leaveButtonClasses = (!chatOwner) ? "pointer" : "c-default"; return ( @@ -94,7 +94,7 @@ export class SettingsScreen extends Component { <p className="f8 mt3 lh-copy db">Leave Chat</p> <p className="f9 gray2 db mb4">Remove this chat from your chat list. You will need to request for access again.</p> <a onClick={(!chatOwner) ? this.deleteChat.bind(this) : null} - className={"dib f9 black gray4-d bg-gray0-d ba pa2 b--black b--gray0-d " + leaveButtonClasses}>Leave this chat</a> + className={"dib f9 black gray4-d bg-gray0-d ba pa2 b--black b--gray1-d " + leaveButtonClasses}>Leave this chat</a> </div> <div className={"w-100 fl mt3 " + ((!chatOwner) ? 'o-30' : '')}> <p className="f8 mt3 lh-copy db">Delete Chat</p>
make page break specification arch specific
@@ -26,12 +26,14 @@ $mpi_exceptions{"fftw"} = 3; $mpi_exceptions{"mkl-blacs"} = 1; # Define any packages that should start a new page (hash value determines which -# extra file to create) +# extra file to create) - per arch basis my %page_breaks = (); +if ( $ENV{'PWD'} =~ /\s+\/x86_64\// ) { $page_breaks{"scorep-gnu7-impi-ohpc"} = 2; $page_breaks{"petsc-gnu-impi-ohpc"} = 2; $page_breaks{"phdf5-gnu-impi-ohpc"} = 2; +} my $longSummaryLine = 60; my $urlColor="logoblue";
A 4410 sample buffer doesn't fit in imix memory, since it allocates less than Hail does to applications.
// Buffer size // Given a sampling frequency, we will receive callbacks every // BUF_SIZE/FREQ seconds. At 44100 Hz and 4410 samples, this is a callback -// every 100 ms -#define BUF_SIZE 4410 +// every 50 ms +#define BUF_SIZE 2205 // data buffers static uint16_t sample_buffer1[BUF_SIZE] = {0}; @@ -157,4 +157,3 @@ int main(void) { // for us return 0; } -
proc/threads: avoid spin locking in idle thread if there is no work to do
@@ -1023,6 +1023,8 @@ static void threads_idlethr(void *arg) process_t *zombie; for (;;) { + /* Don't grab spinlocks unless there is something to clean up */ + if (threads_common.ghosts != NULL) { do { hal_spinlockSet(&threads_common.spinlock); if ((ghost = threads_common.ghosts) != NULL) @@ -1033,7 +1035,9 @@ static void threads_idlethr(void *arg) proc_cleanupGhost(ghost); } while (ghost != NULL); + } + if (threads_common.zombies != NULL) { do { hal_spinlockSet(&threads_common.spinlock); if ((zombie = threads_common.zombies) != NULL && zombie->threads == NULL && zombie->ports == NULL) @@ -1046,6 +1050,7 @@ static void threads_idlethr(void *arg) proc_cleanupZombie(zombie); } while (zombie != NULL); + } wakeup = proc_nextWakeup();
hv: bug fix in atomic.h This patch fixes the typo introduced in atomic operaions refine. The usage of the parameter in function body was not updated according to the changes of input parameter. Acked-by: Anthony Xu
@@ -176,7 +176,7 @@ static inline type name(volatile type *ptr, \ { \ type ret; \ asm volatile(BUS_LOCK "cmpxchg" size " %2,%1" \ - : "=a" (ret), "+m" (*p) \ + : "=a" (ret), "+m" (*ptr) \ : "r" (new), "0" (old) \ : "memory"); \ return ret; \ @@ -188,7 +188,7 @@ build_atomic_cmpxchg(atomic_cmpxchg64, "q", uint64_t, p, old, new) static inline type name(type *ptr, type v) \ { \ asm volatile(BUS_LOCK "xadd" size " %0,%1" \ - : "+r" (v), "+m" (*p) \ + : "+r" (v), "+m" (*ptr) \ : \ : "cc", "memory"); \ return v; \
baseboard/kukui/battery_bq27541.c: Format with clang-format BRANCH=none TEST=none
#define CPRINTS(format, args...) cprints(CC_CHARGER, format, ##args) -enum battery_type { - BATTERY_CPT = 0, - BATTERY_COUNT -}; +enum battery_type { BATTERY_CPT = 0, BATTERY_COUNT }; static const struct battery_info info[] = { [BATTERY_CPT] = { @@ -159,12 +156,10 @@ int charger_profile_override(struct charge_state_data *curr) curr->requested_voltage -= rcv; /* Should not keep charging voltage > 4250mV for 48hrs. */ - if ((curr->state == ST_DISCHARGE) || - curr->chg.voltage < 4250) { + if ((curr->state == ST_DISCHARGE) || curr->chg.voltage < 4250) { deadline_48.val = 0; /* Starting count 48hours */ - } else if (curr->state == ST_CHARGE || - curr->state == ST_PRECHARGE) { + } else if (curr->state == ST_CHARGE || curr->state == ST_PRECHARGE) { if (deadline_48.val == 0) deadline_48.val = get_time().val + CHARGER_LIMIT_TIMEOUT_HOURS * HOUR; @@ -177,14 +172,13 @@ int charger_profile_override(struct charge_state_data *curr) /* Should not keeep battery voltage > 4100mV and * battery temperature > 45C for two hour */ - if (curr->state == ST_DISCHARGE || - curr->batt.voltage < 4100 || + if (curr->state == ST_DISCHARGE || curr->batt.voltage < 4100 || bat_temp_c < 450) { deadline_2.val = 0; - } else if (curr->state == ST_CHARGE || - curr->state == ST_PRECHARGE) { + } else if (curr->state == ST_CHARGE || curr->state == ST_PRECHARGE) { if (deadline_2.val == 0) - deadline_2.val = get_time().val + + deadline_2.val = + get_time().val + CHARGER_LIMIT_TIMEOUT_HOURS_TEMP * HOUR; else if (timestamp_expired(deadline_2, NULL)) { /* Set discharge and charging voltage = 4100mV */
Tests: remove unused function. This function was accidentally added in
@@ -2,7 +2,6 @@ import os import re import sys import json -import mmap import time import shutil import socket @@ -367,11 +366,6 @@ class TestUnitApplicationProto(TestUnitControl): with open(self.testdir + '/unit.log', 'r', errors='ignore') as f: return re.search(pattern, f.read()) - def find_in_log(self, pattern): - with open(self.testdir + '/unit.log', 'rb', 0) as f, \ - mmap.mmap(f.fileno(), 0, access=mmap.ACCESS_READ) as s: - return s.find(pattern) != -1 - class TestUnitApplicationPython(TestUnitApplicationProto): def load(self, script, name=None): if name is None:
Add -lhip_hcc to hip_rocblas test makefile
@@ -7,7 +7,7 @@ TESTSRC_AUX = TESTSRC_ALL = $(TESTSRC_MAIN) $(TESTSRC_AUX) OMP_FLAGS = --offload-arch=${AOMP_GPU} CFLAGS = -x hip -I /opt/rocm/rocblas/include/ --offload-arch=${AOMP_GPU} -std=c++11 -LINK_FLAGS = -L /opt/rocm/rocblas/lib -lrocblas -Wl,-rpath,/opt/rocm/rocblas/lib +LINK_FLAGS = -L /opt/rocm/rocblas/lib -lrocblas -Wl,-rpath,/opt/rocm/rocblas/lib -lhip_hcc CLANG = clang++ OMP_BIN = $(AOMP)/bin/$(CLANG)
docs: add venachain github link
+ [Huawei BCS](https://www.huaweicloud.com/product/bcs) + [ChainMaker](https://chainmaker.org.cn/) + [ChainMaker Docs](https://docs.chainmaker.org.cn/) ++ [Venachain](https://github.com/Venachain/Venachain) + [Venachain Docs](https://venachain-docs.readthedocs.io/zh/latest/) + [Polygon](https://polygon.technology/)
test: Fix typo in flag `-F`
@@ -203,7 +203,7 @@ check_set_mv_rm() { # is_not_rw_storage() { - echo $("$KDB" plugin-info "$PLUGIN" provides 2> /dev/null) | grep -f -qw "storage" + echo $("$KDB" plugin-info "$PLUGIN" provides 2> /dev/null) | grep -F -qw "storage" if [ $? != 0 ]; then return 0 fi
Pin Build page scroll to bottom on initial load
@@ -99,6 +99,14 @@ const BuildPage = () => { } }, [output]); + useEffect(() => { + // Pin scroll to bottom of console on initial load + const scrollEl = scrollRef.current; + if (scrollEl) { + scrollEl.scrollTop = scrollEl.scrollHeight; + } + }, []); + return ( <Wrapper> <Terminal ref={scrollRef}>
[catboost] Add t.me links to README.md
@@ -43,6 +43,7 @@ Questions and bug reports -------------- * For reporting bugs please use the [catboost/bugreport](https://github.com/catboost/catboost/issues) page. * Ask your question about CatBoost on [Stack Overflow](https://stackoverflow.com/questions/tagged/catboost). +* Seek prompt advice at [Telegram group](https://t.me/catboost_en) or Russian-speaking [Telegram chat](https://t.me/catboost_ru) Help to Make CatBoost Better ----------------------------
We don't have (yet) 128-bit unaligned load/store on ARM
@@ -395,7 +395,7 @@ clib_bitmap_first_set (uword * ai) break; i += 8; } -#elif defined (CLIB_HAVE_VEC128) +#elif defined(CLIB_HAVE_VEC128) && defined(CLIB_HAVE_VEC128_UNALIGNED_LOAD_STORE) while (i + 3 < vec_len (ai)) { u64x2 v;
engine: dispath: pass new flush context to formatter callback
@@ -93,7 +93,8 @@ int flb_engine_dispatch_retry(struct flb_task_retry *retry, static void test_run_formatter(struct flb_config *config, struct flb_input_instance *i_ins, struct flb_output_instance *o_ins, - struct flb_task *task) + struct flb_task *task, + void *flush_ctx) { int ret; void *out_buf = NULL; @@ -106,6 +107,7 @@ static void test_run_formatter(struct flb_config *config, ret = otf->callback(config, i_ins, o_ins->context, + flush_ctx, task->tag, task->tag_len, task->buf, task->size, &out_buf, &out_size); @@ -155,10 +157,12 @@ static int tasks_start(struct flb_input_instance *in, */ out = route->out; if (out->test_mode == FLB_TRUE && - out->p->test_formatter.callback != NULL) { + out->test_formatter.callback != NULL) { /* Run the formatter test */ - test_run_formatter(config, in, out, task); + test_run_formatter(config, in, out, + task, + out->test_formatter.flush_ctx); /* Remove the route */ mk_list_del(&route->_head);