message
stringlengths
6
474
diff
stringlengths
8
5.22k
add float & cat features count methods to cpp wrapper
@@ -206,6 +206,14 @@ public: return GetTreeCount(CalcerHolder.get()); } + size_t GetFloatFeaturesCount() const { + return GetFloatFeaturesCount(CalcerHolder.get()); + } + + size_t GetCatFeaturesCount() const { + return GetCatFeaturesCount(CalcerHolder.get()); + } + bool CheckMetadataHasKey(const std::string& key) { return CheckModelMetadataHasKey(CalcerHolder.get(), key.c_str(), key.size()); }
esp32/mphalport: Provide proper implementations of disable_/enable_irq.
#ifndef INCLUDED_MPHALPORT_H #define INCLUDED_MPHALPORT_H +#include "freertos/FreeRTOS.h" #include "py/ringbuf.h" #include "lib/utils/interrupt_char.h" extern ringbuf_t stdin_ringbuf; -// TODO implement me -#define disable_irq() 0 -#define enable_irq(irq_state) (void)(irq_state) +// Note: these "critical nested" macros do not ensure cross-CPU exclusion, +// the only disable interrupts on the current CPU. To full manage exclusion +// one should use portENTER_CRITICAL/portEXIT_CRITICAL instead. +#define disable_irq() portENTER_CRITICAL_NESTED() +#define enable_irq(irq_state) portEXIT_CRITICAL_NESTED(irq_state) uint32_t mp_hal_ticks_us(void); __attribute__((always_inline)) static inline uint32_t mp_hal_ticks_cpu(void) {
Fix stackoverflow due to recursion in vfs_spiffs_readdir_r
@@ -629,6 +629,9 @@ static int vfs_spiffs_readdir_r(void* ctx, DIR* pdir, struct dirent* entry, esp_spiffs_t * efs = (esp_spiffs_t *)ctx; vfs_spiffs_dir_t * dir = (vfs_spiffs_dir_t *)pdir; struct spiffs_dirent out; + size_t plen; + char * item_name; + do { if (SPIFFS_readdir(&dir->d, &out) == 0) { errno = spiffs_res_to_errno(SPIFFS_errno(efs->fs)); SPIFFS_clearerr(efs->fs); @@ -637,12 +640,12 @@ static int vfs_spiffs_readdir_r(void* ctx, DIR* pdir, struct dirent* entry, } return errno; } - const char * item_name = (const char *)out.name; - size_t plen = strlen(dir->path); + item_name = (char *)out.name; + plen = strlen(dir->path); + + } while ((plen > 1) && (strncasecmp(dir->path, (const char*)out.name, plen) || out.name[plen] != '/' || !out.name[plen + 1])); + if (plen > 1) { - if (strncasecmp(dir->path, (const char *)out.name, plen) || out.name[plen] != '/' || !out.name[plen+1]) { - return vfs_spiffs_readdir_r(ctx, pdir, entry, out_dirent); - } item_name += plen + 1; } else if (item_name[0] == '/') { item_name++;
XML data parser CHANGE support for RPC_REPLY data tree
@@ -436,10 +436,22 @@ lyd_parse_xml(struct ly_ctx *ctx, const char *data, int options, const struct ly } if (options & LYD_OPT_RPCREPLY) { - /* TODO prepare container for RPC reply, for which we need RPC + /* prepare container for RPC reply, for which we need RPC * - prepare *result as top-level node * - prepare parent as the RPC/action node */ - (void)trees; + const struct lyd_node *action; + for (action = trees[0]; action && action->schema->nodetype != LYS_ACTION; action = lyd_node_children(action)) { + /* skip list's keys */ + for ( ;action->schema->nodetype == LYS_LEAF; action = action->next); + } + if (!action) { + LOGERR(ctx, LY_EINVAL, "Data parser invalid argument trees - the first item in the array must be the RPC/action request when parsing %s.", + lyd_parse_options_type2str(options)); + return LY_EINVAL; + } + parent = (struct lyd_node_inner*)lyd_dup(action, NULL, LYD_DUP_WITH_PARENTS); + LY_CHECK_ERR_RET(!parent, LOGERR(ctx, ly_errcode(ctx), "Unable to duplicate RPC/action container for RPC/action reply."), ly_errcode(ctx)); + for (*result = (struct lyd_node*)parent; (*result)->parent; *result = (struct lyd_node*)(*result)->parent); } ret = lydxml_nodes(&xmlctx, parent, &data, *result ? &parent->child : result); @@ -467,16 +479,17 @@ lyd_parse_xml(struct ly_ctx *ctx, const char *data, int options, const struct ly } } - if (!(*result)) { + if (!(*result) || (parent && !parent->child)) { no_data: /* no data */ if (options & (LYD_OPT_RPC | LYD_OPT_NOTIF)) { - /* error, top level node identify RPC and Notification */ + /* error, missing top level node identify RPC and Notification */ LOGERR(ctx, LY_EINVAL, "Invalid input data of data parser - expected %s which cannot be empty.", lyd_parse_options_type2str(options)); } else { /* others - no work is needed, just check for missing mandatory nodes */ - /* TODO lyd_validate(&result, options, ctx); */ + /* TODO lyd_validate(&result, options, ctx); + * - according to the data tree type */ } } }
give recommendation if SIOCSIWMODE failed
@@ -7132,6 +7132,7 @@ if((iwr_old.u.mode & IW_MODE_MONITOR) != IW_MODE_MONITOR) if(ioctl(fd_socket, SIOCSIWMODE, &iwr) < 0) { perror("failed to set monitor mode, ioctl(SIOCSIWMODE) not supported by driver"); + fprintf(stderr, "try to use iw to set monitor mode and ip link to set interface up\n"); if(forceinterfaceflag == false) return false; } memset(&iwr, 0, sizeof(iwr));
tpm_i2c_nuvoton: fix use-after-free in tpm_register_chip failure path
@@ -573,8 +573,10 @@ void tpm_i2c_nuvoton_probe(void) goto disable; } if (tpm_register_chip(node, tpm_device, - &tpm_i2c_nuvoton_driver)) + &tpm_i2c_nuvoton_driver)) { free(tpm_device); + continue; + } bus = i2c_find_bus_by_id(tpm_device->bus_id); assert(bus->check_quirk == NULL); bus->check_quirk = nuvoton_tpm_quirk;
Error if shader push constants are too big;
@@ -1714,6 +1714,8 @@ Shader* lovrShaderCreate(const ShaderInfo* info) { lovrAssert(shader->constants && shader->resources && shader->attributes, "Out of memory"); lovrAssert(shader->flags && shader->flagLookup, "Out of memory"); + lovrCheck(shader->constantSize <= state.limits.pushConstantSize, "Shader push constants block is too big"); + // Push constants for (uint32_t i = 0; i < spv[constantStage].pushConstantCount; i++) { static const FieldType constantTypes[] = {
[cmake] SiconosVersion: 4.2.0
# --- set siconos current version --- # This file is also required for examples. set(MAJOR_VERSION 4) -set(MINOR_VERSION 1) +set(MINOR_VERSION 2) set(PATCH_VERSION 0) set(SICONOS_VERSION "${MAJOR_VERSION}.${MINOR_VERSION}.${PATCH_VERSION}")
docs - COPY command supports FORCE_NULL
@@ -28,6 +28,7 @@ QUOTE '<varname>quote_character</varname>' ESCAPE '<varname>escape_character</varname>' FORCE_QUOTE { ( <varname>column_name</varname> [, ...] ) | * } FORCE_NOT_NULL ( <varname>column_name</varname> [, ...] ) +FORCE_NULL ( <varname>column_name</varname> [, ...] ) ENCODING '<varname>encoding_name</varname>' FILL MISSING FIELDS LOG ERRORS [ SEGMENT REJECT LIMIT <varname>count</varname> [ ROWS | PERCENT ] ] @@ -245,6 +246,14 @@ IGNORE EXTERNAL PARTITIONS</codeblock></p> allowed only in <codeph>COPY FROM</codeph>, and only when using <codeph>CSV</codeph> format.</pd> </plentry> + <plentry> + <pt>FORCE_NULL</pt> + <pd>Match the specified columns' values against the null string, even if it has + been quoted, and if a match is found set the value to <codeph>NULL</codeph>. In + the default case where the null string is empty, this converts a quoted empty + string into <codeph>NULL</codeph>. This option is allowed only in + <codeph>COPY FROM</codeph>, and only when using <codeph>CSV</codeph> format.</pd> + </plentry> <plentry> <pt>ENCODING</pt> <pd>Specifies that the file is encoded in the <varname>encoding_name</varname>. If this @@ -427,6 +436,9 @@ IGNORE EXTERNAL PARTITIONS</codeblock></p> operation. You may wish to invoke <codeph>VACUUM</codeph> to recover the wasted space. Another option would be to use single row error isolation mode to filter out error rows while still loading good rows. </p> + <p><codeph>FORCE_NULL</codeph> and <codeph>FORCE_NOT_NULL</codeph> can be used + simultaneously on the same column. This results in converting quoted null strings to + null values and unquoted null strings to empty strings.</p> <p>When a <codeph>COPY FROM...ON SEGMENT</codeph> command is run, the server configuration parameter <codeph>gp_enable_segment_copy_checking</codeph> controls whether the table distribution policy (from the table <codeph>DISTRIBUTED</codeph> clause) is checked when @@ -562,7 +574,8 @@ IGNORE EXTERNAL PARTITIONS</codeblock></p> an unquoted empty string, while an empty string data value is written with double quotes (<codeph>""</codeph>). Reading values follows similar rules. You can use <codeph>FORCE_NOT_NULL</codeph> to prevent <codeph>NULL</codeph> input comparisons for - specific columns.</p> + specific columns. You can also use <codeph>FORCE_NULL</codeph> to convert quoted + null string data values to <codeph>NULL</codeph>.</p> <p>Because backslash is not a special character in the <codeph>CSV</codeph> format, <codeph>\.</codeph>, the end-of-data marker, could also appear as a data value. To avoid any misinterpretation, a <codeph>\.</codeph> data value appearing as a lone entry on a
travis: remove -s SIMD=1 from emscripten options For details See emscripten issue and commit
@@ -261,7 +261,7 @@ jobs: - BUILD_WRAPPER=emmake - EXECUTABLE_EXTENSION=.js - TEST_WRAPPER="${HOME}/.jsvu/v8 --experimental-wasm-simd" - - OPTIMIZATION_FLAGS="-O3 -s SIMD=1" + - OPTIMIZATION_FLAGS="-O3" addons: apt: packages:
api: make all page handlers static
@@ -847,7 +847,7 @@ static void copy_to_response_buf(uint8_t *to_buf, size_t to_len, memcpy(to_buf, from_buf, to_len > from_len ? from_len : to_len); } -int handle_rwrecovery_page(struct tcmu_device *dev, uint8_t *ret_buf, +static int handle_rwrecovery_page(struct tcmu_device *dev, uint8_t *ret_buf, size_t ret_buf_len) { uint8_t buf[12]; @@ -860,7 +860,7 @@ int handle_rwrecovery_page(struct tcmu_device *dev, uint8_t *ret_buf, return 12; } -int handle_cache_page(struct tcmu_device *dev, uint8_t *ret_buf, +static int handle_cache_page(struct tcmu_device *dev, uint8_t *ret_buf, size_t ret_buf_len) { uint8_t buf[20];
travis: Build stm32 mboot for PYBD_SF6 as part of CI.
@@ -39,6 +39,7 @@ jobs: - make ${MAKEOPTS} -C ports/stm32 BOARD=PYBD_SF2 - make ${MAKEOPTS} -C ports/stm32 BOARD=STM32F769DISC - make ${MAKEOPTS} -C ports/stm32 BOARD=STM32L476DISC + - make ${MAKEOPTS} -C ports/stm32/mboot BOARD=PYBD_SF6 # qemu-arm port - stage: test
tests: runtime: filter_kubernetes: add new lines on error debugging
@@ -157,8 +157,8 @@ static int cb_check_result(void *record, size_t size, void *data) if (!check) { fprintf(stderr, "Validator mismatch::\n" "Target: <<%s>>, Suffix: <<%s>\n" - "Filtered record: <<%s>>\n" - "Expected record: <<%s>>\n", + "Filtered record: <<\n%s\n>>\n" + "Expected record: <<\n%s\n>>\n", result->target, result->suffix, (char *)record, out); }
publish: clarify stack trace in +on-agent
=/ rid=resource (de-path:resource t.wire) ?. ?=(%watch-ack -.sign) + ~| "Expected error, please ignore" (on-agent:def wire sign) ?~ p.sign :: if watch acked successfully, then host has completed OTA, and
hslua-module-text: bump version to hslua-module-text-1.0.3
cabal-version: 2.2 name: hslua-module-text -version: 1.0.2 +version: 1.0.3 synopsis: Lua module for text description: UTF-8 aware subset of Lua's `string` module. .
zephyr/include/emul/emul_bmi.h: Format with clang-format BRANCH=none TEST=none
@@ -400,9 +400,8 @@ uint16_t bmi_emul_fifo_len(struct i2c_emul *emul, bool tag_time, bool header); * * @return FIFO data byte */ -uint8_t bmi_emul_get_fifo_data(struct i2c_emul *emul, int byte, - bool tag_time, bool header, int acc_shift, - int gyr_shift); +uint8_t bmi_emul_get_fifo_data(struct i2c_emul *emul, int byte, bool tag_time, + bool header, int acc_shift, int gyr_shift); /** * @brief Saves current internal state of sensors to emulator's registers. @@ -419,10 +418,9 @@ uint8_t bmi_emul_get_fifo_data(struct i2c_emul *emul, int byte, * @param gyr_off_en Indicate if gyroscope offset should be included to * sensor data value */ -void bmi_emul_state_to_reg(struct i2c_emul *emul, int acc_shift, - int gyr_shift, int acc_reg, int gyr_reg, - int sensortime_reg, bool acc_off_en, - bool gyr_off_en); +void bmi_emul_state_to_reg(struct i2c_emul *emul, int acc_shift, int gyr_shift, + int acc_reg, int gyr_reg, int sensortime_reg, + bool acc_off_en, bool gyr_off_en); /** * @}
Include chosen version in client's other list.
@@ -297,6 +297,10 @@ uint8_t* picoquic_encode_transport_param_version_negotiation(uint8_t* bytes, uin if (cnx->desired_version != 0 && cnx->desired_version != picoquic_supported_versions[cnx->version_index].version) { bytes = picoquic_frames_uint32_encode(bytes, bytes_max, cnx->desired_version); } + if (bytes != NULL) { + bytes = picoquic_frames_uint32_encode(bytes, bytes_max, + picoquic_supported_versions[cnx->version_index].version); + } } else { for (size_t i = 0; i < picoquic_nb_supported_versions; i++) {
Update OfflineStorage_SQLite.cpp
@@ -746,6 +746,13 @@ namespace ARIASDK_NS_BEGIN { "SELECT tenant_token FROM " TABLE_NAME_EVENTS " ORDER BY persistence ASC, timestamp ASC LIMIT MAX(1," "(SELECT COUNT(record_id) FROM " TABLE_NAME_EVENTS ")" "* ? / 100)"); + PREPARE_SQL(m_stmtTrimEvents_percent, + "DELETE FROM " TABLE_NAME_EVENTS " WHERE record_id IN (" + "SELECT record_id FROM " TABLE_NAME_EVENTS " ORDER BY persistence ASC, timestamp ASC LIMIT MAX(1," + "(SELECT COUNT(record_id) FROM " TABLE_NAME_EVENTS ")" + "* ? / 100)" + ")"); + PREPARE_SQL(m_stmtDeleteEvents_tenants, SQL_SUPPLY_PACKAGED_IDS "DELETE FROM " TABLE_NAME_EVENTS " WHERE tenant_token IN ids");
record the original asn.
@@ -63,10 +63,14 @@ else: if mote not in mote_counter_asn_cellusage.keys(): mote_counter_asn_cellusage[mote] = {} mote_counter_asn_cellusage[mote]['counter'] = [] + mote_counter_asn_cellusage[mote]['arriveTime'] = [] + mote_counter_asn_cellusage[mote]['asnBytes'] = [] mote_counter_asn_cellusage[mote]['latency'] = [] mote_counter_asn_cellusage[mote]['numCellsUsed'] = [] mote_counter_asn_cellusage[mote]['counter'].append(counter) + mote_counter_asn_cellusage[mote]['arriveTime'].append(time.time()) + mote_counter_asn_cellusage[mote]['asnBytes'].append(asnBytes) mote_counter_asn_cellusage[mote]['latency'].append(time.time()-asn*SLOTDURATION-network_start_time) mote_counter_asn_cellusage[mote]['numCellsUsed'].append(numCellsUsed)
Adjusted URL to match 11.7-0 version in package.py, added comments.
@@ -12,9 +12,10 @@ class Aomp(MakefilePackage): """ llvm openmp compiler from AMD""" homepage = "https://github.com/ROCm-Developer-Tools/aomp" - url = "https://github.com/ROCm-Developer-Tools/aomp/releases/download/rel_0.7-5/aomp-0.7-5.tar.gz" + url = "https://github.com/ROCm-Developer-Tools/aomp/releases/download/rel_11.7-0/aomp-11.7-0.tar.gz" - version('0.7-5', sha256='8f3b20e57bf2032d388879429f29b729ce9a46bee5e7ba76976fc77ea48707a7') + # Fixme: this will be adjusted when spack create is called. When copying over to your own package.py omit this line. + version('11.7-0', sha256='8f3b20e57bf2032d388879429f29b729ce9a46bee5e7ba76976fc77ea48707a7') family = 'compiler'
sys/log/stub: Remove unneeded cbmem dep
#include "log/log.h" #include "fcb/fcb.h" -#include "cbmem/cbmem.h" #ifdef __cplusplus extern "C" { #endif +struct cbmem; typedef int (* log_fcb_slot1_reinit_fcb_fn) (struct fcb_log *arg); struct log_fcb_slot1 {
Use OMP_ADAPTIVE setting to choose between static and dynamic OMP threadpool size
@@ -403,6 +403,7 @@ int exec_blas(BLASLONG num, blas_queue_t *queue){ break; } +if (openblas_omp_adaptive_env() != 0) { #pragma omp parallel for num_threads(num) schedule(OMP_SCHED) for (i = 0; i < num; i ++) { @@ -412,6 +413,17 @@ int exec_blas(BLASLONG num, blas_queue_t *queue){ exec_threads(&queue[i], buf_index); } +} else { +#pragma omp parallel for schedule(OMP_SCHED) + for (i = 0; i < num; i ++) { + +#ifndef USE_SIMPLE_THREADED_LEVEL3 + queue[i].position = i; +#endif + + exec_threads(&queue[i], buf_index); + } +} #ifdef HAVE_C11 atomic_store(&blas_buffer_inuse[buf_index], false);
fix: make purge deletes library dir
@@ -98,8 +98,7 @@ install : all install -m 644 libdiscord.h $(PREFIX)/include/ clean : - rm -rf $(OBJDIR) $(LIBDIR) \ - *.exe test/*.exe bots/*.exe + rm -rf $(OBJDIR) *.exe test/*.exe bots/*.exe purge : clean rm -rf $(LIBDIR)
capp: Add lid definitions for P9 DD-2.0 & DD-2.1 Update fsp_lid_map to include CAPP ucode lids for phb4-chipid == 0x200d1 and phb4-chipid == 0x201d1 that corresponds to P9 DD-2.0 & DD-2.1 chips respectively.
@@ -2357,6 +2357,8 @@ int fsp_fetch_data_queue(uint8_t flags, uint16_t id, uint32_t sub_id, #define CAPP_IDX_MURANO_DD21 0x201ef #define CAPP_IDX_NAPLES_DD10 0x100d3 #define CAPP_IDX_NIMBUS_DD10 0x100d1 +#define CAPP_IDX_NIMBUS_DD20 0x200d1 +#define CAPP_IDX_NIMBUS_DD21 0x201d1 static struct { enum resource_id id; @@ -2371,6 +2373,8 @@ static struct { { RESOURCE_ID_CAPP, CAPP_IDX_VENICE_DD20, 0x80a02004 }, { RESOURCE_ID_CAPP, CAPP_IDX_NAPLES_DD10, 0x80a02005 }, { RESOURCE_ID_CAPP, CAPP_IDX_NIMBUS_DD10, 0x80a02006 }, + { RESOURCE_ID_CAPP, CAPP_IDX_NIMBUS_DD20, 0x80a02007 }, + { RESOURCE_ID_CAPP, CAPP_IDX_NIMBUS_DD21, 0x80a02007 }, }; static void fsp_start_fetching_next_lid(void);
update sensor tooltip add tooltip for sensor
@@ -543,7 +543,7 @@ Blockly.Blocks['sensor_bmp'] = { ]), "key"); this.setOutput(true, Number); this.setInputsInline(true); - this.setTooltip(Blockly.MIXLY_MICROBIT_Board_temperature); + //this.setTooltip(Blockly.MIXLY_MICROBIT_SENSOR_BMP_temperature_TOOLTIP); } }; @@ -560,6 +560,7 @@ Blockly.Blocks['sensor_sht'] = { ]), "key"); this.setOutput(true, Number); this.setInputsInline(true); + //this.setTooltip(Blockly.MIXLY_MICROBIT_SENSOR_SHT_temperature_TOOLTIP); } }; @@ -573,6 +574,7 @@ Blockly.Blocks.sensor_ds18x20 = { .appendField(Blockly.MIXLY_GETTEMPERATUE); this.setInputsInline(true); this.setOutput(true, Number); + this.setTooltip(Blockly.MIXLY_MICROBIT_SENSOR_DS18X20_TOOLTIP); } };
options/ansi: Impl. getc() and related functions
@@ -378,13 +378,20 @@ int fputs(const char *__restrict string, FILE *__restrict stream) { return fputs_unlocked(string, stream); } +int getc_unlocked(FILE *stream) { + return fgetc_unlocked(stream); +} + int getc(FILE *stream) { - __ensure(!"Not implemented"); - __builtin_unreachable(); + return fgetc(stream); +} + +int getchar_unlocked(void) { + return fgetc_unlocked(stdin); } + int getchar(void) { - __ensure(!"Not implemented"); - __builtin_unreachable(); + return fgetc(stdin); } int putc_unlocked(int c, FILE *stream) { @@ -465,16 +472,6 @@ int perror(const char *string) { // POSIX unlocked I/O extensions. -int getc_unlocked(FILE *) { - __ensure(!"Not implemented"); - __builtin_unreachable(); -} - -int getchar_unlocked(void) { - __ensure(!"Not implemented"); - __builtin_unreachable(); -} - // GLIBC extensions. int asprintf(char **out, const char *format, ...) { va_list args;
[components / drivers]fixed re-include of audio
/** * Pipe Device */ -#include <rtthread.h> #include <rtdevice.h> #ifndef RT_PIPE_BUFSZ @@ -71,6 +70,6 @@ rt_err_t rt_audio_pipe_detach(struct rt_audio_pipe *pipe); #ifdef RT_USING_HEAP rt_err_t rt_audio_pipe_create(const char *name, rt_int32_t flag, rt_size_t size); void rt_audio_pipe_destroy(struct rt_audio_pipe *pipe); -#endif -#endif +#endif /* RT_USING_HEAP */ +#endif /* __AUDIO_PIPE_H__ */
misc: refine upgrade script There is some issue when use upgrade to update some old xml version to release_3.1, this patch modify the upgrade script to fix these issue.
@@ -316,6 +316,7 @@ class VirtioDevices(object): interface_name = network.xpath("./interface_name")[0].text if network.xpath("./interface_name") else None self.networks.append((virtio_framework, interface_name)) + if len(virtio_device_node.xpath("./input")) > 0: if virtio_device_node.xpath("./input")[0].text is not None: for input in virtio_device_node.xpath("./input"): self.inputs.append((None, input.text))
Test XML_ParserReset in external entity parsing is ignored
@@ -1592,6 +1592,59 @@ START_TEST(test_reset_in_entity) } END_TEST +/* Test resetting a subordinate parser does exactly nothing */ +static int XMLCALL +external_entity_resetter(XML_Parser parser, + const XML_Char *context, + const XML_Char *UNUSED_P(base), + const XML_Char *UNUSED_P(systemId), + const XML_Char *UNUSED_P(publicId)) +{ + const char *text = "<!ELEMENT doc (#PCDATA)*>"; + XML_Parser ext_parser; + XML_ParsingStatus status; + + ext_parser = XML_ExternalEntityParserCreate(parser, context, NULL); + if (ext_parser == NULL) + fail("Could not create external entity parser"); + XML_GetParsingStatus(ext_parser, &status); + if (status.parsing != XML_INITIALIZED) { + fail("Parsing status is not INITIALIZED"); + return XML_STATUS_ERROR; + } + if (_XML_Parse_SINGLE_BYTES(ext_parser, text, strlen(text), + XML_TRUE) == XML_STATUS_ERROR) { + xml_failure(parser); + return XML_STATUS_ERROR; + } + XML_GetParsingStatus(ext_parser, &status); + if (status.parsing != XML_FINISHED) { + fail("Parsing status is not FINISHED"); + return XML_STATUS_ERROR; + } + XML_ParserReset(ext_parser, NULL); + XML_GetParsingStatus(ext_parser, &status); + if (status.parsing != XML_FINISHED) { + fail("Parsing status not still FINISHED"); + return XML_STATUS_ERROR; + } + return XML_STATUS_OK; +} + +START_TEST(test_subordinate_reset) +{ + const char *text = + "<?xml version='1.0' encoding='us-ascii'?>\n" + "<!DOCTYPE doc SYSTEM 'foo'>\n" + "<doc>&entity;</doc>"; + + XML_SetParamEntityParsing(parser, XML_PARAM_ENTITY_PARSING_ALWAYS); + XML_SetExternalEntityRefHandler(parser, external_entity_resetter); + if (_XML_Parse_SINGLE_BYTES(parser, text, strlen(text), XML_TRUE) == XML_STATUS_ERROR) + xml_failure(parser); +} +END_TEST + /* * Namespaces tests. @@ -2515,6 +2568,7 @@ make_suite(void) tcase_add_test(tc_basic, test_set_base); tcase_add_test(tc_basic, test_attributes); tcase_add_test(tc_basic, test_reset_in_entity); + tcase_add_test(tc_basic, test_subordinate_reset); suite_add_tcase(s, tc_namespace); tcase_add_checked_fixture(tc_namespace,
OpenCore: Add boot picker
@@ -22,6 +22,7 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. #include <Library/DebugLib.h> #include <Library/DevicePathLib.h> #include <Library/MemoryAllocationLib.h> +#include <Library/OcBootManagementLib.h> #include <Library/OcDevicePathLib.h> #include <Library/OcStorageLib.h> #include <Library/UefiBootServicesTableLib.h> @@ -29,6 +30,62 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. #include <Library/UefiDriverEntryPoint.h> #include <Library/UefiLib.h> +STATIC +EFI_STATUS +EFIAPI OcStartImage ( + IN EFI_HANDLE ImageHandle, + OUT UINTN *ExitDataSize, + OUT CHAR16 **ExitData OPTIONAL + ) +{ + // + // TODO: Perform file system interception here... + // + + return gBS->StartImage ( + ImageHandle, + ExitDataSize, + ExitData + ); +} + +STATIC +VOID +OcMain ( + IN OC_STORAGE_CONTEXT *Storage + ) +{ + EFI_STATUS Status; + CHAR8 *Config; + UINT32 ConfigSize; + + Config = OcStorageReadFileUnicode ( + Storage, + OPEN_CORE_CONFIG_PATH, + &ConfigSize + ); + + if (Config != NULL) { + // + // TODO: parse configuration. + // + DEBUG ((DEBUG_INFO, "OC: Loaded configuration of %u bytes\n", ConfigSize)); + FreePool (Config); + } else { + DEBUG ((DEBUG_ERROR, "OC: Failed to load configuration!\n")); + } + + Status = OcRunSimpleBootMenu ( + OC_SCAN_DEFAULT_POLICY, + OC_LOAD_DEFAULT_POLICY, + 5, + OcStartImage + ); + if (EFI_ERROR (Status)) { + DEBUG ((DEBUG_ERROR, "OC: Failed to show boot menu!\n")); + } +} + STATIC VOID OcBootstrapRerun ( @@ -38,8 +95,6 @@ OcBootstrapRerun ( { EFI_STATUS Status; OC_STORAGE_CONTEXT Storage; - CHAR8 *Config; - UINT32 ConfigSize; DEBUG ((DEBUG_INFO, "OC: ReRun executed!\n")); @@ -59,18 +114,7 @@ OcBootstrapRerun ( return; } - Config = OcStorageReadFileUnicode ( - &Storage, - OPEN_CORE_CONFIG_PATH, - &ConfigSize - ); - - if (Config != NULL) { - DEBUG ((DEBUG_INFO, "OC: Loaded configuration of %u bytes\n", ConfigSize)); - FreePool (Config); - } else { - DEBUG ((DEBUG_ERROR, "OC: Failed to load configuration!\n")); - } + OcMain (&Storage); OcStorageFree (&Storage); }
Added documentation to the makefile on customization
@@ -65,6 +65,33 @@ Configuration Variables: BUILD_PKG_VQUAL ${BUILD_PKG_VQUAL} CFILE $(CFILE) +Customization: + + There are two main ways that the behavior of this makefile can be customized, + (1) pointing the build to an mpool tree that is not installed, and (2) adding + custom targets. The latter is primarily useful when running test tools that + are not part of the standard gcc toolchain. The former is useful for developers + that may have a checked out and build copy of the mpool and mpool-kmod trees + but for whatever reason those are not installed. + + As an example, suppose the user jane doe wishes to build hse against an mpool + repo in her home directory, executing the build on a machine named "host". + She would then put the following lines in a file that is named by an environment + variable HSE_MAKE_PRE_INCLUDE: + + MPOOL_INCLUDE_DIR := /home/jdoe/mpool/include + MPOOL_LIB_DIR := /home/jdoe/mpool/builds/host/rpm/release/src/mpool + BLKID_LIB_DIR := /home/jdoe/mpool/builds/host/rpm/release/ext_install/lib + + Compilation of the HSE code will then take place against the referenced mpool. + In order to run the unit tests, she would also have to set LD_LIBRARY_PATH so + that the unit tests could resolve those symbols - even though the real mpool + entry points would not be called. For example: + + export COMMON=/home/jdoe/mpool/builds/host/rpm/release + export LD_LIBRARY_PATH=${COMMON}/src/mpool:${COMMON}/ext_install/lib + + Examples: Rebuild:
Add compile errors to cast failure output.
|^ ^- build-receipt :: load all marks. :: - =^ maybe-load-marks-result out + =^ marks-result out (load-marks-reachable-from [[%grow source] [%grab target] ~]) - ?~ maybe-load-marks-result + ?~ -.marks-result out :: find a path through the graph :: :: Make a list of individual mark translation actions which will :: take us from :source to :term. :: - =/ path (find-path-through u.maybe-load-marks-result) + =/ path (find-path-through u.-.marks-result) :: if there is no path between these marks, give an error message :: ?~ path + :: we failed; surface errors from +load-marks-reachable-from + :: + =/ braces [[' ' ' ' ~] ['{' ~] ['}' ~]] + =/ errors=(list tank) + %- zing + %+ turn ~(tap in +.marks-result) + |= [mark=term err=tang] + ^- tang + :~ [%leaf "while compiling {<mark>}:"] + [%rose braces err] + == + :: %_ out result :* %build-result %error - [leaf+"ford: no mark path from {<source>} to {<target>}"]~ - == + :* [leaf+"ford: no mark path from {<source>} to {<target>}"] + errors + == == == :: (return-result %success %walk path) :: graph of the available edges :: =| =edge-jug + :: compile-failures: mark files which didn't compile + :: + =| compile-failures=(map term tang) :: |- - ^- [(unit ^edge-jug) _out] + ^- [[(unit ^edge-jug) _compile-failures] _out] :: no ?~ to prevent tmi :: ?: =(~ queued-nodes) - [`edge-jug out] + [[`edge-jug compile-failures] out] :: =/ nodes-and-schematics %+ turn queued-nodes *load-node == ?~ maybe-path-results - [~ out] + [[~ ~] out] :: =/ nodes-and-cores %+ turn u.maybe-path-results %- perform-schematics :* "ford: %walk from {<source>} to {<target>} contained failures:" nodes-and-cores - %filter-errors + %ignore-errors *load-node == ?~ maybe-core-results - [~ out] + [[~ ~] out] :: clear the queue before we process the new results :: =. queued-nodes ~ :: mark this node as visited :: =. visited (~(put in visited) key.i.cores) + :: add core errors to compile failures + :: + =? compile-failures ?=([%error *] result.i.cores) + %+ ~(put by compile-failures) mark.key.i.cores + message.result.i.cores :: =/ target-arms=(list load-node) - ?> ?=([%success %core *] result.i.cores) + ?. ?=([%success %core *] result.i.cores) + ~ ?: =(%grow type.key.i.cores) (get-arms-of-type %grow vase.result.i.cores) (get-arms-of-type %grab vase.result.i.cores)
fix(template) update indev template for v8 A few APIs were missed in the last attempt. Fixes
@@ -39,7 +39,7 @@ static void keypad_read(lv_indev_drv_t * indev_drv, lv_indev_data_t * data); static uint32_t keypad_get_key(void); static void encoder_init(void); -static bool encoder_read(lv_indev_drv_t * indev_drv, lv_indev_data_t * data); +static void encoder_read(lv_indev_drv_t * indev_drv, lv_indev_data_t * data); static void encoder_handler(void); static void button_init(void); @@ -110,7 +110,7 @@ void lv_port_indev_init(void) indev_mouse = lv_indev_drv_register(&indev_drv); /*Set cursor. For simplicity set a HOME symbol now.*/ - lv_obj_t * mouse_cursor = lv_img_create(lv_disp_get_scr_act(NULL), NULL); + lv_obj_t * mouse_cursor = lv_img_create(lv_scr_act()); lv_img_set_src(mouse_cursor, LV_SYMBOL_HOME); lv_indev_set_cursor(indev_mouse, mouse_cursor);
Remove duplicate SRCS Note: mandatory check (NEED_CHECK) was skipped
@@ -12,7 +12,6 @@ SRCS( GLOBAL pfound_f.cpp GLOBAL pair_logit_pairwise.cpp GLOBAL multiclass.cpp - GLOBAL pointwise_region.cpp GLOBAL multiclass_region.cpp GLOBAL querywise_region.cpp GLOBAL pointwise_non_symmetric.cpp
Edited changes.xml for the 1.25.0 release.
@@ -57,14 +57,14 @@ application restart control. <change type="feature"> <para> -client IP address replacement from specified HTTP header field. +client IP address replacement from a specified HTTP header field. </para> </change> <change type="bugfix"> <para> -TLS connection was rejected for configuration with more than one -certificate bundle in a listener if a client did not use SNI. +TLS connections were rejected for configurations with multiple +certificate bundles in a listener if the client did not use SNI. </para> </change> @@ -72,13 +72,13 @@ certificate bundle in a listener if a client did not use SNI. <change type="bugfix"> <para> the router process could crash on TLS connection open when multiple listeners -with TLS certificate configured; the bug had appeared in 1.23.0. +with TLS certificates were configured; the bug had appeared in 1.23.0. </para> </change> <change type="bugfix"> <para> -the router process could crash on rapid mutithreaded application +the router process could crash with frequent mutithreaded application reconfiguration. </para> </change> @@ -99,7 +99,7 @@ a full-form IPv6 in a listener address. <change type="bugfix"> <para> -compatibility issues with some Python ASGI apps, notably based on Starlette +compatibility issues with some Python ASGI apps, notably based on the Starlette framework. </para> </change>
[SATA] Search for free command slots
@@ -275,11 +275,23 @@ impl AhciPortDescription { this } - fn send_command(&mut self) { - let command_header0 = &mut self.command_list[0]; - let mut active_command = ActiveCommand::new(0, CommandOpcode::IdentifyDevice); - println!("Got active command"); - command_header0 + fn find_free_command_slot(&self) -> usize { + for (bit_idx, bit) in self + .port_block + .command_issue + .view_bits::<Lsb0>() + .iter() + .enumerate() + { + if *bit == false { + // Found a free command slot! + return bit_idx; + } + } + // TODO(PT): Option<CommandSlot> instead of panic on failure? + panic!("Failed to find a free command slot!"); + } + fn send_command_req(&mut self, cmd_request: &CommandRequest) { let free_command_slot_idx = self.find_free_command_slot(); let command_header = &mut self.command_list[free_command_slot_idx]; @@ -319,7 +331,7 @@ impl AhciPortDescription { // Issue the command println!("Issuing command..."); - self.port_block.command_issue |= 1; + self.port_block.command_issue |= (1 << free_command_slot_idx); } fn _set_command_and_status_bit(&mut self, bit_idx: usize, enabled: bool) { @@ -560,7 +572,7 @@ fn start(_argc: isize, _argv: *const *const u8) -> isize { } println!("Sending AHCI command FIS..."); let port_desc = active_ports.get_mut(&0).unwrap(); - port_desc.send_command(); + port_desc.send_command_req(&CommandRequest::new_read_command()); } }
count probes provied by h2o or quicly
@@ -869,7 +869,9 @@ if sys.argv[1] == "quic": # provider h2o: u.enable_probe(probe="send_response_header", fn_name="trace_h2o__send_response_header") - cflags = ["-DMAX_EVENT_TYPE_LEN=%s" % (1+max(map(lambda probe: len("%s__%s" % (probe.provider, probe.name)), u.enumerate_probes())))] + probes = filter(lambda probe: probe.provider == "h2o" or probe.provider == "quicly", u.enumerate_probes()) + max_event_type_len = 1 + max(map(lambda probe: len("%s__%s" % (probe.provider, probe.name)), probes)) + cflags = ["-DMAX_EVENT_TYPE_LEN=%s" % max_event_type_len] b = BPF(text=quic_bpf, usdt_contexts=[u], cflags=cflags) else: u.enable_probe(probe="receive_request", fn_name="trace_receive_req")
add comments to the converter.
@@ -42,6 +42,11 @@ to return the board's description. // 1) 255 is the maxium value can be divided. // 2) on FPGA, 20MHz clock can't be slow down. +// NOTE: +// This convert has a problem that when multiple the value, it may exceeds +// 0xffffffff, resulting a wrong converting. Resolve this problem when the +// frequency of rftimer is determined finally. + // this is called when require to WRITE the RFTIMER counter/compare registers, // where the value is going to be multiplied. #define TIMER_COUNTER_CONVERT_32K_TO_RFTIMER_CLK(value) value*55/23
prefer user's path
-#!/bin/sh +#!/bin/bash # xmake getter # usage: bash <(curl -s <my location>) [branch] @@ -7,7 +7,26 @@ branch= if [ x != x$1 ];then branch="-b $1";fi git clone --depth=1 $branch https://github.com/tboox/xmake.git /tmp/$$xmake_getter || exit $? make -C /tmp/$$xmake_getter --no-print-directory build || exit $? -if [ 0 -eq $(id -u) ] +IFS=':' +patharr=($PATH) +prefix= +for st in ${patharr[@]} +do + if [[ "$st" = "$HOME"* ]] + then + cwd=$(pwd) + mkdir -p "$st" + cd "$st"/.. + mkdir -p share 2>/dev/null || continue + prefix=$(pwd) + cd "$cwd" + break + fi +done +if [ x$prefix != x ] +then + make -C /tmp/$$xmake_getter --no-print-directory install prefix="$prefix"|| exit $? +elif [ 0 -eq $(id -u) ] then make -C /tmp/$$xmake_getter --no-print-directory install || exit $? else @@ -15,4 +34,3 @@ else fi rm -rf /tmp/$$xmake_getter xmake --version -exit $?
Mention current data privacy regulations
@@ -159,6 +159,15 @@ We use a lot of automated security testing, i.e. static code analysers, fuzzing If you believe that you've found a security-related issue, please drop us an email to [[email protected]](mailto:[email protected]). Bug bounty program may apply. +# GDPR, HIPAA, CCPA + +As a cryptographic services library for mobile and server platforms, Themis is a ["state of the art"](https://gdpr-info.eu/art-32-gdpr/) encryption tool, which provides secure data exchange and storage. Using Themis, you can reach better compliance with the current data privacy regulations, such as: +* [General Data Protection Regulation (GDPR)](https://gdpr-info.eu/) +* [HIPAA (Health Insurance Portability and Accountability Act)](https://en.wikipedia.org/wiki/Health_Insurance_Portability_and_Accountability_Act) +* [DPA (Data Protection Act)](http://www.legislation.gov.uk/ukpga/2018/12/contents/enacted) +* [CCPA (California Consumer Privacy Act)](https://en.wikipedia.org/wiki/California_Consumer_Privacy_Act) + + # Community Themis is [recommended by OWASP](https://github.com/OWASP/owasp-mstg/blob/1.1.0/Document/0x06e-Testing-Cryptography.md#third-party-libraries) as data encryption library for mobile platforms.
initializing seems to have fixed it
@@ -50,9 +50,9 @@ Discord_public_load_message(void *p_message, char *str, size_t len) { discord_message_t *message = p_message; - struct json_token token_author; - struct json_token token_mentions; - struct json_token token_referenced_message; + struct json_token token_author = {NULL, 0}; + struct json_token token_mentions = {NULL, 0}; + struct json_token token_referenced_message = {NULL, 0}; json_scanf(str, len, "[id]%s"
yin parser CHANGE add name2nsname function
@@ -2846,6 +2846,19 @@ yin_check_relative_order(struct yin_parser_ctx *ctx, enum ly_stmt kw, enum ly_st return LY_SUCCESS; } +char * +name2nsname(struct yin_parser_ctx *ctx, const char *name, size_t name_len, const char *prefix, size_t prefix_len) +{ + const struct lyxml_ns *ns = lyxml_ns_get(&ctx->xml_ctx, prefix, prefix_len); + size_t len = strlen(ns->uri) + name_len + 1; + + char *temp = malloc(sizeof(*temp) * len); + strcpy(temp, ns->uri); + strncat(temp, name, name_len); + + return lydict_insert_zc(ctx->xml_ctx.ctx, temp); +} + LY_ERR yin_parse_content(struct yin_parser_ctx *ctx, struct yin_subelement *subelem_info, size_t subelem_info_size, const char **data, enum ly_stmt current_element, const char **text_content, struct lysp_ext_instance **exts)
Fix CMakes for ST Cube packages Improvements in CMake syntax. Include path to CMSIS.
# # set include directories -list(APPEND STM32H7_CubePackage_INCLUDE_DIRS "${CMAKE_BINARY_DIR}/STM32H7_CubePackage_Source/Drivers/STM32H7xx_HAL_Driver/Inc") +list(APPEND STM32H7_CubePackage_INCLUDE_DIRS ${CMAKE_BINARY_DIR}/STM32H7_CubePackage_Source/Drivers/CMSIS/Device/ST/STM32H7xx/Include) +list(APPEND STM32H7_CubePackage_INCLUDE_DIRS ${CMAKE_BINARY_DIR}/STM32H7_CubePackage_Source/Drivers/STM32H7xx_HAL_Driver/Inc) # source files set(STM32H7_CubePackage_SRCS @@ -12,6 +13,7 @@ set(STM32H7_CubePackage_SRCS # add HAL files here as required # SPIFFS + stm32h7xx_hal_dma.c stm32h7xx_hal_qspi.c ) @@ -20,7 +22,7 @@ foreach(SRC_FILE ${STM32H7_CubePackage_SRCS}) find_file(STM32H7_CubePackage_SRC_FILE ${SRC_FILE} PATHS - "${CMAKE_BINARY_DIR}/STM32H7_CubePackage_Source/Drivers/STM32H7xx_HAL_Driver/Src" + ${CMAKE_BINARY_DIR}/STM32H7_CubePackage_Source/Drivers/STM32H7xx_HAL_Driver/Src CMAKE_FIND_ROOT_PATH_BOTH )
Fix curly braces on util/mkrc.pl
@@ -26,9 +26,13 @@ while (<FD>) { $v4 = ( $ver >> 4 ) & 0xff; $beta = $ver & 0xf; $version = "$v1.$v2.$v3"; - if ( $beta == 0xf ) { $version .= chr( ord('a') + $v4 - 1 ) if ($v4); } - elsif ( $beta == 0 ) { $version .= "-dev"; } - else { $version .= "-beta$beta"; } + if ( $beta == 0xf ) { + $version .= chr( ord('a') + $v4 - 1 ) if ($v4); + } elsif ( $beta == 0 ) { + $version .= "-dev"; + } else { + $version .= "-beta$beta"; + } last; } }
Tests: Added tests for variables in "location".
@@ -161,6 +161,23 @@ Connection: close ), 'location method not allowed' assert self.get()['headers']['Location'] == 'blah' + assert 'success' in self.conf( + '"https://${host}${uri}"', 'routes/0/action/location' + ), 'location with variables' + assert self.get()['headers']['Location'] == 'https://localhost/' + + assert 'success' in self.conf( + '"/#$host"', 'routes/0/action/location' + ), 'location with encoding and a variable' + assert self.get()['headers']['Location'] == '/#localhost' + + assert ( + self.get(headers={"Host": "#foo?bar", "Connection": "close"})[ + 'headers' + ]['Location'] + == "/#%23foo%3Fbar" + ), 'location with a variable with encoding' + def test_return_invalid(self): def check_error(conf): assert 'error' in self.conf(conf, 'routes/0/action') @@ -171,6 +188,8 @@ Connection: close check_error({"return": 1000}) check_error({"return": -1}) check_error({"return": 200, "share": "/blah"}) + check_error({"return": 200, "location": "$hos"}) + check_error({"return": 200, "location": "$hostblah"}) assert 'error' in self.conf( '001', 'routes/0/action/return'
roller: return cryptoSuite in point as json string
:- 'keys' %- pairs :~ ['life' s+(json-number life.keys.net)] - ['suite' s+(json-number suite.keys.net)] + ['suite' s+`@t`suite.keys.net] ['auth' (hex 32 auth.keys.net)] ['crypt' (hex 32 crypt.keys.net)] ==
fix compiler warning: pointer should be 'char *' instread of 'void *'
@@ -756,7 +756,7 @@ static void proceed_pull(struct st_h2o_http1_conn_t *conn, size_t nfilled) bufs[bufcnt++] = h2o_iovec_init(conn->_ostr_final.pull.buf, nfilled); if (nfilled < MAX_PULL_BUF_SZ) { - h2o_iovec_t cbuf = {conn->_ostr_final.pull.buf + nfilled, MAX_PULL_BUF_SZ - nfilled}; + h2o_iovec_t cbuf = {(char *)conn->_ostr_final.pull.buf + nfilled, MAX_PULL_BUF_SZ - nfilled}; send_state = h2o_pull(&conn->req, conn->_ostr_final.pull.cb, &cbuf); conn->req.bytes_sent += cbuf.len; if (conn->_ostr_final.chunked_buf != NULL) {
Core(M): Describe scatter file templates. * Core(M): Describe scatter file templates. * Core(M): Describe scatter file templates. review changes.
@@ -194,6 +194,7 @@ The template files contain place holders: The device configuration of the template files is described in detail on the following pages: - \subpage startup_c_pg - \subpage startup_s_pg (deprecated) + - \subpage linker_sct_pg - \subpage system_c_pg - \subpage device_h_pg \if ARMv8M @@ -377,6 +378,71 @@ The files for other compiler vendors differ slightly in the syntax, but not in t \verbinclude "Source/ARM/startup_Device_ac6.S" */ +/*=======0=========1=========2=========3=========4=========5=========6=========7=========8=========9=========0=========1====*/ +/** +\page linker_sct_pg Scatter-Loading description file <device>_ac<5|6>.sct + +A scatter file for linking is required when using a \ref startup_c_pg "C startup file". + +The \ref linker_sct_pg contains regions for: + - Code (read-only data, execute-only data) + - RAM (read/write data, zero-initialized data) + - Stack + - Heap + - Stack seal (Armv8-M/v8.1-M) + - CMSE veneer (Armv8-M/v8.1-M) + +Within the scatter file, the user needs to specify a set of macros. The scatter file is passed through the +C preprocessor which uses these macros to calculate the start address and the size of the different regions. + +\code +/*--------------------- Flash Configuration ---------------------------------- +; <h> Flash Configuration +; <o0> Flash Base Address <0x0-0xFFFFFFFF:8> +; <o1> Flash Size (in Bytes) <0x0-0xFFFFFFFF:8> +; </h> + *----------------------------------------------------------------------------*/ +#define __ROM_BASE 0x00000000 +#define __ROM_SIZE 0x00080000 + +/*--------------------- Embedded RAM Configuration --------------------------- +; <h> RAM Configuration +; <o0> RAM Base Address <0x0-0xFFFFFFFF:8> +; <o1> RAM Size (in Bytes) <0x0-0xFFFFFFFF:8> +; </h> + *----------------------------------------------------------------------------*/ +#define __RAM_BASE 0x20000000 +#define __RAM_SIZE 0x00040000 + +/*--------------------- Stack / Heap Configuration --------------------------- +; <h> Stack / Heap Configuration +; <o0> Stack Size (in Bytes) <0x0-0xFFFFFFFF:8> +; <o1> Heap Size (in Bytes) <0x0-0xFFFFFFFF:8> +; </h> + *----------------------------------------------------------------------------*/ +#define __STACK_SIZE 0x00000200 +#define __HEAP_SIZE 0x00000C00 + +/*--------------------- CMSE Venner Configuration --------------------------- +; <h> CMSE Venner Configuration +; <o0> CMSE Venner Size (in Bytes) <0x0-0xFFFFFFFF:32> +; </h> + *----------------------------------------------------------------------------*/ +#define __CMSEVENEER_SIZE 0x200 +\endcode + +\note +The stack is placed at the end of the available RAM and is growing downwards +whereas the Heap is placed after the application data and growing upwards. + +\section linker_sct_preproc_sec Preprocessor command +The scatter file uses different preprocessor commands for Arm Compiler V6 and Arm Compiler V5 + - \b AC6: #! armclang -E --target=arm-arm-none-eabi -mcpu=&lt;mcpu&gt; -xc + - \b AC5: #! armcc -E + +*/ + + /*=======0=========1=========2=========3=========4=========5=========6=========7=========8=========9=========0=========1====*/ /** \page system_c_pg System Configuration Files system_<device>.c and system_<device>.h
Add real support for building 2.0 reference
@@ -246,17 +246,24 @@ def get_encoder_params(encoderName, imageSet): class, the output data name, the output result directory, and the reference to use. """ - if encoderName == "1.7": + if encoderName == "ref-1.7": encoder = te.Encoder1x() name = "reference-1.7" outDir = "Test/Images/%s" % imageSet refName = None - elif encoderName == "prototype": + if encoderName == "ref-2.0": + # Note this option rebuilds a new reference test set using the + # user's locally build encoder. + encoder = te.Encoder2x("avx2") + name = "reference-2.0-avx2" + outDir = "Test/Images/%s" % imageSet + refName = None + elif encoderName == "ref-prototype": encoder = te.EncoderProto() name = "reference-prototype" outDir = "Test/Images/%s" % imageSet refName = None - elif encoderName == "intelispc": + elif encoderName == "ref-intelispc": encoder = te.EncoderISPC() name = "reference-intelispc" outDir = "Test/Images/%s" % imageSet @@ -279,7 +286,7 @@ def parse_command_line(): """ parser = argparse.ArgumentParser() - refcoders = ["1.7", "prototype", "intelispc"] + refcoders = ["ref-1.7", "ref-2.0", "ref-prototype", "ref-intelispc"] testcoders = ["nointrin", "sse2", "sse4.2", "avx2"] coders = refcoders + testcoders + ["all"] parser.add_argument("--encoder", dest="encoders", default="avx2",
tls1_3:skip handshake msg test with PSA_CRYPTO tls1_3 hasn't implemented PSA version get transcript
@@ -8675,6 +8675,7 @@ run_test "TLS1.3: handshake dispatch test: tls1_3 only" \ requires_openssl_tls1_3 requires_config_enabled MBEDTLS_SSL_PROTO_TLS1_3_EXPERIMENTAL +requires_config_disabled MBEDTLS_USE_PSA_CRYPTO run_test "TLS1.3: Test client hello msg work - openssl" \ "$O_NEXT_SRV -tls1_3 -msg" \ "$P_CLI debug_level=2 min_version=tls1_3 max_version=tls1_3" \ @@ -8698,6 +8699,7 @@ run_test "TLS1.3: Test client hello msg work - openssl" \ requires_gnutls_tls1_3 requires_config_enabled MBEDTLS_SSL_PROTO_TLS1_3_EXPERIMENTAL +requires_config_disabled MBEDTLS_USE_PSA_CRYPTO run_test "TLS1.3: Test client hello msg work - gnutls" \ "$G_NEXT_SRV --priority=NORMAL:-VERS-ALL:+VERS-TLS1.3 --debug=4" \ "$P_CLI debug_level=2 min_version=tls1_3 max_version=tls1_3" \
ux: default terminal sets correct theme onload also, increase size of Tab click target
@@ -13,6 +13,7 @@ import React from 'react'; import { Box, Col } from '@tlon/indigo-react'; import { makeTheme } from './lib/theme'; import { showBlit, csi } from './lib/blit'; +import { DEFAULT_SESSION } from './constants'; const termConfig: ITerminalOptions = { logLevel: 'warn', @@ -146,7 +147,7 @@ export default function Buffer({ name, selected, dark }: BufferProps) { const session: Session = useTermState(s => s.sessions[name]); const initSession = useCallback(async (name: string, dark: boolean) => { - console.log('setting up', name); + console.log('setting up', name === DEFAULT_SESSION ? 'default' : name); // set up xterm terminal // @@ -234,7 +235,7 @@ export default function Buffer({ name, selected, dark }: BufferProps) { if (container.current) { container.current.style.backgroundColor = theme.background || ''; } - }, [dark]); + }, [session, dark]); useEffect(() => { if (session && selected && !session.term.isOpen) {
Fluent interface for SetIndentSpaces and SetWriteNanAsString.
@@ -72,15 +72,17 @@ namespace NJsonWriter { /*** Indent the resulting JSON with spaces. * By default (spaces==0) no formatting is done. */ - void SetIndentSpaces(int spaces) { + TBuf& SetIndentSpaces(int spaces) { IndentSpaces = spaces; + return *this; } /*** NaN and Inf are not valid json values, * so if WriteNanAsString is set, writer would write string * intead of throwing exception (default case) */ - void SetWriteNanAsString(bool writeNanAsString = true) { + TBuf& SetWriteNanAsString(bool writeNanAsString = true) { WriteNanAsString = writeNanAsString; + return *this; } /*** Return the string formed in the internal TStringStream.
Add debug macro for the UseColorHandleProtected setting
@@ -120,6 +120,14 @@ NTSTATUS PhOpenProcess( clientId.UniqueProcess = ProcessId; clientId.UniqueThread = NULL; +#ifdef _DEBUG + if (ProcessId == NtCurrentProcessId()) + { + *ProcessHandle = NtCurrentProcess(); + return STATUS_SUCCESS; + } +#endif + if (KphIsVerified() && (DesiredAccess & KPH_PROCESS_READ_ACCESS) == DesiredAccess) { status = KphOpenProcess(
CMake: Link libm to test binaries if available. If libm is available link it to test binaries which will otherwise fail to compile. Tested on FreeBSD 13-STABLE.
add_executable(vorbis_test util.c util.h write_read.c write_read.h test.c) -target_link_libraries(vorbis_test PRIVATE Vorbis::vorbisenc) +target_link_libraries(vorbis_test PRIVATE Vorbis::vorbisenc $<$<BOOL:${HAVE_LIBM}>:m>) add_test(NAME vorbis_test COMMAND vorbis_test)
OcAppleKernelImageLib: Fix _kmod_info stab handling
@@ -108,6 +108,7 @@ PrelinkedFindKmodAddress ( return 0; } + if ((Symbol->Type & MACH_N_TYPE_STAB) == 0) { SymbolName = MachoGetSymbolName64 (ExecutableContext, Symbol); if (SymbolName && AsciiStrCmp (SymbolName, "_kmod_info") == 0) { if (!MachoIsSymbolValueInRange64 (ExecutableContext, Symbol)) { @@ -115,6 +116,7 @@ PrelinkedFindKmodAddress ( } break; } + } Index++; }
Remove duplicate fabsf
@@ -2745,6 +2745,7 @@ VOID PhCustomDrawTreeTimeLine( RECT rect = CellRect; RECT borderRect = CellRect; FLOAT percent = 0; + FLOAT percentabs = 0; LARGE_INTEGER systemTime; LARGE_INTEGER startTime; LARGE_INTEGER createTime; @@ -2795,13 +2796,14 @@ VOID PhCustomDrawTreeTimeLine( // Note: Time is 8 bytes, Float is 4 bytes. Use DOUBLE type at some stage. (dmex) percent = (FLOAT)createTime.QuadPart / (FLOAT)startTime.QuadPart * 100.f; + percentabs = fabsf(percent); if (!(Flags & PH_DRAW_TIMELINE_OVERFLOW)) { // Prevent overflow from changing the system time to an earlier date. (dmex) - if (fabsf(percent) > 100.f) + if (percentabs > 100.f) percent = 100.f; - if (fabsf(percent) < 0.0005f) + if (percentabs < 0.0005f) percent = 0.f; } @@ -2839,9 +2841,9 @@ VOID PhCustomDrawTreeTimeLine( if (Flags & PH_DRAW_TIMELINE_OVERFLOW) { // Prevent overflow from changing the system time to an earlier date. (dmex) - if (fabsf(percent) > 100.f) + if (percentabs > 100.f) percent = 100.f; - if (fabsf(percent) < 0.0005f) + if (percentabs < 0.0005f) percent = 0.f; }
NetKVM: TX: Kick ring when full
@@ -510,9 +510,10 @@ bool CParaNdisTX::SendMapped(bool IsInterrupt, CRawCNBLList& toWaitingList) { bool SentOutSomeBuffers = false; bool bRestartStatus = false; + bool HaveBuffers = true; + if(ParaNdis_IsSendPossible(m_Context)) { - auto HaveBuffers = true; while (HaveBuffers && HaveMappedNBLs()) { @@ -575,7 +576,7 @@ bool CParaNdisTX::SendMapped(bool IsInterrupt, CRawCNBLList& toWaitingList) bRestartStatus = RestartQueue(); } - if (SentOutSomeBuffers) + if (SentOutSomeBuffers || !HaveBuffers) { m_VirtQueue.Kick(); }
add String#empty? method.
@@ -612,6 +612,15 @@ static void c_string_dup(struct VM *vm, mrbc_value v[], int argc) } +//================================================================ +/*! (method) empty? +*/ +static void c_string_empty(struct VM *vm, mrbc_value v[], int argc) +{ + SET_BOOL_RETURN( !mrbc_string_size( &v[0] )); +} + + //================================================================ /*! (method) getbyte */ @@ -1294,6 +1303,7 @@ void mrbc_init_class_string(struct VM *vm) mrbc_define_method(vm, mrbc_class_string, "chomp", c_string_chomp); mrbc_define_method(vm, mrbc_class_string, "chomp!", c_string_chomp_self); mrbc_define_method(vm, mrbc_class_string, "dup", c_string_dup); + mrbc_define_method(vm, mrbc_class_string, "empty?", c_string_empty); mrbc_define_method(vm, mrbc_class_string, "getbyte", c_string_getbyte); mrbc_define_method(vm, mrbc_class_string, "index", c_string_index); mrbc_define_method(vm, mrbc_class_string, "inspect", c_string_inspect);
Add copyright header to pyopae/opae.cpp
+// Copyright(c) 2017-2018, Intel Corporation +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are met: +// +// * Redistributions of source code must retain the above copyright notice, +// this list of conditions and the following disclaimer. +// * Redistributions in binary form must reproduce the above copyright notice, +// this list of conditions and the following disclaimer in the documentation +// and/or other materials provided with the distribution. +// * Neither the name of Intel Corporation nor the names of its contributors +// may be used to endorse or promote products derived from this software +// without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE +// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR +// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF +// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS +// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN +// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) +// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE +// POSSIBILITY OF SUCH DAMAGE. #include <Python.h> #include <opae/cxx/core/token.h> #include <opae/cxx/core/version.h>
fix for link to doxygen
@@ -58,7 +58,7 @@ The IoTivity project was created to bring together the open-source community to IoTivity stack features ----------------------- -- **OS agnostic:** The `IoTivity device stack (https://iotivity.github.io/iotivity-lite-doxygen/)` and modules work cross-platform (pure C code) and execute in an event-driven style. The stack interacts with lower level OS/hardware platform-specific functionality through a set of abstract interfaces. This decoupling of the common OCF standards related functionality from platform adaptation code promotes ease of long-term maintenance and evolution of the stack through successive releases of the OCF specifications. +- **OS agnostic:** The `IoTivity device stack <https://iotivity.github.io/iotivity-lite-doxygen/>`_ and modules work cross-platform (pure C code) and execute in an event-driven style. The stack interacts with lower level OS/hardware platform-specific functionality through a set of abstract interfaces. This decoupling of the common OCF standards related functionality from platform adaptation code promotes ease of long-term maintenance and evolution of the stack through successive releases of the OCF specifications. .. image:: Porting.png :scale: 100%
src: Removed page entry removing the `TESTING.md` from the documentation menu on the website
}], "dev-comment": "" - }, - { - "name": "Testing", - "type": "parsereadme", - "ref": "testing", - "options": { - "path": "doc/TESTING.md", - "target_file": [], - "parsing": { - "section_regex": "## ([^#]+)", - "entry_regex": "^\\- \\[(.+)\\]\\(([^\\)]+)\\)(.*)" - }, - "name": { - "make_pretty": false - } - }, - "dev-comment": "" }, { "name": "Tutorials",
Fix top-level test makefile (which is not used in Travis), only intended for local use
# SUCH DAMAGE. TESTS=$(wildcard ??-*) -SUMMARIES=$(foreach test,$(TESTS),summary-$(test)) +SUMMARIES=$(foreach test,$(TESTS),$(test)/summary) CONTIKI=.. run: clean summary summary: $(SUMMARIES) - grep '' $(SUMMARIES) > summary + @cat $(SUMMARIES) > $@ -summary-%: +%/summary: @make -C $* summary || true - @echo -n $* | cat - $*/summary > $@ - @rm $*/summary clean: - rm -f $(SUMMARIES) - -cooja: $(CONTIKI)/tools/cooja/dist/cooja.jar -$(CONTIKI)/tools/cooja/dist/cooja.jar: - (cd $(CONTIKI)/tools/cooja; ant jar) + rm -f $(SUMMARIES) summary scan-build: cd scan_build && scan-build $(MAKE)
Fix gui app initialzation order
@@ -15,10 +15,6 @@ Application::Application(int &argc, char **argv) while (waitForDebbugger) ; - qmlRegisterType<ParameterProxy>("org.clap", 1, 0, "ParameterProxy"); - qmlRegisterType<TransportProxy>("org.clap", 1, 0, "TransportProxy"); - qmlRegisterType<PluginProxy>("org.clap", 1, 0, "PluginProxy"); - QCommandLineParser parser; QCommandLineOption skinOpt("skin", tr("path to the skin directory"), tr("path")); @@ -32,19 +28,22 @@ Application::Application(int &argc, char **argv) parser.process(*this); + qmlRegisterType<ParameterProxy>("org.clap", 1, 0, "ParameterProxy"); + qmlRegisterType<TransportProxy>("org.clap", 1, 0, "TransportProxy"); + qmlRegisterType<PluginProxy>("org.clap", 1, 0, "PluginProxy"); + _pluginProxy = new PluginProxy(this); _transportProxy = new TransportProxy(this); - auto qmlContext = _quickView->engine()->rootContext(); - for (const auto &str : parser.values(qmlLibOpt)) - _quickView->engine()->addImportPath(str); - qmlContext->setContextProperty("plugin", _pluginProxy); - qmlContext->setContextProperty("transport", _transportProxy); - - _quickView->setSource(parser.value(skinOpt) + "/main.qml"); + //////////////////////// + // I/O initialization // + //////////////////////// auto socket = parser.value(socketOpt).toULongLong(); + _remoteChannel.reset(new clap::RemoteChannel( + [this](const clap::RemoteChannel::Message &msg) { onMessage(msg); }, *this, socket, false)); + _socketReadNotifier.reset(new QSocketNotifier(socket, QSocketNotifier::Read, this)); connect(_socketReadNotifier.get(), &QSocketNotifier::activated, @@ -72,14 +71,21 @@ Application::Application(int &argc, char **argv) quit(); }); - _remoteChannel.reset(new clap::RemoteChannel( - [this](const clap::RemoteChannel::Message &msg) { onMessage(msg); }, *this, socket, false)); - _socketReadNotifier->setEnabled(true); _socketWriteNotifier->setEnabled(false); _socketErrorNotifier->setEnabled(false); - QCoreApplication::arguments(); + //////////////////////// + // QML initialization // + //////////////////////// + + auto qmlContext = _quickView->engine()->rootContext(); + for (const auto &str : parser.values(qmlLibOpt)) + _quickView->engine()->addImportPath(str); + qmlContext->setContextProperty("plugin", _pluginProxy); + qmlContext->setContextProperty("transport", _transportProxy); + + _quickView->setSource(parser.value(skinOpt) + "/main.qml"); } void Application::modifyFd(clap_fd_flags flags) {
CBLK: Request timeout is now configurable as env var
#undef CONFIG_WAIT_FOR_IRQ /* Not fully working */ #define CONFIG_REQUEST_TIMEOUT 5 +static int cblk_reqtimeout = CONFIG_REQUEST_TIMEOUT; + /* * FIXME The following stuff most likely neesd to go in a header file * which can be accessed outside this code, or the functionalty in this @@ -560,7 +562,7 @@ static void *done_thread(void *arg) else no_result_counter++; gettimeofday(&etime, NULL); - check_request_timeouts(c, &etime, CONFIG_REQUEST_TIMEOUT * 1000); + check_request_timeouts(c, &etime, cblk_reqtimeout * 1000); pthread_testcancel(); /* go home if requested */ } } @@ -966,8 +968,14 @@ static void _init(void) __attribute__((constructor)); static void _init(void) { - block_trace("[%s] init\n", __func__); + const char *reqtimeout_env; + + reqtimeout_env = getenv("CBLK_REQTIMEOUT"); + if (reqtimeout_env != NULL) + cblk_reqtimeout = strtol(reqtimeout_env, (char **)NULL, 0); + block_trace("[%s] init CBLK_REQTIMEOUT=%d\n", + __func__, cblk_reqtimeout); } static void _done(void) __attribute__((destructor));
redis-cli: Do DNS lookup before sending CLUSTER MEET Affects `--cluster create` and `--cluster add-node`.
#define CC_FORCE (1<<0) /* Re-connect if already connected. */ #define CC_QUIET (1<<1) /* Don't log connecting errors. */ +/* DNS lookup */ +#define NET_IP_STR_LEN 46 /* INET6_ADDRSTRLEN is 46 */ + /* --latency-dist palettes. */ int spectrum_palette_color_size = 19; int spectrum_palette_color[] = {0,233,234,235,237,239,241,243,245,247,144,143,142,184,226,214,208,202,196}; @@ -6306,16 +6309,26 @@ assign_replicas: clusterManagerLogInfo(">>> Sending CLUSTER MEET messages to join " "the cluster\n"); clusterManagerNode *first = NULL; + char first_ip[NET_IP_STR_LEN]; /* first->ip may be a hostname */ listRewind(cluster_manager.nodes, &li); while ((ln = listNext(&li)) != NULL) { clusterManagerNode *node = ln->value; if (first == NULL) { first = node; + /* Although hiredis supports connecting to a hostname, CLUSTER + * MEET requires an IP address, so we do a DNS lookup here. */ + if (anetResolve(NULL, first->ip, first_ip, sizeof(first_ip), ANET_NONE) + == ANET_ERR) + { + fprintf(stderr, "Invalid IP address or hostname specified: %s\n", first->ip); + success = 0; + goto cleanup; + } continue; } redisReply *reply = NULL; reply = CLUSTER_MANAGER_COMMAND(node, "cluster meet %s %d", - first->ip, first->port); + first_ip, first->port); int is_err = 0; if (reply != NULL) { if ((is_err = reply->type == REDIS_REPLY_ERROR)) @@ -6487,8 +6500,15 @@ static int clusterManagerCommandAddNode(int argc, char **argv) { // Send CLUSTER MEET command to the new node clusterManagerLogInfo(">>> Send CLUSTER MEET to node %s:%d to make it " "join the cluster.\n", ip, port); + /* CLUSTER MEET requires an IP address, so we do a DNS lookup here. */ + char first_ip[NET_IP_STR_LEN]; + if (anetResolve(NULL, first->ip, first_ip, sizeof(first_ip), ANET_NONE) == ANET_ERR) { + fprintf(stderr, "Invalid IP address or hostname specified: %s\n", first->ip); + success = 0; + goto cleanup; + } reply = CLUSTER_MANAGER_COMMAND(new_node, "CLUSTER MEET %s %d", - first->ip, first->port); + first_ip, first->port); if (!(success = clusterManagerCheckRedisReply(new_node, reply, NULL))) goto cleanup;
interface: add lodash import to prevent crash in NewChannel
@@ -5,6 +5,7 @@ import { Col, Text } from '@tlon/indigo-react'; +import _ from 'lodash'; import { Formik, Form } from 'formik'; import * as Yup from 'yup'; import GlobalApi from '~/logic/api/global';
fix possible fatal error
@@ -2036,4 +2036,6 @@ void quicctx_register_noparam_protoops(picoquic_cnx_t *cnx) /** \todo document these */ register_noparam_protoop(cnx, &PROTOOP_NOPARAM_CONNECTION_ERROR, &connection_error); + + register_noparam_protoop(cnx, &PROTOOP_NOPARAM_NOPARAM_UNKNOWN_TP_RECEIVED, &protoop_noop); } \ No newline at end of file
[lib][gfx][mandelbrot] make sure alpha channel is set stm32f7 discovery board apparently requires the alpha channel to be set.
@@ -799,7 +799,7 @@ static int gfx_draw_mandlebrot(gfx_surface * surface){ } else { color = 0x231AF9 * iter; } - gfx_putpixel(surface, x, y, color); + gfx_putpixel(surface, x, y, 0xff << 24 | color); } ci = ci + dy; }
more detailed location info for mspec failures
@@ -6,7 +6,7 @@ module MSpec #RHO @count = 0 @exc_count = 0 - @exc_locations = [] + @exc_locations = {} #RHO @exit = nil @@ -68,7 +68,7 @@ module MSpec #RHO @count = 0 @exc_count = 0 - @exc_locations = [] + @exc_locations = {} #RHO STDOUT.puts RUBY_DESCRIPTION @@ -139,7 +139,18 @@ module MSpec #RHO puts "FAIL: #{current} - #{exc.message}\n" + (@backtrace ? exc.backtrace.join("\n") : "") - @exc_locations << { 'message' => exc.message, 'backtrace' => exc.backtrace } + + info = { 'message' => exc.message, 'backtrace' => exc.backtrace } + + key = current.state.description + + if @exc_locations[key].nil? + @exc_locations[key] = [] + end + + @exc_locations[key] << info + + #@exc_locations << { 'spec' => current, 'message' => exc.message, 'backtrace' => exc.backtrace } @exc_count+=1 #RHO
u3: rewrites +muk jet to skip heap allocations where possible
u3_atom len, u3_atom key) { - c3_w seed_w; - c3_w len_w; - c3_y *key_y; - c3_w out_w; - - c3_assert( u3r_met(5, seed) <= 1 ); - c3_assert( u3r_met(0, len) <= 31 ); - c3_assert( u3r_met(3, key) <= len ); - - seed_w = u3r_word(0, seed); - len_w = u3r_word(0, len); + c3_w key_w = u3r_met(3, key); - // can't u3a_calloc 0 bytes + // XX revisit + // + // the first two conditions are explicitly asserted in +muk; + // the third is implicit in the pad subtraction. + // + // the first assertion is semantically required for murmur32, + // the latter two are particular to our hoon implementation. // - if ( 0 == len_w ) { - key_y = 0; + // +muk (via +mug) is routinely "called" on samples that + // violate these assertions. + // are all three necessary for the rest of +muk to be correct? + // + if ( (u3r_met(5, seed) > 1) || + (u3r_met(0, len) > 31) || + (key_w > len) ) + { + return u3m_bail(c3__exit); } else { - key_y = u3a_calloc(sizeof(c3_y), len_w); - } + c3_w seed_w = u3r_word(0, seed); + c3_w len_w = u3r_word(0, len); + c3_o loc_o = c3n; + c3_y* key_y = 0; + c3_w out_w; - // Efficiency: unnecessary copy. - // - // We could calculate the hash directly against - // the atom internals, a la u3r_mug + // if we're hashing more bytes than we have, allocate and copy + // to ensure trailing null bytes // + if ( len_w > key_w ) { + loc_o = c3y; + key_y = u3a_calloc(sizeof(c3_y), len_w); u3r_bytes(0, len_w, key_y, key); + } + else if ( len_w > 0 ) { + key_y = ( c3y == u3a_is_cat(key) ) + ? (c3_y*)&key + : (c3_y*)((u3a_atom*)u3a_to_ptr(key))->buf_w; + } MurmurHash3_x86_32(key_y, len_w, seed_w, &out_w); + if ( c3y == loc_o ) { u3a_free(key_y); + } + return u3i_words(1, &out_w); } +} u3_noun u3wc_muk(u3_noun cor) (c3n == u3ud(key)) ) { return u3m_bail(c3__exit); - } else { + } + else { return u3qc_muk(seed, len, key); } }
bluez5: Replace /lib with ${nonarch_base_libdir} Use standard /lib variable name and avoid QA errors when usermerge DISTRO_FEATURE is enabled.
@@ -10,8 +10,8 @@ BCM_BT_SOURCES = " \ " enable_bcm_bluetooth() { - install -d ${D}/lib/firmware/brcm/ - install -m 0644 ${WORKDIR}/BCM43430A1.hcd ${D}/lib/firmware/brcm/BCM43430A1.hcd + install -d ${D}${nonarch_base_libdir}/firmware/brcm/ + install -m 0644 ${WORKDIR}/BCM43430A1.hcd ${D}${nonarch_base_libdir}/firmware/brcm/BCM43430A1.hcd if ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'true', 'false', d)}; then install -d ${D}${systemd_unitdir}/system @@ -20,7 +20,7 @@ enable_bcm_bluetooth() { } BCM_BT_FIRMWARE = " \ - /lib/firmware/brcm/BCM43430A1.hcd \ + ${nonarch_base_libdir}/firmware/brcm/BCM43430A1.hcd \ " BCM_BT_SERVICE = " brcm43438.service"
dma-pool: 32byte alignment for h7
@@ -83,9 +83,9 @@ typedef struct _dma_allocation { struct _dma_allocation *prev; struct _dma_allocation *next; -} dma_allocation_t; +} __attribute__((aligned(32))) dma_allocation_t; -#define DMA_ALIGN_SIZE 4 +#define DMA_ALIGN_SIZE 32 #define DMA_ALIGN(offset) ((offset + (DMA_ALIGN_SIZE - 1)) & -DMA_ALIGN_SIZE) static DMA_RAM uint8_t buffer[DMA_ALLOC_BUFFER_SIZE];
Fix the compiling errors on msvc ARM64 configuration.
@@ -120,7 +120,7 @@ static inline int vorbis_ftoi(double f){ /* yes, double! Otherwise, /* MSVC inline assembly. 32 bit only; inline ASM isn't implemented in the * 64 bit compiler and doesn't work on arm. */ #if defined(_MSC_VER) && !defined(_WIN64) && \ - !defined(_WIN32_WCE) && !defined(_M_ARM) + !defined(_WIN32_WCE) && !defined(_M_ARM) && !defined(_M_ARM64) # define VORBIS_FPU_CONTROL typedef ogg_int16_t vorbis_fpu_control;
bugfix in heuristic for groupping level
@@ -35,25 +35,7 @@ namespace NCatboostCuda { return binCount * 1.0 / 256; } - //for features with binCount > 128 heuristic to group most sparse - //features together as this'll increase register cache hit - //and reduce atomic conflicts - if (DataProvider && !Manager->IsCtr(featureId)) { - const ui32 dataProviderId = Manager->GetDataProviderId(featureId); - - if (!DataProvider->HasFeatureId(dataProviderId)) { - return 2.0; - } - const IFeatureValuesHolder& featureValuesHolder = DataProvider->GetFeatureById(dataProviderId); - if (featureValuesHolder.GetType() == EFeatureValuesType::Float) { - return 2.0; - } else { - CB_ENSURE(featureValuesHolder.GetType() == EFeatureValuesType::BinarizedFloat); - } - - return 1.0 + dynamic_cast<const TCompressedValuesHolderImpl&>(DataProvider->GetFeatureById(dataProviderId)).SparsityLevel(); - } - return 2.0; + return 1.0 + binCount / 256; } bool IsOneHot(ui32 featureId) const {
[testcase/filesystem/itc]fix failure of testcase during call of fgets and fputs testcase : 1. itc_libc_stdio_fseek_ftell_p is modified for correct implementation of string constant variable,which is written in file. 2. Earlier itc_libc_stdio_fputs_fgets_p ,which has been resolved after this fix.
@@ -1212,8 +1212,9 @@ static void itc_libc_stdio_fseek_ftell_p(void) { FILE *fp; char *filename = VFS_FILE_PATH; - char *write_buf; + char write_buf[BUFFER_LEN]; char read_buf[BUFFER_LEN]; + int null_index = 15; fp = fopen(filename, "w+"); TC_ASSERT_NEQ("fopen", fp, NULL); @@ -1221,8 +1222,9 @@ static void itc_libc_stdio_fseek_ftell_p(void) TC_ASSERT_EQ_CLEANUP("fseek", fseek(fp, 0, SEEK_SET), OK, fclose(fp)); TC_ASSERT_EQ_CLEANUP("ftell", ftell(fp), (long)0, fclose(fp)); - write_buf = VFS_TEST_CONTENTS_1; - write_buf[15] = '\0'; + strncpy(write_buf, VFS_TEST_CONTENTS_1, strlen(VFS_TEST_CONTENTS_1)); + + write_buf[null_index] = '\0'; TC_ASSERT_NEQ_CLEANUP("fputs", fputs(write_buf, fp), EOF, fclose(fp)); TC_ASSERT_EQ_CLEANUP("fseek", fseek(fp, 0, SEEK_CUR), OK, fclose(fp));
Fixed hci uart tx long data error
@@ -154,7 +154,7 @@ void IRAM_ATTR hci_uart_start_tx(int port_num) data = hci_uart.tx_char(hci_uart.u_func_arg); if (data >= 0) { u8_data = data; - uart_tx_chars(port_num, (char *)&u8_data, 1); + uart_write_bytes(port_num, (char *)&u8_data, 1); } else { break; }
xfconf-plugin: Remove xfconf from macOS test builds
@@ -99,7 +99,7 @@ task: env: BUILD_FULL: ON BUILD_SHARED: OFF - PLUGINS: ALL;-curlget # The curlget tests fail: https://github.com/ElektraInitiative/libelektra/issues/3382 + PLUGINS: ALL;-curlget;-xfconf # The curlget tests fail: https://github.com/ElektraInitiative/libelektra/issues/3382 xfce4 is uncommon on macOS install_script: - | # Install Homebrew formulas
packaging: add package dependencies augeas-lenses + glibc-locale to opensuse
@@ -66,6 +66,9 @@ set (CPACK_RPM_LIBELEKTRA${SO_VERSION}-EXPERIMENTAL_PACKAGE_DESCRIPTION "${PACKA set (CPACK_RPM_LIBELEKTRA${SO_VERSION}-EXPERIMENTAL_DEBUGINFO_PACKAGE "${PACKAGE_DEBUGINFO}") set (CPACK_RPM_LIBELEKTRA${SO_VERSION}-EXTRA_PACKAGE_NAME "${CPACK_COMPONENT_LIBELEKTRA${SO_VERSION}-EXTRA_DISPLAY_NAME}") +if ("${OS_NAME}" MATCHES "openSUSE") + set (CPACK_RPM_LIBELEKTRA${SO_VERSION}-EXTRA_PACKAGE_REQUIRES "glibc-locale") +endif () set (CPACK_RPM_LIBELEKTRA${SO_VERSION}-EXTRA_PACKAGE_SUGGESTS "elektra-doc, ${ALL_PLUGINS_STR}") set (CPACK_RPM_LIBELEKTRA${SO_VERSION}-EXTRA_PACKAGE_SUMMARY "${CPACK_COMPONENT_LIBELEKTRA${SO_VERSION}-EXTRA_DESCRIPTION}") set (CPACK_RPM_LIBELEKTRA${SO_VERSION}-EXTRA_PACKAGE_DESCRIPTION "${PACKAGE_DESCRIPTION}") @@ -82,6 +85,9 @@ set (CPACK_RPM_LIBELEKTRA-DEV_PACKAGE_SUMMARY "${CPACK_COMPONENT_LIBELEKTRA-DEV_ set (CPACK_RPM_LIBELEKTRA-DEV_PACKAGE_DESCRIPTION "${PACKAGE_DESCRIPTION}") set (CPACK_RPM_LIBELEKTRA${SO_VERSION}-AUGEAS_PACKAGE_NAME "${CPACK_COMPONENT_LIBELEKTRA${SO_VERSION}-AUGEAS_DISPLAY_NAME}") +if ("${OS_NAME}" MATCHES "openSUSE") + set (CPACK_RPM_LIBELEKTRA${SO_VERSION}-AUGEAS_PACKAGE_REQUIRES "augeas-lenses") +endif () set (CPACK_RPM_LIBELEKTRA${SO_VERSION}-AUGEAS_PACKAGE_SUMMARY "${CPACK_COMPONENT_LIBELEKTRA${SO_VERSION}-AUGEAS_DESCRIPTION}") set (CPACK_RPM_LIBELEKTRA${SO_VERSION}-AUGEAS_PACKAGE_DESCRIPTION "${PACKAGE_DESCRIPTION}") set (CPACK_RPM_LIBELEKTRA${SO_VERSION}-AUGEAS_DEBUGINFO_PACKAGE "${PACKAGE_DEBUGINFO}")
BugID:19199002: Fix defect of HAL implementation.
@@ -257,12 +257,14 @@ static void stop_netmgr(void *p) void do_awss_dev_ap() { aos_task_new("netmgr_stop", stop_netmgr, NULL, 4096); + netmgr_clear_ap_config(); aos_task_new("dap_open", awss_open_dev_ap, NULL, 4096); } void do_awss() { aos_task_new("dap_close", awss_close_dev_ap, NULL, 2048); + netmgr_clear_ap_config(); aos_task_new("netmgr_start", start_netmgr, NULL, 4096); } #endif
Fix inline asm in dscal: mark x, x1 as clobbered. Fixes The leaq instructions in dscal_kernel_inc_8 modify x and x1 so they must be declared as input/output constraints, otherwise the compiler may assume the corresponding registers are not modified.
@@ -136,10 +136,10 @@ static void dscal_kernel_inc_8(BLASLONG n, FLOAT *alpha, FLOAT *x, BLASLONG inc_ "jnz 1b \n\t" : - "+r" (n) // 0 + "+r" (n), // 0 + "+r" (x), // 1 + "+r" (x1) // 2 : - "r" (x), // 1 - "r" (x1), // 2 "r" (alpha), // 3 "r" (inc_x), // 4 "r" (inc_x3) // 5
LMS7002M: control usage of SX VCO cache with useCache flag
@@ -1520,7 +1520,7 @@ int LMS7002M::SetFrequencySX(bool tx, float_type freq_Hz, SX_details* output) Modify_SPI_Reg_bits(LMS7param(PD_VCO_COMP), 0); // try setting tuning values from the cache, if it fails perform full tuning - if (tuning_cache_sel_vco.count(freq_Hz) > 0) + if (useCache && tuning_cache_sel_vco.count(freq_Hz) > 0) { Modify_SPI_Reg_bits(LMS7param(SEL_VCO), tuning_cache_sel_vco[freq_Hz]); Modify_SPI_Reg_bits(LMS7param(CSW_VCO).address, LMS7param(CSW_VCO).msb, LMS7param(CSW_VCO).lsb, tuning_cache_csw_value[freq_Hz]); @@ -1584,7 +1584,7 @@ int LMS7002M::SetFrequencySX(bool tx, float_type freq_Hz, SX_details* output) Modify_SPI_Reg_bits(LMS7param(CSW_VCO), csw_value); // save successful tuning results in cache - if (canDeliverFrequency) { + if (useCache && canDeliverFrequency) { tuning_cache_sel_vco[freq_Hz] = sel_vco; tuning_cache_csw_value[freq_Hz] = csw_value; }
Handle the renamed command POD files in find-doc-nits
@@ -533,6 +533,7 @@ my %skips = ( sub checkflags() { my $cmd = shift; + my $doc = shift; my %cmdopts; my %docopts; my $ok = 1; @@ -548,8 +549,8 @@ sub checkflags() { close CFH; # Get the list of flags from the synopsis - open CFH, "<doc/man1/$cmd.pod" - || die "Can't open $cmd.pod, $!"; + open CFH, "<$doc" + || die "Can't open $doc, $!"; while ( <CFH> ) { chop; last if /DESCRIPTION/; @@ -617,13 +618,15 @@ if ( $opt_c ) { close FH; # See if each has a manpage. - foreach ( @commands ) { - next if $_ eq 'help' || $_ eq 'exit'; - if ( ! -f "doc/man1/$_.pod" ) { - print "doc/man1/$_.pod does not exist\n"; + foreach my $cmd ( @commands ) { + next if $cmd eq 'help' || $cmd eq 'exit'; + my $doc = "doc/man1/$cmd.pod"; + $doc = "doc/man1/openssl-$cmd.pod" if -f "doc/man1/openssl-$cmd.pod"; + if ( ! -f "$doc" ) { + print "$doc does not exist\n"; $ok = 0; } else { - $ok = 0 if not &checkflags($_); + $ok = 0 if not &checkflags($cmd, $doc); } }
List Test: Fix side effect of test
@@ -3,7 +3,7 @@ Mountpoint: system/tmount/list File: /tmp/listtest.dump MountArgs: list placements=,placements/set="presetstorage precommit postcommit",plugins=,plugins/#0=tracer,plugins/#0/placements=,plugins/#0/placements/set="presetstorage precommit postcommit",plugins/#1=timeofday,plugins/#1/placements=,plugins/#1/placements/set="presetstorage precommit postcommit" -< kdb export /sw/kdb/current/plugins dump > /tmp/elektra_sw_plugins.txt +< kdb export /sw dump > /tmp/sw.dump < kdb rm -r /sw/kdb/current/plugins RET: 0 @@ -18,6 +18,8 @@ RET: 0 < kdb ls $Mountpoint -< kdb import /sw/kdb/current/plugins dump < /tmp/elektra_sw_plugins.txt +< kdb rm -rf /sw +< kdb import /sw dump < /tmp/sw.dump +< rm /tmp/sw.dump < kdb umount $Mountpoint
tcp_accept stub man page filled in
@@ -11,7 +11,11 @@ tcp_accept - accepts an incoming TCP connection # DESCRIPTION -TODO +TCP protocol is a bytestream protocol (i.e. data can be sent via **bsend()** and received via **brecv()**) for transporting data among machines. + +This function accepts an incoming TCP connection from the listening socket _s_. + +_deadline_ is a point in time when the operation should time out. Use the **now()** function to get your current point in time. 0 means immediate timeout, i.e., perform the operation if possible or return without blocking if not. -1 means no deadline, i.e., the call will block forever if the operation cannot be performed. # RETURN VALUE @@ -19,8 +23,16 @@ Newly created socket handle. On error, it returns -1 and sets _errno_ to one of # ERRORS -TODO +* **EBADF**: Invalid socket handle. +* **ECANCELED**: Current coroutine is being shut down. +* **EMFILE**: The maximum number of file descriptors in the process are already open. +* **ENFILE**: The maximum number of file descriptors in the system are already open. +* **ENOMEM**: Not enough memory. +* **ETIMEDOUT**: Deadline was reached. # EXAMPLE -TODO +```c +int listener = tcp_listen(&addr, 10); +int s = tcp_accept(listener, -1); +```
Allow miter joints in hardware rendering for line widths of 1 pixel.
@@ -1868,7 +1868,8 @@ public: UserPoint p; UserPoint dir1; - bool fancyJoints = mPerpLen*mScale > 1.0 && (mJoints==sjRound || mJoints==sjMiter); + bool fancyJoints = ( mPerpLen*mScale > 1.0 && mJoints==sjRound ) || + ( mPerpLen*mScale >= 0.999 && mJoints==sjMiter); for(int i=1;i<inPath.size();i++) {
Add iterator for all section, key, val pairs in inifile.
@@ -8,7 +8,11 @@ pkg inifile = ini : inifile# idx : int ;; + type inikviter = struct + iter : std.htkviter((byte[:], byte[:]), byte[:]) + ;; impl iterable inisectiter -> byte[:] + impl iterable inikviter -> (byte[:], byte[:], byte[:]) /* key getting/setting */ const get : (ini : inifile#, sect : byte[:], key : byte[:] -> std.option(byte[:])) @@ -17,6 +21,7 @@ pkg inifile = const put : (ini : inifile#, sect : byte[:], key : byte[:], val : byte[:] -> void) const bysection : (ini : inifile# -> inisectiter) + const bykeyval : (ini : inifile# -> inikviter) ;; const get = {ini, sect, key @@ -45,6 +50,24 @@ const bysection = {ini -> [.ini=ini, .idx=0] } +const bykeyval = {ini + -> [.iter = std.byhtkeyvals(ini.elts)] +} + + +impl iterable inikviter -> (byte[:], byte[:], byte[:]) = + __iternext__ = {itp, valp + var s, k, v, p, r + r = __iternext__(&itp.iter, &p) + ((s, k), v) = p + valp# = (s, k, v) + -> r + } + + __iterfin__ = {itp, valp + } +;; + impl iterable inisectiter -> byte[:] = __iternext__ = {itp, valp : byte[:]# if itp.idx < itp.ini.sects.len
Break the input loop on error or EOF
@@ -170,8 +170,8 @@ void app_main(void) * The line is returned when ENTER is pressed. */ char* line = linenoise(prompt); - if (line == NULL) { /* Ignore empty lines */ - continue; + if (line == NULL) { /* Break on EOF or error */ + break; } /* Add the command to the history */ linenoiseHistoryAdd(line); @@ -195,4 +195,8 @@ void app_main(void) /* linenoise allocates line buffer on the heap, so need to free it */ linenoiseFree(line); } + + ESP_LOGE(TAG, "Error or end-of-input, terminating console"); + esp_console_deinit(); + vTaskDelete(NULL); /* terminate app_main */ }
Bugfix + core example (but has infinite type until recursive types are implemented).
@@ -134,7 +134,8 @@ infer sut = \case infer ty bod Eva new bod -> do sut' <- infer sut new - infer sut bod >>= nokResTy sut + nokTy <- infer sut bod + nokResTy sut' nokTy Fir n (corTy, armTys) cor -> do corTy' <- infer sut cor armTys' <- battery corTy @@ -208,6 +209,25 @@ eatEx = Eat [Nat, Nat] , Inc (Lit 0) ] +lamEx :: Exp +lamEx = Lam Nat (tup2 (Inc Sub) Sub) + +evaEx :: Exp +evaEx = Eva (Lit 0) lamEx + +armExTy, batExTy, corExTy :: Ty +armExTy = Nok corExTy Nat +batExTy = Mul [armExTy] +corExTy = Mul [batExTy, Nat] + +armEx :: Exp +armEx = Lam corExTy Sub + +batEx :: Exp +batEx = Tup [armEx] + +corEx :: Exp +corEx = Tup [batEx, Lit 0] -------------------------------------------------------------------------------- @@ -236,8 +256,26 @@ tryCho = try "cho" choEx tryEat :: IO () tryEat = try "eat" eatEx +tryLam :: IO () +tryLam = try "lam" lamEx + +tryEva :: IO () +tryEva = try "eva" evaEx + +{- TODO Implement recursive types -} +-- tryArm :: IO () +-- tryArm = try "arm" armEx + +{- TODO Implement recursive types -} +-- tryBat :: IO () +-- tryBat = try "bat" batEx + +{- TODO Implement recursive types -} +-- tryCor :: IO () +-- tryCor = try "cor" corEx + tryAll :: IO () -tryAll = tryTup >> tryWit >> tryCho >> tryEat +tryAll = tryTup >> tryWit >> tryCho >> tryEat >> tryLam >> tryEva --------------------------------------------------------------------------------
HAL: Create the hal_gpio_deinit() prototype In order to revert the hal_gpio_init_*() to disconnect the physical pin
@@ -101,6 +101,15 @@ int hal_gpio_init_in(int pin, hal_gpio_pull_t pull); */ int hal_gpio_init_out(int pin, int val); +/** + * Deinitialize the specified pin to revert the previous initialization + * + * @param pin Pin number to unset + * + * @return int 0: no error; -1 otherwise. + */ +int hal_gpio_deinit(int pin); + /** * Write a value (either high or low) to the specified pin. *
Move a fall through comment When compiling with --strict-warnings using gcc 7.4.0 the compiler complains that a case falls through, even though there is an explicit comment stating this. Moving the comment outside of the conditional compilation section resolves this.
@@ -718,8 +718,8 @@ int BIO_lookup_ex(const char *host, const char *service, int lookup_type, hints.ai_flags &= ~AI_ADDRCONFIG; goto retry; } - /* fall through */ # endif + /* fall through */ default: BIOerr(BIO_F_BIO_LOOKUP_EX, ERR_R_SYS_LIB); ERR_add_error_data(1, gai_strerror(gai_ret));
filter_lua: remove context on VM creation failure (CID 183628)
@@ -358,6 +358,7 @@ static int cb_lua_init(struct flb_filter_instance *f_ins, /* Create LuaJIT state/vm */ lj = flb_luajit_create(config); if (!lj) { + lua_config_destroy(ctx); return -1; } ctx->lua = lj;
fix ppc64 build Missing open paren. fixes: blame:
@@ -52,7 +52,7 @@ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ #define UC_MCONTEXT_V_REGS ( ((void *)&dmy_ctxt.uc_mcontext.v_regs - (void *)&dmy_ctxt) ) -#define _UC_MCONTEXT_GPR(x) ( (void *)&dmy_ctxt.uc_mcontext.gp_regs[x] - (void *)&dmy_ctxt) ) +#define _UC_MCONTEXT_GPR(x) ( ((void *)&dmy_ctxt.uc_mcontext.gp_regs[x] - (void *)&dmy_ctxt) ) #define _UC_MCONTEXT_FPR(x) ( ((void *)&dmy_ctxt.uc_mcontext.fp_regs[x] - (void *)&dmy_ctxt) ) #define _UC_MCONTEXT_VR(x) ( ((void *)&dmy_vrregset.vrregs[x] - (void *)&dmy_vrregset) )
Specify IsoTpMessage keywords
@@ -560,7 +560,7 @@ class UdsClient(): req += data # send request, wait for response - isotp_msg = IsoTpMessage(self._can_client, self.timeout, self.debug) + isotp_msg = IsoTpMessage(self._can_client, timeout=self.timeout, debug=self.debug) isotp_msg.send(req) response_pending = False while True:
apps/cmp.c: Fix glitch in -newkeypass warning and extend warnings for genm
@@ -1583,11 +1583,11 @@ static int setup_request_ctx(OSSL_CMP_CTX *ctx, ENGINE *engine) && opt_oldcert == NULL && opt_cert == NULL) CMP_warn("missing -recipient, -srvcert, -issuer, -oldcert or -cert; recipient will be set to \"NULL-DN\""); - if (opt_cmd == CMP_P10CR || opt_cmd == CMP_RR) { - const char *msg = "option is ignored for 'p10cr' and 'rr' commands"; + if (opt_cmd == CMP_P10CR || opt_cmd == CMP_RR || opt_cmd == CMP_GENM) { + const char *msg = "option is ignored for 'p10cr', 'rr', and 'genm' commands"; if (opt_newkeypass != NULL) - CMP_warn1("-newkeytype %s", msg); + CMP_warn1("-newkeypass %s", msg); if (opt_newkey != NULL) CMP_warn1("-newkey %s", msg); if (opt_days != 0)
Fix apparent off-by-one error in calculation of MAX_ALLOCATING_THREADS fixes
@@ -497,7 +497,7 @@ static const int allocation_block_size = BUFFER_SIZE + sizeof(struct alloc_t); #if defined(SMP) && !defined(USE_OPENMP) /* This is the number of threads than can be spawned by the server, which is the server plus the number of threads in the thread pool */ -# define MAX_ALLOCATING_THREADS MAX_CPU_NUMBER * 2 * MAX_PARALLEL_NUMBER +# define MAX_ALLOCATING_THREADS MAX_CPU_NUMBER * 2 * MAX_PARALLEL_NUMBER +1 static int next_memory_table_pos = 0; # if defined(HAS_COMPILER_TLS) /* Use compiler generated thread-local-storage */
hoon: add +snip and +rear Helper functions for dealing with the ends of lists.
?~ a ~ [b $(a (dec a))] :: +++ rear :: last item of list + ~/ %rear + |* a=(list) + ^- _?>(?=(^ a) i.a) + ?> ?=(^ a) + ?: =(~ t.a) i.a ::NOTE avoiding tmi + $(a t.a) +:: ++ reel :: right fold ~/ %reel |* {a/(list) b/_=>(~ |=({* *} +<+))} ?: =(0 a) i.b $(b t.b, a (dec a)) :: +++ snip :: drop tail off list + ~/ %snip + |* a=(list) + ^+ a + ?~ a ~ + ?: =(~ t.a) ~ + [i.a $(a t.a)] +:: ++ sort !. :: quicksort ~/ %sort |* {a/(list) b/$-({* *} ?)}
BugID:23251461: fix mem leak when sending fails
@@ -413,6 +413,7 @@ void rws_socket_idle_send(rws_socket s) { rws_frame_delete(frame); cur = cur->next; } + rws_socket_delete_all_frames_in_list(s->send_frames); rws_list_delete_clean(&s->send_frames); if (s->error) { s->command = COMMAND_INFORM_DISCONNECTED;
Enum: Save test data below `/tests`
@@ -40,44 +40,44 @@ But `middle_small_small` would fail because every entry might only occur once. ## Example ```sh -# Backup-and-Restore:/examples/enum +# Backup-and-Restore:/tests/enum -sudo kdb mount enum.ecf /examples/enum enum dump +sudo kdb mount enum.ecf /tests/enum enum dump # valid initial value + setup valid enum list -kdb set /examples/enum/value middle -kdb setmeta user/examples/enum/value check/enum "'low', 'middle', 'high'" +kdb set /tests/enum/value middle +kdb setmeta user/tests/enum/value check/enum "'low', 'middle', 'high'" # should succeed -kdb set /examples/enum/value low +kdb set /tests/enum/value low # should fail with error 121 -kdb set /examples/enum/value no +kdb set /tests/enum/value no # RET:5 # ERROR:121 ``` Or with multi-enums: ```sh # valid initial value + setup array with valid enums -kdb set /examples/enum/multivalue middle_small -kdb setmeta user/examples/enum/multivalue check/enum/#0 small -kdb setmeta user/examples/enum/multivalue check/enum/#1 middle -kdb setmeta user/examples/enum/multivalue check/enum/#2 large -kdb setmeta user/examples/enum/multivalue check/enum/#3 huge -kdb setmeta user/examples/enum/multivalue check/enum/multi _ -kdb setmeta user/examples/enum/multivalue check/enum "#3" +kdb set /tests/enum/multivalue middle_small +kdb setmeta user/tests/enum/multivalue check/enum/#0 small +kdb setmeta user/tests/enum/multivalue check/enum/#1 middle +kdb setmeta user/tests/enum/multivalue check/enum/#2 large +kdb setmeta user/tests/enum/multivalue check/enum/#3 huge +kdb setmeta user/tests/enum/multivalue check/enum/multi _ +kdb setmeta user/tests/enum/multivalue check/enum "#3" # should succeed -kdb set /examples/enum/multivalue ___small_middle__ +kdb set /tests/enum/multivalue ___small_middle__ # should fail with error 121 -kdb set /examples/enum/multivalue ___all_small__ +kdb set /tests/enum/multivalue ___all_small__ # RET:5 # ERROR:121 # cleanup -kdb rm -r /examples/enum -sudo kdb umount /examples/enum +kdb rm -r /tests/enum +sudo kdb umount /tests/enum ``` ## Limitations
Update kscan_gpio_get_extra_flags
@@ -126,11 +126,10 @@ static void kscan_direct_irq_callback_handler(const struct device *port, struct #endif static gpio_flags_t kscan_gpio_get_extra_flags(const struct gpio_dt_spec *gpio, bool active) { - gpio_flags_t flags = BIT(0) & gpio->dt_flags; if (!active) { - flags |= flags ? GPIO_PULL_UP : GPIO_PULL_DOWN; + return ((BIT(0) & gpio->dt_flags) ? GPIO_PULL_UP : GPIO_PULL_DOWN); } - return flags; + return 0; } static int kscan_inputs_set_flags(const struct kscan_gpio_list *inputs,
Add DCMI MSP Deinit.
@@ -139,25 +139,27 @@ void HAL_MspInit(void) #if defined(DCMI_RESET_PIN) || defined(DCMI_PWDN_PIN) || defined(DCMI_FSYNC_PIN) /* Configure DCMI GPIO */ GPIO_InitTypeDef GPIO_InitStructure; - GPIO_InitStructure.Pull = GPIO_PULLDOWN; GPIO_InitStructure.Speed = GPIO_SPEED_LOW; GPIO_InitStructure.Mode = GPIO_MODE_OUTPUT_PP; #if defined(DCMI_RESET_PIN) GPIO_InitStructure.Pin = DCMI_RESET_PIN; + GPIO_InitStructure.Pull = GPIO_PULLDOWN; HAL_GPIO_Init(DCMI_RESET_PORT, &GPIO_InitStructure); #endif - #if defined(DCMI_PWDN_PIN) - GPIO_InitStructure.Pin = DCMI_PWDN_PIN; - HAL_GPIO_Init(DCMI_PWDN_PORT, &GPIO_InitStructure); - #endif - #if defined(DCMI_FSYNC_PIN) GPIO_InitStructure.Pin = DCMI_FSYNC_PIN; + GPIO_InitStructure.Pull = GPIO_PULLDOWN; HAL_GPIO_Init(DCMI_FSYNC_PORT, &GPIO_InitStructure); #endif + #if defined(DCMI_PWDN_PIN) + GPIO_InitStructure.Pin = DCMI_PWDN_PIN; + GPIO_InitStructure.Pull = GPIO_PULLUP; + HAL_GPIO_Init(DCMI_PWDN_PORT, &GPIO_InitStructure); + #endif + #endif // DCMI_RESET_PIN || DCMI_PWDN_PIN || DCMI_FSYNC_PIN } @@ -222,7 +224,7 @@ void HAL_TIM_PWM_MspInit(TIM_HandleTypeDef *htim) /* Timer GPIO configuration */ GPIO_InitTypeDef GPIO_InitStructure; GPIO_InitStructure.Pin = DCMI_TIM_PIN; - GPIO_InitStructure.Pull = GPIO_NOPULL; + GPIO_InitStructure.Pull = GPIO_PULLUP; GPIO_InitStructure.Speed = GPIO_SPEED_HIGH; GPIO_InitStructure.Mode = GPIO_MODE_AF_PP; GPIO_InitStructure.Alternate = DCMI_TIM_AF; @@ -255,7 +257,7 @@ void HAL_DCMI_MspInit(DCMI_HandleTypeDef* hdcmi) /* DCMI GPIOs configuration */ GPIO_InitTypeDef GPIO_InitStructure; - GPIO_InitStructure.Pull = GPIO_PULLDOWN; + GPIO_InitStructure.Pull = GPIO_PULLUP; GPIO_InitStructure.Speed = GPIO_SPEED_HIGH; GPIO_InitStructure.Alternate = GPIO_AF13_DCMI; @@ -272,6 +274,16 @@ void HAL_DCMI_MspInit(DCMI_HandleTypeDef* hdcmi) } } +void HAL_DCMI_MspDeInit(DCMI_HandleTypeDef* hdcmi) +{ + /* DCMI clock enable */ + __DCMI_CLK_DISABLE(); + for (int i=0; i<NUM_DCMI_PINS; i++) { + HAL_GPIO_DeInit(dcmi_pins[i].port, dcmi_pins[i].pin); + } +} + + void HAL_SPI_MspInit(SPI_HandleTypeDef *hspi) { #if defined(IMU_SPI)