message
stringlengths
6
474
diff
stringlengths
8
5.22k
Correct index for timeout
@@ -269,7 +269,7 @@ static Value post(DictuVM *vm, int argCount, Value *args) { return EMPTY_VAL; } - timeout = (long) AS_NUMBER(args[2]); + timeout = (long) AS_NUMBER(args[3]); argCount--; }
Updated dockerfile to skip tescontainers tests
@@ -38,7 +38,7 @@ COPY . . #COPY datafari-ee/README.txt datafari-ee/README.txt #COPY datafari-ee/pom.xml datafari-ee/pom.xml #COPY .git .git -RUN mvn -f pom.xml -Dorg.slf4j.simpleLogger.log.org.apache.maven.cli.transfer.Slf4jMavenTransferListener=warn -B clean install +RUN mvn -f pom.xml -DfailIfNoTests=false -Dtest='!TestDataServices' -Dorg.slf4j.simpleLogger.log.org.apache.maven.cli.transfer.Slf4jMavenTransferListener=warn -B clean install RUN ls #COPY datafari-ee/apache apache RUN ls
Prevent adding ioclass with the same id twice
@@ -31,6 +31,8 @@ int ocf_mngt_add_partition_to_cache(struct ocf_cache *cache, uint32_t max_size, uint8_t priority, bool valid) { uint32_t size; + struct ocf_lst_entry *iter; + uint32_t iter_id; if (!name) return -OCF_ERR_INVAL; @@ -51,6 +53,14 @@ int ocf_mngt_add_partition_to_cache(struct ocf_cache *cache, return -OCF_ERR_INVAL; } + for_each_lst(&cache->lst_part, iter, iter_id) { + if (iter_id == part_id) { + ocf_cache_log(cache, log_err, + "Part with id %hu already exists\n", part_id); + return -OCF_ERR_INVAL; + } + } + size = sizeof(cache->user_parts[part_id].config->name); if (env_strncpy(cache->user_parts[part_id].config->name, size, name, size)) return -OCF_ERR_INVAL;
BugID:18933644: add posix/cmsis in menuconfig
@@ -31,6 +31,8 @@ source "drivers/Config.in" menu "Kernel Configuration" source "kernel/Config.in" source "osal/aos/Config.in" +source "osal/posix/Config.in" +source "osal/cmsis/Config.in" endmenu menu "Middleware Configuration"
ChangeLog: update for issue263
* [Issue #262](https://github.com/grobian/carbon-c-relay/issues/262) DNS round-robin on any\_of cluster doesn't rotate and causes lots of hung connections +* [Issue #263](https://github.com/grobian/carbon-c-relay/issues/263) + parser fails on `%` in regular expressions # 3.0 (2017-04-07)
params: fix coverity unchecked return values
@@ -29,6 +29,7 @@ static int prepare_from_text(const OSSL_PARAM *paramdefs, const char *key, { const OSSL_PARAM *p; size_t buf_bits; + int r; /* * ishex is used to translate legacy style string controls in hex format @@ -49,11 +50,11 @@ static int prepare_from_text(const OSSL_PARAM *paramdefs, const char *key, case OSSL_PARAM_INTEGER: case OSSL_PARAM_UNSIGNED_INTEGER: if (*ishex) - BN_hex2bn(tmpbn, value); + r = BN_hex2bn(tmpbn, value); else - BN_asc2bn(tmpbn, value); + r = BN_asc2bn(tmpbn, value); - if (*tmpbn == NULL) + if (r == 0 || *tmpbn == NULL) return 0; /*
Cleaned up the conf.py file a bit, removing some commented out lines.
@@ -37,7 +37,6 @@ if on_rtd: return MagicMock() MOCK_MODULES = ["_ccllib","numpy","ccllib"] - #['pyccl','pyccl.background','pyccl.ccllib','pyccl.cls','pyccl.core','pyccl.constants','pyccl.correlation','pyccl.lsst_specs','pyccl.massfunction','pyccl.power','pyccl.pyutils'] sys.modules.update((mod_name, Mock()) for mod_name in MOCK_MODULES) # -- General configuration ------------------------------------------------ @@ -74,8 +73,6 @@ master_doc = 'index' # General information about the project. project = u'pyccl' -#__import__(project) -#package = sys.modules[project] copyright = u'2018, LSST DESC' author = u'LSST DESC'
mesh: Virtual address memory leak Fixes a memory leak when a virtual address subscription is added for a model that either has this VA already, or the model has no more space for subscription addresses. this is port of
@@ -36,6 +36,10 @@ static struct bt_mesh_cfg_srv *conf; static struct label labels[CONFIG_BT_MESH_LABEL_COUNT]; +#if CONFIG_BT_MESH_LABEL_COUNT > 0 +static uint8_t va_del(uint8_t *label_uuid, uint16_t *addr); +#endif + static int comp_add_elem(struct os_mbuf *buf, struct bt_mesh_elem *elem, bool primary) { @@ -230,6 +234,16 @@ static u8_t _mod_pub_set(struct bt_mesh_model *model, u16_t pub_addr, return STATUS_INVALID_APPKEY; } +#if CONFIG_BT_MESH_LABEL_COUNT > 0 + if (BT_MESH_ADDR_IS_VIRTUAL(model->pub->addr)) { + uint8_t *uuid = bt_mesh_label_uuid_get(model->pub->addr); + + if (uuid) { + va_del(uuid, NULL); + } + } +#endif + model->pub->addr = pub_addr; model->pub->key = app_idx; model->pub->cred = cred_flag; @@ -1280,9 +1294,14 @@ static void mod_pub_va_set(struct bt_mesh_model *model, } status = va_add(label_uuid, &pub_addr); - if (status == STATUS_SUCCESS) { - status = _mod_pub_set(mod, pub_addr, pub_app_idx, cred_flag, - pub_ttl, pub_period, retransmit, true); + if (status != STATUS_SUCCESS) { + goto send_status; + } + + status = _mod_pub_set(mod, pub_addr, pub_app_idx, cred_flag, pub_ttl, + pub_period, retransmit, true); + if (status != STATUS_SUCCESS) { + va_del(label_uuid, NULL); } send_status: @@ -1859,6 +1878,7 @@ static void mod_sub_va_add(struct bt_mesh_model *model, if (bt_mesh_model_find_group(&mod, sub_addr)) { /* Tried to add existing subscription */ status = STATUS_SUCCESS; + va_del(label_uuid, NULL); goto send_status; } @@ -1866,6 +1886,7 @@ static void mod_sub_va_add(struct bt_mesh_model *model, entry = bt_mesh_model_find_group(&mod, BT_MESH_ADDR_UNASSIGNED); if (!entry) { status = STATUS_INSUFF_RESOURCES; + va_del(label_uuid, NULL); goto send_status; } @@ -1993,11 +2014,10 @@ static void mod_sub_va_overwrite(struct bt_mesh_model *model, } if (ARRAY_SIZE(mod->groups) > 0) { - bt_mesh_model_tree_walk(bt_mesh_model_root(mod), - mod_sub_clear_visitor, NULL); - status = va_add(label_uuid, &sub_addr); if (status == STATUS_SUCCESS) { + bt_mesh_model_tree_walk(bt_mesh_model_root(mod), + mod_sub_clear_visitor, NULL); mod->groups[0] = sub_addr; if (IS_ENABLED(CONFIG_BT_SETTINGS)) {
Minor optimization for mempool.c 1. Improve code readability, unify the variable name in functions "rt_hw_interrupt_enable(level);" and "rt_hw_interrupt_enable(level);", so changed variable "temp" to "level";
@@ -134,7 +134,7 @@ RTM_EXPORT(rt_mp_init); rt_err_t rt_mp_detach(struct rt_mempool *mp) { struct rt_thread *thread; - register rt_ubase_t temp; + register rt_ubase_t level; /* parameter check */ RT_ASSERT(mp != RT_NULL); @@ -145,7 +145,7 @@ rt_err_t rt_mp_detach(struct rt_mempool *mp) while (!rt_list_isempty(&(mp->suspend_thread))) { /* disable interrupt */ - temp = rt_hw_interrupt_disable(); + level = rt_hw_interrupt_disable(); /* get next suspend thread */ thread = rt_list_entry(mp->suspend_thread.next, struct rt_thread, tlist); @@ -160,7 +160,7 @@ rt_err_t rt_mp_detach(struct rt_mempool *mp) rt_thread_resume(thread); /* enable interrupt */ - rt_hw_interrupt_enable(temp); + rt_hw_interrupt_enable(level); } /* detach object */ @@ -250,7 +250,7 @@ RTM_EXPORT(rt_mp_create); rt_err_t rt_mp_delete(rt_mp_t mp) { struct rt_thread *thread; - register rt_ubase_t temp; + register rt_ubase_t level; RT_DEBUG_NOT_IN_INTERRUPT; @@ -263,7 +263,7 @@ rt_err_t rt_mp_delete(rt_mp_t mp) while (!rt_list_isempty(&(mp->suspend_thread))) { /* disable interrupt */ - temp = rt_hw_interrupt_disable(); + level = rt_hw_interrupt_disable(); /* get next suspend thread */ thread = rt_list_entry(mp->suspend_thread.next, struct rt_thread, tlist); @@ -278,7 +278,7 @@ rt_err_t rt_mp_delete(rt_mp_t mp) rt_thread_resume(thread); /* enable interrupt */ - rt_hw_interrupt_enable(temp); + rt_hw_interrupt_enable(level); } /* release allocated room */
Print config.log when configure fails in Gitlab CI
@@ -7,8 +7,8 @@ build-kvazaar: stage: build script: - ./autogen.sh - - ./configure --enable-werror - - make --jobs=2 V=1 + - ./configure --enable-werror || (cat config.log && false) + - make --jobs=8 V=1 artifacts: paths: - src/kvazaar
Don't write files to disk during testing. While doing our golden testing, we shouldn't write result files to the filesystem. They are temporary and can fail. Use the in memory comparisson function instead.
module HoonMapSetTests (tests) where -import UrbitPrelude import RIO.Directory +import UrbitPrelude hiding (encodeUtf8) +import Data.Text.Lazy.Encoding (encodeUtf8) +import Numeric.Natural (Natural) import Test.QuickCheck hiding ((.&.)) import Test.Tasty import Test.Tasty.Golden as G import Test.Tasty.QuickCheck import Test.Tasty.TH -import Numeric.Natural (Natural) - +import qualified Data.ByteString.Lazy as L -- Types ----------------------------------------------------------------------- @@ -59,22 +60,21 @@ treeTestsIdentity = fmap go TTSet s -> (TTSet . setToHoonSet . setFromHoonSet) s TTMap m -> (TTMap . mapToHoonMap . mapFromHoonMap) m -treeRTMug :: FilePath -> FilePath -> IO () -treeRTMug inp out = do +treeRTMug :: FilePath -> IO L.ByteString +treeRTMug inp = do byt <- readFile inp non <- cueBSExn byt tee <- fromNounExn non mug <- evaluate $ mug $ toNoun $ treeTestsIdentity tee - writeFile out $ encodeUtf8 $ tshow (mug :: Natural) + pure $ encodeUtf8 $ tlshow (mug :: Natural) -goldenFile :: String -> String -> (FilePath -> FilePath -> IO ()) -> TestTree +goldenFile :: String -> String -> (FilePath -> IO L.ByteString) -> TestTree goldenFile testName testFileName action = - goldenVsFile testName gold writ (action pill writ) + goldenVsString testName gold (action pill) where root = "pkg/king/test/gold" </> testFileName gold = root <.> "gold" - writ = root <.> "writ" pill = root <.> "pill"
modules/tools/DataLog: allow appending if exists Add ability to append data to an existing data log.
@@ -8,7 +8,7 @@ from utime import localtime, ticks_us class DataLog(): - def __init__(self, *headers, name='log', timestamp=True, extension='csv'): + def __init__(self, *headers, name='log', timestamp=True, extension='csv', append=False): # Make timestamp of the form yyyy_mm_dd_hh_mm_ss_uuuuuu if timestamp: @@ -18,8 +18,11 @@ class DataLog(): else: stamp = '' + # File write mode + mode = 'a+' if append else 'w+' + # Append extension and open - self.file = open('{0}{1}.{2}'.format(name, stamp, extension), 'w+') + self.file = open('{0}{1}.{2}'.format(name, stamp, extension), mode) # If column headers were given, print those as first line if len(headers) > 0:
sysdeps/managarm: return error on invalid handle instead of panicking
@@ -203,6 +203,8 @@ int sys_mkdir(const char *path) { resp.ParseFromArray(recv_resp->data, recv_resp->length); if(resp.error() == managarm::posix::Errors::ALREADY_EXISTS) { return EEXIST; + } else if(resp.error() == managarm::posix::Errors::ILLEGAL_ARGUMENTS) { + return EINVAL; }else{ __ensure(resp.error() == managarm::posix::Errors::SUCCESS); return 0; @@ -3010,7 +3012,8 @@ int sys_seek(int fd, off_t offset, int whence, off_t *new_offset) { globalQueue.trim(); auto handle = cacheFileTable()[fd]; - __ensure(handle); + if(!handle) + return EBADF; managarm::fs::CntRequest<MemoryAllocator> req(getSysdepsAllocator()); req.set_fd(fd);
ec3po: run_tests.sh uses python3 to run unittest BRANCH=master TEST=run_tests.sh pass
# found in the LICENSE file. # Discover all the unit tests in the ec3po directory and run them. -python2 -m unittest discover -b -s util/ec3po/ -p *_unittest.py \ +python3 -m unittest discover -b -s util/ec3po/ -p "*_unittest.py" \ && touch util/ec3po/.tests-passed
rsaz_avx2_eligible doesn't take parameters GH:
@@ -28,7 +28,7 @@ void RSAZ_1024_mod_exp_avx2(BN_ULONG result[16], const BN_ULONG exponent[16], const BN_ULONG m_norm[16], const BN_ULONG RR[16], BN_ULONG k0); -int rsaz_avx2_eligible(); +int rsaz_avx2_eligible(void); void RSAZ_512_mod_exp(BN_ULONG result[8], const BN_ULONG base_norm[8], const BN_ULONG exponent[8],
Separate parameter gesture into specific events
@@ -25,14 +25,8 @@ enum clap_event_flags { // indicate a live momentary event CLAP_EVENT_IS_LIVE = 1 << 0, - // live user adjustment begun - CLAP_EVENT_BEGIN_ADJUST = 1 << 1, - - // live user adjustment ended - CLAP_EVENT_END_ADJUST = 1 << 2, - // should record this event be recorded? - CLAP_EVENT_SHOULD_RECORD = 1 << 3, + CLAP_EVENT_SHOULD_RECORD = 1 << 1, }; // Some of the following events overlap, a note on can be expressed with: @@ -78,6 +72,11 @@ enum { CLAP_EVENT_PARAM_VALUE, CLAP_EVENT_PARAM_MOD, + // uses clap_event_param_gesture + // Indicates that the knob is begining to be adjusted, or that the adjustement ended. + CLAP_EVENT_PARAM_GESTURE_BEGIN, + CLAP_EVENT_PARAM_GESTURE_END, + CLAP_EVENT_TRANSPORT, // update the transport info; clap_event_transport CLAP_EVENT_MIDI, // raw midi event; clap_event_midi CLAP_EVENT_MIDI_SYSEX, // raw midi sysex event; clap_event_midi_sysex @@ -161,6 +160,15 @@ typedef struct clap_event_param_mod { double amount; // modulation amount } clap_event_param_mod_t; +typedef struct clap_event_param_gesture { + clap_event_header_t header; + + // target parameter + clap_id param_id; // @ref clap_param_info.id + void *cookie; // @ref clap_param_info.cookie + +} clap_event_param_gesture_t; + enum clap_transport_flags { CLAP_TRANSPORT_HAS_TEMPO = 1 << 0, CLAP_TRANSPORT_HAS_BEATS_TIMELINE = 1 << 1,
fix: supress 'implicit enum conversion' warning
@@ -52,7 +52,7 @@ close_opcode_name(enum ws_close_code discord_opcode) CASE_RETURN_STR(WS_CLOSE_DISALLOWED_INTENTS); default: { - enum cws_close_reason normal_opcode = discord_opcode; + enum cws_close_reason normal_opcode = (enum cws_close_reason)discord_opcode; switch (normal_opcode) { CASE_RETURN_STR(CWS_CLOSE_REASON_NORMAL); CASE_RETURN_STR(CWS_CLOSE_REASON_GOING_AWAY); @@ -226,7 +226,7 @@ static void ws_on_close_cb(void *data, CURL *ehandle, enum cws_close_reason cwscode, const char *reason, size_t len) { struct discord_ws_s *ws = data; - enum ws_close_code close_opcode = cwscode; + enum ws_close_code close_opcode = (enum ws_close_code)cwscode; switch (close_opcode) { case WS_CLOSE_UNKNOWN_OPCODE:
Bump version in preperation for ldns-1.7.2
@@ -6,7 +6,7 @@ sinclude(acx_nlnetlabs.m4) # must be numbers. ac_defun because of later processing. m4_define([VERSION_MAJOR],[1]) m4_define([VERSION_MINOR],[7]) -m4_define([VERSION_MICRO],[1]) +m4_define([VERSION_MICRO],[2]) AC_INIT(ldns, m4_defn([VERSION_MAJOR]).m4_defn([VERSION_MINOR]).m4_defn([VERSION_MICRO]), [email protected], libdns) AC_CONFIG_SRCDIR([packet.c]) # needed to build correct soname @@ -26,10 +26,11 @@ AC_SUBST(LDNS_VERSION_MICRO, [VERSION_MICRO]) # set age to 0 # # ldns-1.6.17 and before had a .so with version same as VERSION_INFO -# ldns-1.7.0 has libversion 2:0:0 -# ldns-1.7.1 has libversion 3:0:1 +# ldns-1.7.0 had libversion 2:0:0 +# ldns-1.7.1 had libversion 3:0:1 +# ldns-1.7.2 had libversion 3:0:2 # -AC_SUBST(VERSION_INFO, [3:0:0]) +AC_SUBST(VERSION_INFO, [3:0:2]) AC_AIX if test "$ac_cv_header_minix_config_h" = "yes"; then
tls13:server:Add prepare write_server_hello
@@ -730,10 +730,70 @@ cleanup: /* * StateHanler: MBEDTLS_SSL_SERVER_HELLO */ +static int ssl_tls13_prepare_server_hello( mbedtls_ssl_context *ssl ) +{ + int ret = 0; + + if( ssl->conf->f_rng == NULL ) + { + MBEDTLS_SSL_DEBUG_MSG( 1, ( "no RNG provided" ) ); + return( MBEDTLS_ERR_SSL_NO_RNG ); + } + + if( ( ret = ssl->conf->f_rng( ssl->conf->p_rng, + ssl->handshake->randbytes, + MBEDTLS_SERVER_HELLO_RANDOM_LEN ) ) != 0 ) + { + MBEDTLS_SSL_DEBUG_RET( 1, "f_rng", ret ); + return( ret ); + } + + MBEDTLS_SSL_DEBUG_BUF( 3, "server hello, random bytes", + ssl->handshake->randbytes, + MBEDTLS_SERVER_HELLO_RANDOM_LEN ); + +#if defined(MBEDTLS_HAVE_TIME) + ssl->session_negotiate->start = time( NULL ); +#endif /* MBEDTLS_HAVE_TIME */ + + return( ret ); +} + static int ssl_tls13_write_server_hello( mbedtls_ssl_context *ssl ) { - ((void) ssl); - return( MBEDTLS_ERR_SSL_FEATURE_UNAVAILABLE ); + int ret = 0; + unsigned char *buf; + size_t buf_len, msg_len; + + MBEDTLS_SSL_DEBUG_MSG( 2, ( "=> write server hello" ) ); + + /* Preprocessing */ + + /* This might lead to ssl_tls13_process_server_hello() being called + * multiple times. The implementation of + * ssl_tls13_process_server_hello_preprocess() must either be safe to be + * called multiple times, or we need to add state to omit this call once + * we're calling ssl_tls13_process_server_hello() multiple times. + */ + MBEDTLS_SSL_PROC_CHK( ssl_tls13_prepare_server_hello( ssl ) ); + + MBEDTLS_SSL_PROC_CHK( mbedtls_ssl_tls13_start_handshake_msg( ssl, + MBEDTLS_SSL_HS_SERVER_HELLO, &buf, &buf_len ) ); + + MBEDTLS_SSL_PROC_CHK( ssl_tls13_write_server_hello_body( ssl, buf, buf_len, + &msg_len ) ); + + mbedtls_ssl_tls13_add_hs_msg_to_checksum( + ssl, MBEDTLS_SSL_HS_SERVER_HELLO, buf, msg_len ); + + MBEDTLS_SSL_PROC_CHK( ssl_tls13_finalize_server_hello( ssl ) ); + + MBEDTLS_SSL_PROC_CHK( mbedtls_ssl_tls13_finish_handshake_msg( + ssl, buf_len, msg_len ) ); +cleanup: + + MBEDTLS_SSL_DEBUG_MSG( 2, ( "<= write server hello" ) ); + return( ret ); } /*
Yajl: Fix next release notes
@@ -90,7 +90,7 @@ The following section lists news about the [modules](https://www.libelektra.org/ - The plugin signifies arrays with the metakey array according to the [array decision](../../doc/decisions/array.md). _(Philipp Gackstatter)_ -- The plugin no longer produces additional `___dirdata` entries for empty array keys. See also issue [#](https://github.com/ElektraInitiative/libelektra/issues/2477). _(Philipp Gackstatter)_ +- The plugin no longer produces additional `___dirdata` entries for empty array keys. See also issue [#2477](https://github.com/ElektraInitiative/libelektra/issues/2477). _(Philipp Gackstatter)_ ### YAMBi
modcustomdevices: read all uart if no length given This makes it convenient to read all available data: >>> uart.read()
@@ -359,13 +359,22 @@ STATIC MP_DEFINE_CONST_FUN_OBJ_1(customdevices_UARTDevice_waiting_obj, customdev STATIC mp_obj_t customdevices_UARTDevice_read(size_t n_args, const mp_obj_t *pos_args, mp_map_t *kw_args) { PB_PARSE_ARGS_METHOD(n_args, pos_args, kw_args, - PB_ARG_DEFAULT_INT(length, 1) + PB_ARG_DEFAULT_NONE(length) ); customdevices_UARTDevice_obj_t *self = MP_OBJ_TO_PTR(pos_args[0]); // Get requested data length - size_t len = mp_obj_get_int(length); + size_t len; + if (length == mp_const_none) { + // If no length is requested, return all pending data + pb_assert(pbio_serial_in_waiting(self->serial, &len)); + } + else { + // Otherwise, get length directly from argument + len = mp_obj_get_int(length); + } + if (len > UART_MAX_LEN) { pb_assert(PBIO_ERROR_INVALID_ARG); }
ra: initialize variable (CID 251470)
@@ -293,7 +293,7 @@ flb_sds_t flb_ra_translate(struct flb_record_accessor *ra, msgpack_object map) { int found; - flb_sds_t tmp; + flb_sds_t tmp = NULL; flb_sds_t buf; struct mk_list *head; struct flb_ra_parser *rp;
dtostrf revised
*/ #include <stdio.h> +#include <stdlib.h> +#include <math.h> char *dtostrf (double val, signed char width, unsigned char prec, char *sout) { - char fmt[20]; - sprintf(fmt, "%%%d.%df", width, prec); - sprintf(sout, fmt, val); + int val_int = (int)val; + int decimal_value = (int)(val * pow(10, prec)) - val_int * pow(10, prec); + sprintf(sout, "%d.%d", val_int, abs(decimal_value)); return sout; } -
Add missing closing parenthesis in rubydoc
@@ -679,7 +679,7 @@ module Nokogiri # # To save indented with two dashes: # - # node.write_to(io, :indent_text => '-', :indent => 2 + # node.write_to(io, :indent_text => '-', :indent => 2) # def write_to io, *options options = options.first.is_a?(Hash) ? options.shift : {}
fixing sr_from_macro global symbol conflict
@@ -97,7 +97,7 @@ extern "C" { /** * @brief Macro for entering into a critical section. */ -os_sr_t sr_from_macro; +static os_sr_t sr_from_macro __attribute__((unused)); #define NRFX_CRITICAL_SECTION_ENTER() OS_ENTER_CRITICAL(sr_from_macro);
collector_runner: intialise function pointers to help compiler GCC believes the function pointers may be uninitialised.
@@ -68,17 +68,17 @@ collector_runner(void *s) char metric[METRIC_BUFSIZ]; char *m = NULL; size_t sizem = 0; - size_t (*s_ticks)(server *); - size_t (*s_metrics)(server *); - size_t (*s_stalls)(server *); - size_t (*s_dropped)(server *); - size_t (*d_ticks)(dispatcher *); - size_t (*d_metrics)(dispatcher *); - size_t (*d_blackholes)(dispatcher *); - size_t (*d_sleeps)(dispatcher *); - size_t (*a_received)(aggregator *); - size_t (*a_sent)(aggregator *); - size_t (*a_dropped)(aggregator *); + size_t (*s_ticks)(server *) = NULL; + size_t (*s_metrics)(server *) = NULL; + size_t (*s_stalls)(server *) = NULL; + size_t (*s_dropped)(server *) = NULL; + size_t (*d_ticks)(dispatcher *) = NULL; + size_t (*d_metrics)(dispatcher *) = NULL; + size_t (*d_blackholes)(dispatcher *) = NULL; + size_t (*d_sleeps)(dispatcher *) = NULL; + size_t (*a_received)(aggregator *) = NULL; + size_t (*a_sent)(aggregator *) = NULL; + size_t (*a_dropped)(aggregator *) = NULL; #define send(metric) \ if (debug & 1) \
[CUDA] Disable Workgroup pass for CUDA devices This currently breaks because the CUDA get_* functions use extern global variables which are nuked by privatizeContext(). Replacing these variables with placeholder intrinsic functions would probably fix it.
@@ -1404,6 +1404,8 @@ static PassManager& kernel_compiler_passes } // Add the work group launcher functions and privatize the pseudo variable // (local id) accesses. + // TODO: get the workgroup pass working with CUDA? + if (strcmp(device->ops->device_name, "CUDA")) passes.push_back("workgroup"); // Attempt to move all allocas to the entry block to avoid the need for
[hardware] :bug: Remove non-standard void cast of void function
@@ -284,7 +284,7 @@ module mempool_tb; void'($value$plusargs("PRELOAD=%s", binary)); if (binary != "") begin // Read ELF - void'(read_elf(binary)); + read_elf(binary); $display("Loading %s", binary); while (get_section(address, length)) begin // Read sections
machinarium: add c++ import declaration
-#ifndef MACHINARIUM_H_ -#define MACHINARIUM_H_ +#ifndef MACHINARIUM_H +#define MACHINARIUM_H /* * machinarium. * cooperative multitasking engine. */ +#ifdef __cplusplus +extern "C" { +#endif + #include <stdlib.h> #include <stdint.h> #include <stdio.h> @@ -234,4 +238,8 @@ machine_write(machine_io_t*, char *buf, int size, uint32_t time_ms); MACHINE_API int machine_close(machine_io_t*); +#ifdef __cplusplus +} #endif + +#endif /* MACHINARIUM_H */
Encoding of spherical harmonics sub-truncation using (IEEE part)
@@ -384,40 +384,29 @@ unsigned long grib_ieee_to_long(double x) #ifdef IEEE + +/* + * To make these two routines consistent to grib_ieee_to_long and grib_long_to_ieee, + * we should not do any byte swapping but rather perform a raw copy. + * Byte swapping is actually implemented in grib_decode_unsigned_long and + * grib_encode_unsigned_long. + */ + unsigned long grib_ieee64_to_long(double x) { - unsigned long lval = 0; -#if IEEE_LE - unsigned char s[8]={0,}; - unsigned char* buf=(unsigned char*)&x; - int j=0; - for (j=7;j>=0;j--) - s[j]= *(buf++); - memcpy(&lval,s,8); -#elif IEEE_BE + unsigned long lval; memcpy(&lval,&x,8); -#endif return lval; } -double grib_long_to_ieee64(unsigned long x){ - double dval = 0.0; -#if IEEE_LE - unsigned char s[8]={0,}; - unsigned char* buf=(unsigned char*)&x; - int j=0; - for (j=7;j>=0;j--) - s[j]= *(buf++); - memcpy(&dval,s,8); -#elif IEEE_BE +double grib_long_to_ieee64 (unsigned long x) +{ + double dval; memcpy(&dval,&x,8); -#else - Assert(!"Neither IEEE_LE nor IEEE_BE defined."); -#endif - return dval; } + int grib_ieee_decode_array(grib_context* c,unsigned char* buf,size_t nvals,int bytes,double* val) { int err=0,i=0,j=0;
Linux/ip: reset ifchange_initialized on shutdown Tested-by: IoTivity Jenkins
@@ -208,7 +208,10 @@ oc_network_event_handler_mutex_unlock(void) pthread_mutex_unlock(&mutex); } -void oc_network_event_handler_mutex_destroy(void) { +void +oc_network_event_handler_mutex_destroy(void) +{ + ifchange_initialized = false; close(ifchange_sock); remove_all_ip_interface(); remove_all_network_interface_cbs();
Improve bindings for certain clusters
@@ -2550,6 +2550,22 @@ bool DeRestPluginPrivate::checkSensorBindingsForAttributeReporting(Sensor *senso { val = sensor->getZclValue(*i, 0x0000); // Local temperature } + else if (*i == THERMOSTAT_UI_CONFIGURATION_CLUSTER_ID) + { + val = sensor->getZclValue(*i, 0x0001); // Keypad lockout + } + else if (*i == DIAGNOSTICS_CLUSTER_ID) + { + if (sensor->modelId() == QLatin1String("eTRV0100") || // Danfoss Ally + sensor->modelId() == QLatin1String("TRV001")) // Hive TRV + { + val = sensor->getZclValue(*i, 0x4000); // SW error code + } + else + { + continue; + } + } else if (*i == SAMJIN_CLUSTER_ID) { val = sensor->getZclValue(*i, 0x0012); // Acceleration X
SoundData stream lua API
@@ -78,7 +78,12 @@ static int l_lovrDataNewSoundData(lua_State* L) { uint32_t sampleRate = luaL_optinteger(L, 3, 44100); SampleFormat format = luax_checkenum(L, 4, SampleFormat, "i16"); Blob* blob = luax_totype(L, 5, Blob); - SoundData* soundData = lovrSoundDataCreateRaw(frames, channels, sampleRate, format, blob); + SoundData* soundData; + if(blob) { + soundData = lovrSoundDataCreateRaw(frames, channels, sampleRate, format, blob); + } else { + soundData = lovrSoundDataCreateStream(frames, channels, sampleRate, format); + } luax_pushtype(L, SoundData, soundData); lovrRelease(SoundData, soundData); return 1;
hoon: remove comment on batch arm docs above chap this might actually be undesirable, don't want to leave this as a trap for somebody in the future thinking we knew it was definitely the right answer. having batch comments follow the chapter declaration does make a certain amount of sense, stylistically
== :: ++ whip :: chapter declare - ::TODO: handle arm batch comments written above chapter declaration %+ cook |= [[a=whit b=term c=note] d=(map term hoon)] ^- [whit (pair term (map term hoon))]
UT: add a timeout-tag to make the esp_flash UT ci pass
@@ -147,7 +147,7 @@ typedef void (*flash_test_func_t)(const esp_partition_t *part); #else //CONFIG_SPIRAM #if !CONFIG_IDF_TARGET_ESP32C3 #define FLASH_TEST_CASE_3(STR, FUNC_TO_RUN) \ - TEST_CASE(STR", 3 chips", "[esp_flash_3][test_env=UT_T1_ESP_FLASH]") {flash_test_func(FUNC_TO_RUN, TEST_CONFIG_NUM);} + TEST_CASE(STR", 3 chips", "[esp_flash_3][test_env=UT_T1_ESP_FLASH][timeout=35]") {flash_test_func(FUNC_TO_RUN, TEST_CONFIG_NUM);} #define FLASH_TEST_CASE_3_IGNORE(STR, FUNC_TO_RUN) \ TEST_CASE(STR", 3 chips", "[esp_flash_3][test_env=UT_T1_ESP_FLASH][ignore]") {flash_test_func(FUNC_TO_RUN, TEST_CONFIG_NUM);}
Update cli/Makefile
@@ -62,10 +62,10 @@ clean: $(RM) -r build/* $(RM) run/bundle.go $(SCOPE) $(RM) coverage.out coverage.html - rm -rf -- .gocache/*/ - rm -rf -- .gomod/*/ - rm -rf -- .gobin/x86_64/go* - rm -rf -- .gobin/aarch64/go* + $(RM) -rf -- .gocache/*/ + $(RM) -rf -- .gomod/*/ + $(RM) -rf -- .gobin/x86_64/go* + $(RM) -rf -- .gobin/aarch64/go* ## deps: install dependencies deps: $(GO_BINDATA) $(GOVVV) $(GOLANGCI_LINT)
Add SKYLAKEX to DYNAMIC_CORE list only if AVX512 is available
@@ -477,7 +477,12 @@ ifneq ($(NO_AVX), 1) DYNAMIC_CORE += SANDYBRIDGE BULLDOZER PILEDRIVER STEAMROLLER EXCAVATOR endif ifneq ($(NO_AVX2), 1) -DYNAMIC_CORE += HASWELL ZEN SKYLAKEX +DYNAMIC_CORE += HASWELL ZEN +endif +ifneq ($(NO_AVX512), 1) +ifneq ($(NO_AVX2), 1) +DYNAMIC_CORE += SKYLAKEX +endif endif endif
Force linking of ipptransform to zlib.
@@ -117,7 +117,7 @@ ippproxy: ippproxy.o ../libcups/cups/libcups3.a ipptransform: ipptransform.o ipp-options.o ../libcups/cups/libcups3.a echo Linking $@... - $(CC) $(LDFLAGS) -o $@ ipptransform.o ipp-options.o $(LIBS) + $(CC) $(LDFLAGS) -o $@ ipptransform.o ipp-options.o $(LIBS) -lz #
Avoid memory leak in s2n_array
@@ -44,11 +44,14 @@ struct s2n_array *s2n_array_new(size_t element_size) struct s2n_blob mem = {0}; GUARD_PTR(s2n_alloc(&mem, sizeof(struct s2n_array))); - struct s2n_array initilizer = {.mem = {0}, .num_of_elements = 0, .capacity = 0, .element_size = element_size}; struct s2n_array *array = (void *) mem.data; - *array = initilizer; - GUARD_PTR(s2n_array_enlarge(array, S2N_INITIAL_ARRAY_SIZE)); + *array = (struct s2n_array) {.mem = {0}, .num_of_elements = 0, .capacity = 0, .element_size = element_size}; + if (s2n_array_enlarge(array, S2N_INITIAL_ARRAY_SIZE) < 0) { + /* Avoid memory leak if allocation fails */ + GUARD_PTR(s2n_free(&mem)); + return NULL; + } return array; }
OTP Tool: Comment about BSP Specific commands. Update comment about Cmds. For application/custom BSP specific commands, define them in the custom BSP this module. Commands can be assigned starting at an offset so that this command set can be expanded if required.
@@ -33,7 +33,10 @@ sys.path.append(os.path.join(os.getcwd(), "repos", "mcuboot", "scripts", "imgtool")) import keys as keys - +# Cmds that apply for the dialog BSP are defined here. +# Custom Commands are defined in the custom BSP starting +# at a different offset so that the default command set +# can be expanded if needed. class Cmd(object): OTP_READ_KEY = 0 OTP_WRITE_KEY = 1 @@ -45,7 +48,6 @@ class Cmd(object): FLASH_ERASE = 7 TEST_ALIVE = 8 - class cmd_no_payload(NamedTuple): som: int cmd: int
Do client receive more often
@@ -425,6 +425,7 @@ int quic_client(const char* ip_address_text, int server_port, int bytes_recv; int bytes_sent; uint64_t current_time = 0; + uint64_t loop_time = 0; int client_ready_loop = 0; int client_receive_loop = 0; int established = 0; @@ -613,6 +614,8 @@ int quic_client(const char* ip_address_text, int server_port, } /* Wait for packets */ + loop_time = current_time; + while (ret == 0 && picoquic_get_cnx_state(cnx_client) != picoquic_state_disconnected) { unsigned char received_ecn; @@ -709,8 +712,10 @@ int quic_client(const char* ip_address_text, int server_port, * and may eventually drop the connection for lack of acks. So we limit * the number of packets that can be received before sending responses. */ - if (bytes_recv == 0 || (ret == 0 && client_receive_loop > PICOQUIC_DEMO_CLIENT_MAX_RECEIVE_BATCH)) { + if (bytes_recv == 0 || (ret == 0 && client_receive_loop > PICOQUIC_DEMO_CLIENT_MAX_RECEIVE_BATCH) || + (current_time - loop_time) > 25000) { client_receive_loop = 0; + loop_time = current_time; if (ret == 0 && (picoquic_get_cnx_state(cnx_client) == picoquic_state_ready || picoquic_get_cnx_state(cnx_client) == picoquic_state_client_ready_start)) {
Fix Solaris aes_hw_t4 compile issue
@@ -17,14 +17,15 @@ static int cipher_hw_aes_t4_initkey(PROV_CIPHER_CTX *dat, { int ret, bits; PROV_AES_CTX *adat = (PROV_AES_CTX *)dat; + AES_KEY *ks = &adat->ks.ks; - dat->ks = &adat->ks.ks; + dat->ks = (const void *)ks; /* used by cipher_hw_generic_XXX */ bits = keylen * 8; if ((dat->mode == EVP_CIPH_ECB_MODE || dat->mode == EVP_CIPH_CBC_MODE) && !dat->enc) { ret = 0; - aes_t4_set_decrypt_key(key, bits, dat->ks); + aes_t4_set_decrypt_key(key, bits, ks); dat->block = (block128_f)aes_t4_decrypt; switch (bits) { case 128: @@ -44,7 +45,7 @@ static int cipher_hw_aes_t4_initkey(PROV_CIPHER_CTX *dat, } } else { ret = 0; - aes_t4_set_encrypt_key(key, bits, dat->ks); + aes_t4_set_encrypt_key(key, bits, ks); dat->block = (block128_f)aes_t4_encrypt; switch (bits) { case 128:
Allow timer for serial booting
@@ -165,6 +165,11 @@ hal_bsp_init(void) hal_timer_init(2, TIM11); #endif +#if (MYNEWT_VAL(OS_CPUTIME_TIMER_NUM) >= 0) + rc = os_cputime_init(MYNEWT_VAL(OS_CPUTIME_FREQ)); + assert(rc == 0); +#endif + #if MYNEWT_VAL(SPI_0_MASTER) rc = hal_spi_init(0, &spi0_cfg, HAL_SPI_TYPE_MASTER); assert(rc == 0);
Clarify that a leak is negligible at h2o_hpack_decode_header This addressed Coverity CID
@@ -301,6 +301,11 @@ int h2o_hpack_decode_header(h2o_mem_pool_t *pool, void *_hpack_header_table, h2o int64_t index = 0; int value_is_indexed = 0, do_index = 0; + /* This function might "leak" newly allocated memory block, assuming that the memory is from the pool and will be freed + * soon at pool destruction. + * This assersion is to make sure that we always specify a pool when using this function. */ + assert(pool != NULL); + Redo: if (*src >= src_end) return H2O_HTTP2_ERROR_COMPRESSION; @@ -380,9 +385,12 @@ Redo: /* determine the value (if necessary) */ if (!value_is_indexed) { - if ((value = decode_string(pool, src, src_end, 0, err_desc)) == NULL) + if ((value = decode_string(pool, src, src_end, 0, err_desc)) == NULL) { + /* this may leak `name` but as long as it is tied to the pool, it will be soon freed at pool destruction, + * so it is harmless to ignore the leak */ return H2O_HTTP2_ERROR_COMPRESSION; } + } /* add the decoded header to the header table if necessary */ if (do_index) {
Add freetype download command to MAINTAINING.md
@@ -89,6 +89,9 @@ curl -O http://www.ferzkopp.net/Software/SDL2_gfx/SDL2_gfx-1.0.4.tar.gz # for SDL2_mixer curl -O https://www.mpg123.de/download/mpg123-1.26.4.tar.bz2 # MP3 support + +# for SDL2_ttf +curl -O -L https://download.savannah.gnu.org/releases/freetype/freetype-2.10.4.tar.gz ``` 3. Set up `LDFLAGS` and `C_INCLUDE_PATH` in `$HOME/.zshrc` so `configure` can find libraries and header files.
activate repositories at boot
@@ -21,6 +21,8 @@ DOCKER_YUM_GROUPS_DEVELTOOLS = "RUN yum -y groupinstall \"Development tools\" DOCKER_YUM_EPEL_RELEASE = "RUN yum -y install epel-release" DOCKER_YUM_REMI_RELEASE = "RUN dnf -y install https://rpms.remirepo.net/enterprise/remi-release-8.rpm" DOCKER_YUM_ENABLE_POWERTOOLS = "RUN dnf config-manager --set-enabled powertools" +DOCKER_YUM_FIX_CENTOS_8_A = "RUN sed -i 's/mirrorlist/\#mirrorlist/g' /etc/yum.repos.d/CentOS-Linux-*" +DOCKER_YUM_FIX_CENTOS_8_B = "RUN sed -i 's|\#baseurl=http://mirror.centos.org|baseurl=http://vault.centos.org|g' /etc/yum.repos.d/CentOS-Linux-*" DOCKER_ZYP_BUILD_ESSENTIALS = "RUN zypper -n install make rpm-build" DOCKER_ZYP_GROUP_DEVEL = "RUN zypper -n install -t pattern devel_C_C++" @@ -352,6 +354,8 @@ docker_centos\:8: @test -d docker/log || mkdir -p docker/log @echo -e \ $(DOCKER_GEN_FROM_IMAGE)"\n" \ + $(DOCKER_YUM_FIX_CENTOS_8_A)"\n" \ + $(DOCKER_YUM_FIX_CENTOS_8_B)"\n" \ $(DOCKER_YUM_BUILD_ESSENTIALS)"\n" \ $(DOCKER_YUM_GROUPS_DEVELTOOLS)"\n" \ $(DOCKER_YUM_REMI_RELEASE)"\n" \
hslua-marshalling: add pushIterator for use with generic for loops
@@ -11,10 +11,11 @@ Tests that any data type can be pushed to Lua as userdata. -} module HsLua.Marshalling.UserdataTests (tests) where +import Control.Monad (when) import Data.Data (Data) import Data.Word (Word64) import Data.Typeable (Typeable) -import HsLua.Marshalling.Userdata (metatableName, pushAny, toAny) +import HsLua.Marshalling.Userdata import Test.Tasty.HsLua ( (=:), shouldBeResultOf, shouldHoldForResultOf ) import Test.Tasty (TestTree, testGroup) import Test.Tasty.HUnit (assertEqual) @@ -70,6 +71,25 @@ tests = testGroup "Userdata" pushAny (Dummy 42 "answer") toAny Lua.top ] + + , testGroup "pushIterator" + [ "iterate over list" =: + Just "0,1,1,2,3,5,8,13,21" `shouldBeResultOf` do + let fibs = 0 : 1 : zipWith (+) fibs (tail fibs) + Lua.openlibs + Lua.pushHaskellFunction $ + pushIterator (\n -> 1 <$ Lua.pushinteger n) (take 9 fibs) + Lua.setglobal "fibs" + stat <- Lua.dostring $ mconcat + [ "local acc = {}\n" + , "for n in fibs() do\n" + , " table.insert(acc, n)\n" + , "end\n" + , "return table.concat(acc, ',')\n" + ] + when (stat /= Lua.OK) Lua.throwErrorAsException + Lua.tostring Lua.top + ] ] -- | Dummy data
lv_conf_checker: Update lv_conf_checker so it is ESP-IDF aware. * lv_conf_checker: Update lv_conf_checker so it is ESP-IDF aware. Include ESP-IDF headers and lv_conf_kconfig.h when using the ESP-IDF framework. Also remove the CONFIG_LV_CONF_SKIP as it is not generated by the Kconfig file. * lv_conf_checker: Always include lv_conf_kconfig.h.
@@ -27,11 +27,18 @@ fout.write( #define LV_CONF_INTERNAL_H /* clang-format off */ +#include <stdint.h> + +/* Add ESP-IDF related includes */ +#if defined (ESP_PLATFORM) +# include "sdkconfig.h" +# include "esp_attr.h" +#endif + /* Handle special Kconfig options */ #include "lv_conf_kconfig.h" -#include <stdint.h> - +/* If "lv_conf.h" is available from here try to use it later.*/ #if defined __has_include # if __has_include("lv_conf.h") # ifndef LV_CONF_INCLUDE_SIMPLE @@ -41,7 +48,7 @@ fout.write( #endif /*If lv_conf.h is not skipped include it*/ -#if !defined(LV_CONF_SKIP) && !defined(CONFIG_LV_CONF_SKIP) +#if !defined(LV_CONF_SKIP) # if defined(LV_CONF_PATH) /*If there is a path defined for lv_conf.h use it*/ # define __LV_TO_STR_AUX(x) #x # define __LV_TO_STR(x) __LV_TO_STR_AUX(x) @@ -105,7 +112,7 @@ fout.write( ''' /*If running without lv_conf.h add typdesf with default value*/ -#if defined(LV_CONF_SKIP) || defined(CONFIG_LV_CONF_SKIP) +#if defined(LV_CONF_SKIP) /* Type of coordinates. Should be `int16_t` (or `int32_t` for extreme cases) */ typedef int16_t lv_coord_t;
Added JWt refresh
@@ -1325,6 +1325,12 @@ ACVP_RESULT acvp_resume_test_session(ACVP_CTX *ctx, const char *request_filename val = NULL; obj = NULL; + rv = acvp_refresh(ctx); + if (rv != ACVP_SUCCESS) { + ACVP_LOG_ERR("Failed to refresh login with ACVP server"); + goto end; + } + rv = acvp_retrieve_vector_set_result(ctx, ctx->session_url); if (rv != ACVP_SUCCESS) { ACVP_LOG_ERR("Error retrieving vector set results!");
User: Added sydr-fuzz target, which uses Sydr tool
.DEFAULT_GOAL := all +.ONESHELL: + LCOV ?= lcov GENHTML ?= genhtml CC ?= gcc @@ -115,6 +117,11 @@ else STRIPFLAGS ?= -x endif +ifeq ($(SYDR),1) + SUFFIX := _SYDR$(SUFFIX) + OUT_SUFFIX := _SYDR +endif + # # Search Paths. # @@ -233,7 +240,7 @@ OBJS += UserFile.o UserPseudoRandom.o # Directory where objects will be produced. # As well, OBJS will be prepended with actual paths. # -OUT_DIR := $(DIST)_$(UDK_ARCH) +OUT_DIR := $(DIST)_$(UDK_ARCH)$(OUT_SUFFIX) OBJS := $(addprefix $(OUT_DIR)/,$(OBJS)) $(OUT_DIR)/%.o: %.c @@ -254,6 +261,22 @@ fuzz: $(PRODUCT) FORCE @$(MKDIR) FUZZDICT UBSAN_OPTIONS='halt_on_error=1' ./$(PRODUCT) -jobs=$(FUZZ_JOBS) -workers=$(FUZZ_JOBS) -rss_limit_mb=$(FUZZ_MEM) FUZZDICT +sydr-fuzz: $(PROJECT)$(SUFFIX) $(PROJECT)_SYDR$(SUFFIX) FORCE + @rm -rf sydr-work sydr-fuzz.log + @cat <<- EOF > sydr-fuzz.toml + exit-on-time = 7200 + + [sydr] + args = "--invert-n 2048 -j 4" + target = "$(PROJECT)_SYDR$(SUFFIX) @@" + jobs = 1 + + [libfuzzer] + path = "$(PROJECT)$(SUFFIX)" + args = "-jobs=4 -workers=4 -rss_limit_mb=4096 FUZZDICT" + EOF + sydr-fuzz run -l debug + coverage: $(PRODUCT) FORCE @$(LCOV) --version @rm -rf COVERAGE
motion_sense: Remove global fifo_flush_needed, redundant Instead, use the event flag. BRANCH=scarlet,poppy TEST=Compile. Commit-Ready: ChromeOS CL Exonerator Bot
@@ -93,8 +93,6 @@ static void print_spoof_mode_status(int id); /* Need to wake up the AP */ static int wake_up_needed; -/* Need to send flush events */ -static int fifo_flush_needed; /* Number of element the AP should collect */ static int fifo_queue_count; static int fifo_int_enabled; @@ -750,7 +748,6 @@ static int motion_sense_process(struct motion_sensor_t *sensor, int flush_pending; flush_pending = atomic_read_clear(&sensor->flush_pending); for (; flush_pending > 0; flush_pending--) { - fifo_flush_needed = 1; motion_sense_insert_flush(sensor); } } @@ -976,16 +973,16 @@ void motion_sense_task(void *u) * - the queue is almost full, * - we haven't done it for a while. */ - if (fifo_flush_needed || wake_up_needed || - event & TASK_EVENT_MOTION_ODR_CHANGE || + if (wake_up_needed || + event & (TASK_EVENT_MOTION_ODR_CHANGE | + TASK_EVENT_MOTION_FLUSH_PENDING) || queue_space(&motion_sense_fifo) < CONFIG_ACCEL_FIFO_THRES || (motion_int_interval > 0 && time_after(ts_end_task.le.lo, ts_last_int.le.lo + motion_int_interval))) { - if (!fifo_flush_needed) + if ((event & TASK_EVENT_MOTION_FLUSH_PENDING) == 0) motion_sense_insert_timestamp( __hw_clock_source_read()); - fifo_flush_needed = 0; ts_last_int = ts_end_task; /* * Count the number of event the AP is allowed to
MSR: Restructure code
#!/bin/bash -INFILE="$1" @INCLUDE_COMMON@ -BLOCKS=$(sed -n '/```sh/,/```\n/p' "$1") -BUF= -SHELL_RECORDER_ERROR=0 +# -- Functions ----------------------------------------------------------------------------------------------------------------------------- resetGlobals() { @@ -106,8 +103,14 @@ translate() rm "$TMPFILE" } +# -- Main ---------------------------------------------------------------------------------------------------------------------------------- + resetGlobals +INFILE="$1" +BLOCKS=$(sed -n '/```sh/,/```\n/p' "$1") +BUF= +SHELL_RECORDER_ERROR=0 INBLOCK=0 IFS=''
documentation: release note added
@@ -333,6 +333,7 @@ This section keeps you up-to-date with the multi-language support provided by El - <<TODO>> - Fix warning parsing in shell recorder _(@Joni1993)_ - <<TODO>> +- Replaced `egrep` by `grep -E` _(@0x6178656c and @janldeboer)_ - <<TODO>> - <<TODO>> - Add audit-dependencies script to check for vulnerabilities for npm depndencies _(Juri Schreib @Bujuhu)_ _(Nikola Prvulovic @Dynamichost96)_
test spack build with clang
@@ -30,3 +30,12 @@ setup() { spack install libelf assert_success } + +@test "[spack] build with llvm" { + module load llvm4 + spack compiler find + assert_success + + spack install libelf%clang + assert_success +}
copy config to ./scope/libscope directory
@@ -187,6 +187,9 @@ func (rc *Config) createWorkDir(cmd string) { histDir := HistoryDir() err := os.MkdirAll(histDir, 0755) util.CheckErrSprintf(err, "error creating history dir: %v", err) + libScopeConfDir := LibScopeConfigDir() + err = os.MkdirAll(libScopeConfDir, 0755) + util.CheckErrSprintf(err, "error creating libScopeConfig dir: %v", err) sessionID := getSessionID() // Directories named CMD_SESSIONID_PID_TIMESTAMP tmpDirName := path.Base(cmd) + "_" + sessionID + "_" + pid + "_" + ts @@ -245,6 +248,11 @@ func HistoryDir() string { return filepath.Join(util.ScopeHome(), "history") } +// LibScopeConfigDir returns the LibScope Config directory +func LibScopeConfigDir() string { + return filepath.Join(util.ScopeHome(), "libscope-v"+internal.GetVersion()) +} + // setupWorkDir sets up a working directory for a given set of args func (rc *Config) setupWorkDir(args []string) { cmd := path.Base(args[0]) @@ -279,6 +287,10 @@ func (rc *Config) setupWorkDir(args []string) { err = rc.WriteScopeConfig(scYamlPath) util.CheckErrSprintf(err, "%v", err) + scLibScopeYamlPath := filepath.Join(LibScopeConfigDir(), args[0]+".yml") + err = rc.WriteScopeConfig(scLibScopeYamlPath) + util.CheckErrSprintf(err, "%v", err) + argsJSONPath := filepath.Join(rc.WorkDir, "args.json") argsBytes, err := json.Marshal(args) util.CheckErrSprintf(err, "error marshaling JSON: %v", err)
crsf: ensure non-zero packets
@@ -291,7 +291,7 @@ crsf_do_more: if (!circular_buffer_read(&rx_ring, &frame_length)) { break; } - if (frame_length <= 64) { + if (frame_length > 0 && frame_length <= 64) { parser_state = CRSF_PAYLOAD; goto crsf_do_more; }
Remove an unused comment
@@ -296,7 +296,7 @@ static inline int op_loadself( mrbc_vm *vm, uint32_t code, mrbc_value *regs ) int ra = GETARG_A(code); mrbc_release(&regs[ra]); - mrbc_dup(&regs[0]); // TODO: Need? + mrbc_dup(&regs[0]); regs[ra] = regs[0]; return 0;
Add ksceGzipDecompress Add ksceGzipDecompress
@@ -70,6 +70,16 @@ int ksceHmacSha1Digest(const unsigned char *key, uint32_t key_len, const void *p int ksceHmacSha224Digest(const unsigned char *key, uint32_t key_len, const void *plain, uint32_t len, char *result); int ksceHmacSha256Digest(const unsigned char *key, uint32_t key_len, const void *plain, uint32_t len, char *result); +/** + * @param[out] dst - dst buf + * @param[in] dst_size - Size when decompressed + * @param[in] src - Gzip compressed data + * @param[out] crc32 - crc32 when decompressed + * + * @return dst_size on success, < 0 on error. + */ +int ksceGzipDecompress(void *dst, int dst_size, const void *src, int *crc32); + #ifdef __cplusplus } #endif
Renamed variable in ccl_power.c from k_NL to PL_integral.
@@ -812,7 +812,7 @@ double ccl_kNL(ccl_cosmology *cosmo,double a,int *status) { gsl_function F; F.function=&kNL_integrand; F.params=&par; - double k_NL; + double PL_integral; workspace = gsl_integration_cquad_workspace_alloc(cosmo->gsl_params.N_ITERATION); if (workspace == NULL) { @@ -821,7 +821,7 @@ double ccl_kNL(ccl_cosmology *cosmo,double a,int *status) { if (*status == 0) { int gslstatus = gsl_integration_cquad(&F, cosmo->spline_params.K_MIN, cosmo->spline_params.K_MAX, 0.0, cosmo->gsl_params.INTEGRATION_KNL_EPSREL, - workspace,&k_NL,NULL,NULL); + workspace,&PL_integral,NULL,NULL); if(gslstatus != GSL_SUCCESS) { ccl_raise_gsl_warning(gslstatus, "ccl_power.c: ccl_kNL():"); *status |= gslstatus; @@ -829,5 +829,5 @@ double ccl_kNL(ccl_cosmology *cosmo,double a,int *status) { } gsl_integration_cquad_workspace_free(workspace); - return pow(sqrt(k_NL/(6*M_PI*M_PI))*ccl_growth_factor(cosmo, a, status), -1); //remove M_LN10 -- what is it? //is ccl_growth_factor there to set the power spectrum to the correct redshift? Why not do this in the integrand? + return pow(sqrt(PL_integral/(6*M_PI*M_PI))*ccl_growth_factor(cosmo, a, status), -1); }
ixfr-out, fix to copy more data during name compression rdata field steps.
@@ -322,10 +322,7 @@ static int ixfr_write_rr_pkt(struct query* query, struct buffer* packet, break; case RDATA_WF_UNCOMPRESSED_DNAME: case RDATA_WF_LITERAL_DNAME: - copy_len = dname_length(rr, rdlen); - if(copy_len == 0) { - return 1; /* assert, or skip malformed */ - } + copy_len = rdlen; break; case RDATA_WF_BYTE: copy_len = 1; @@ -379,6 +376,9 @@ static int ixfr_write_rr_pkt(struct query* query, struct buffer* packet, if(copy_len <= rdlen) copy_len += read_uint16(rr+2); break; + default: + copy_len = rdlen; + break; } if(copy_len) { if(!buffer_available(packet, copy_len)) {
Add rotary state
@@ -55,7 +55,7 @@ enum { LV_ROTARY_STATE_CHECKED_DISABLED = LV_BTN_STATE_CHECKED_DISABLED, _LV_ROTARY_STATE_LAST = _LV_BTN_STATE_LAST, /* Number of states*/ }; -typedef uint8_t lv_btn_state_t; +typedef uint8_t lv_rotary_state_t; /*Data of rotary*/ typedef struct {
scope start add configuration TODO note
@@ -74,6 +74,7 @@ func (rc *Config) Start() error { for _, procToAttach := range allProcToAttach { fmt.Println("Following Process", alllowProc.Procname, "PID", procToAttach.Pid, "will be attached") if !procToAttach.Scoped { + // TODO we need to pass configuration file but handle this not via file location err := rc.Attach([]string{strconv.Itoa(procToAttach.Pid)}) if err == nil { fmt.Println("Process", alllowProc.Procname, "PID", procToAttach.Pid, "successfully attached") @@ -94,7 +95,7 @@ func (rc *Config) Start() error { fmt.Println("Following Process", alllowProc.Procname, "PID", procToAttach.Pid, "is not a service") } - // TODO Handle interactive process + // TODO Handle interactive process which configuration should be used ? } // fmt.Printf("%+v\n", alllowProc)
show sensor: include high errors in FwErrorCount Was only displaying the low level errors logs.
@@ -5329,22 +5329,42 @@ FwCmdGetErrorCount( if (pMediaLogCount != NULL) { InputPayload.LogParameters.Separated.LogType = ErrorLogTypeMedia; + + InputPayload.LogParameters.Separated.LogLevel = 0; ReturnCode = FwCmdGetErrorLog(pDimm, &InputPayload, &OutputPayload, sizeof(OutputPayload), NULL, 0); if (EFI_ERROR(ReturnCode)) { *pMediaLogCount = 0; goto Finish; } *pMediaLogCount = GetLogEntriesCount(&OutputPayload); + + InputPayload.LogParameters.Separated.LogLevel = 1; + ReturnCode = FwCmdGetErrorLog(pDimm, &InputPayload, &OutputPayload, sizeof(OutputPayload), NULL, 0); + if (EFI_ERROR(ReturnCode)) { + *pMediaLogCount = 0; + goto Finish; + } + *pMediaLogCount += GetLogEntriesCount(&OutputPayload); } if (pThermalLogCount != NULL) { InputPayload.LogParameters.Separated.LogType = ErrorLogTypeThermal; + + InputPayload.LogParameters.Separated.LogLevel = 0; ReturnCode = FwCmdGetErrorLog(pDimm, &InputPayload, &OutputPayload, sizeof(OutputPayload), NULL, 0); if (EFI_ERROR(ReturnCode)) { *pThermalLogCount = 0; goto Finish; } *pThermalLogCount = GetLogEntriesCount(&OutputPayload); + + InputPayload.LogParameters.Separated.LogLevel = 1; + ReturnCode = FwCmdGetErrorLog(pDimm, &InputPayload, &OutputPayload, sizeof(OutputPayload), NULL, 0); + if (EFI_ERROR(ReturnCode)) { + *pThermalLogCount = 0; + goto Finish; + } + *pThermalLogCount += GetLogEntriesCount(&OutputPayload); } Finish:
Add extern_init smoke test to known fails in check_smoke.sh
@@ -36,7 +36,7 @@ echo " A non-zero exit code means a failure occured." >> check echo "Tests that need to be visually inspected: devices, pfspecify, pfspecify_str, stream" >> check-smoke.txt echo "***********************************************************************************" >> check-smoke.txt -known_fails="reduction_array_section target_teams_reduction tasks map_zero_bug targ_static complex lto_teams" +known_fails="reduction_array_section target_teams_reduction tasks map_zero_bug targ_static complex lto_teams extern_init" if [ "$SKIP_FAILURES" == 1 ] ; then skip_tests=$known_fails
build: add determineBuildTarget
@@ -94,16 +94,7 @@ TEST_INSTALL = 'install' NOW = new Date() // # Determine what needs to be build # -target = ".*" - -matcher = /jenkins build jenkinsfile(?:\[(.*)\])? please/ -new_target = (env.ghprbCommentBody =~ matcher)[0][1] -if(new_target) { - // if we specify a new target we degrade the build to unstable - // this will report the test as failed on github - currentBuild.result = 'UNSTABLE' - target = new_target -} +target = determineBuildTarget() // # Main Stages # lock('docker-images') { @@ -535,3 +526,17 @@ def dateFormatter(date) { df = new SimpleDateFormat("yyyyMM") return df.format(date) } + +def determineBuildTarget(default_target = ".*") { + def target = default_target + + matcher = /jenkins build jenkinsfile(?:\[(.*)\])? please/ + new_target = (env.ghprbCommentBody =~ matcher)[0][1] + if(new_target) { + // if we specify a new target we degrade the build to unstable + // this will report the test as failed on github + currentBuild.result = 'UNSTABLE' + target = new_target + } + return target +}
Document the core_thread_start upcall The core_thread_start upcall previously had a placeholder in the docs.
@@ -18,8 +18,11 @@ provider-base /* Functions offered by libcrypto to the providers */ const OSSL_ITEM *core_gettable_params(const OSSL_CORE_HANDLE *handle); int core_get_params(const OSSL_CORE_HANDLE *handle, OSSL_PARAM params[]); + + typedef void (*OSSL_thread_stop_handler_fn)(void *arg); int core_thread_start(const OSSL_CORE_HANDLE *handle, OSSL_thread_stop_handler_fn handfn); + OPENSSL_CORE_CTX *core_get_libctx(const OSSL_CORE_HANDLE *handle); void core_new_error(const OSSL_CORE_HANDLE *handle); void core_set_error_debug(const OSSL_CORE_HANDLE *handle, @@ -164,7 +167,13 @@ core_get_params() retrieves parameters from the core for the given I<handle>. See L</Core parameters> below for a description of currently known parameters. -=for comment core_thread_start() TBA +The core_thread_start() function informs the core that the provider has started +an interest in the current thread. The core will inform the provider when the +thread eventually stops. It must be passed the I<handle> for this provider, as +well as a callback I<handfn> which will be called when the thread stops. The +callback will subsequently be called from the thread that is stopping and gets +passed the provider context as an argument. This may be useful to perform thread +specific clean up such as freeing thread local variables. core_get_libctx() retrieves the library context in which the library object for the current provider is stored, accessible through the I<handle>.
Fix java home into Dockerfile
@@ -77,7 +77,7 @@ RUN apt-get update && apt-get install --allow-unauthenticated -y \ && rm -rf /var/lib/apt/lists/* # For dev RUN echo "export LANG=C.UTF-8" >> /etc/profile -RUN echo "export JAVA_HOME=/usr/local/openjdk-8" >> /etc/profile +RUN echo "export JAVA_HOME=/usr/local/openjdk-11" >> /etc/profile RUN echo "export PATH=$JAVA_HOME/bin:$PATH" >> /etc/profile RUN echo "export LOG4J_FORMAT_MSG_NO_LOOKUPS=true" >> /etc/profile
Improve error handling in pk7_doit If a mem allocation failed we would ignore it. This commit fixes it to always check.
@@ -316,16 +316,18 @@ BIO *PKCS7_dataInit(PKCS7 *p7, BIO *bio) } if (bio == NULL) { - if (PKCS7_is_detached(p7)) + if (PKCS7_is_detached(p7)) { bio = BIO_new(BIO_s_null()); - else if (os && os->length > 0) + } else if (os && os->length > 0) { bio = BIO_new_mem_buf(os->data, os->length); - if (bio == NULL) { + } else { bio = BIO_new(BIO_s_mem()); if (bio == NULL) goto err; BIO_set_mem_eof_return(bio, 0); } + if (bio == NULL) + goto err; } if (out) BIO_push(out, bio);
in_windows_exporter_metrics: Proceed perflib operation at least 1 perf_object is existing
@@ -750,7 +750,7 @@ static int we_perflib_process_instance(struct we_perflib_context *context, offset = 0; - if (perflib_object->instance_count > 1) { + if (perflib_object->instance_count >= 1) { perf_instance_definition = (PERF_INSTANCE_DEFINITION *) input_data_block; if (perf_instance_definition->NameLength > 0) {
Minimize duplicated code in cross devices settings UX flow
@@ -57,73 +57,67 @@ UX_FLOW(ux_idle_flow, &ux_idle_flow_4_step, FLOW_LOOP); -#if defined(TARGET_NANOS) - // clang-format off UX_STEP_CB( ux_settings_flow_blind_signing_step, +#ifdef TARGET_NANOS bnnn_paging, - switch_settings_blind_signing(), - { - .title = "Blind signing", - .text = strings.common.fullAddress, - }); - -UX_STEP_CB( - ux_settings_flow_display_data_step, - bnnn_paging, - switch_settings_display_data(), - { - .title = "Debug data", - .text = strings.common.fullAddress + BUF_INCREMENT - }); - -UX_STEP_CB( - ux_settings_flow_display_nonce_step, - bnnn_paging, - switch_settings_display_nonce(), - { - .title = "Account nonce", - .text = strings.common.fullAddress + (BUF_INCREMENT * 2) - }); - #else - -UX_STEP_CB( - ux_settings_flow_blind_signing_step, bnnn, +#endif switch_settings_blind_signing(), { +#ifdef TARGET_NANOS + .title = "Blind signing", + .text = +#else "Blind signing", "Transaction", "blind signing", - strings.common.fullAddress, +#endif + strings.common.fullAddress }); UX_STEP_CB( ux_settings_flow_display_data_step, +#ifdef TARGET_NANOS + bnnn_paging, +#else bnnn, +#endif switch_settings_display_data(), { +#ifdef TARGET_NANOS + .title = "Debug data", + .text = +#else "Debug data", "Show contract data", "details", +#endif strings.common.fullAddress + BUF_INCREMENT }); UX_STEP_CB( ux_settings_flow_display_nonce_step, +#ifdef TARGET_NANOS + bnnn_paging, +#else bnnn, +#endif switch_settings_display_nonce(), { +#ifdef TARGET_NANOS + .title = "Account nonce", + .text = +#else "Nonce", "Show account nonce", "in transactions", +#endif strings.common.fullAddress + (BUF_INCREMENT * 2) }); -#endif - #ifdef HAVE_EIP712_FULL_SUPPORT UX_STEP_CB( ux_settings_flow_verbose_eip712_step, @@ -205,7 +199,7 @@ void switch_settings_verbose_eip712(void) { ////////////////////////////////////////////////////////////////////// // clang-format off -#if defined(TARGET_NANOS) +#ifdef TARGET_NANOS UX_STEP_CB( ux_warning_contract_data_step, bnnn_paging, @@ -214,7 +208,7 @@ UX_STEP_CB( "Error", "Blind signing must be enabled in Settings", }); -#elif defined(TARGET_NANOX) || defined(TARGET_NANOS2) +#else UX_STEP_CB( ux_warning_contract_data_step, pnn,
pbio/angle: Use rounding when scaling down. For example, this ensures that 750 mdeg will round to 1 deg instead of 0.
#include <stdbool.h> #include <pbio/angle.h> +#include <pbio/int_math.h> // Millidegrees per rotation #define MDEG_PER_ROT (360000) @@ -129,13 +130,12 @@ int32_t pbio_angle_to_low_res(pbio_angle_t *a, int32_t scale) { } // Scale down rotations component. - int32_t rotations_scaled = a->rotations * (MDEG_PER_ROT / scale); + int32_t rotations_component = pbio_int_math_mult_then_div(a->rotations, MDEG_PER_ROT, scale); - // The aforementioned output has this round off error in millidegrees. - int32_t roundoff_mdeg = a->rotations * (MDEG_PER_ROT % scale); + // Scale down millidegree component, rounded to nearest ouput unit. + int32_t millidegree_component = (a->millidegrees + pbio_int_math_sign(a->millidegrees) * scale / 2) / scale; - // Add scaled millidegree and roundoff component. - return rotations_scaled + (a->millidegrees + roundoff_mdeg) / scale; + return rotations_component + millidegree_component; } /**
agc/example: consolidating plots into one figure
@@ -96,25 +96,21 @@ int main(int argc, char*argv[]) fprintf(fid,"n = %u;\n", num_samples); fprintf(fid,"clear all;\n"); fprintf(fid,"close all;\n\n"); - - // print results for (i=0; i<num_samples; i++) { fprintf(fid," x(%4u) = %12.4e + j*%12.4e;\n", i+1, crealf(x[i]), cimagf(x[i])); fprintf(fid," y(%4u) = %12.4e + j*%12.4e;\n", i+1, crealf(y[i]), cimagf(y[i])); fprintf(fid,"rssi(%4u) = %12.4e;\n", i+1, rssi[i]); } - - fprintf(fid,"\n\n"); fprintf(fid,"n = length(x);\n"); fprintf(fid,"t = 0:(n-1);\n"); - fprintf(fid,"figure;\n"); + fprintf(fid,"figure('position',[100 100 800 600]);\n"); + fprintf(fid,"subplot(2,1,1);\n"); fprintf(fid," plot(t,rssi,'-k','LineWidth',2);\n"); fprintf(fid," xlabel('sample index');\n"); fprintf(fid," ylabel('rssi [dB]');\n"); fprintf(fid," grid on;\n"); - fprintf(fid,"\n\n"); - fprintf(fid,"figure;\n"); + fprintf(fid,"subplot(2,1,2);\n"); fprintf(fid," plot(t,real(y),t,imag(y));\n"); fprintf(fid," xlabel('sample index');\n"); fprintf(fid," ylabel('agc output');\n");
ofs_cpeng: add all registers for completeness
@@ -45,6 +45,35 @@ drivers: image_complete() return 0 registers: + - !!ofs/register + - [CE_FEATURE_DFH, 0x0000, 0x1000000010001001, CE Feature DFH] + - - [FeatureType, [63, 60], RO, 0x1, Feature Type = AFU] + - [Reserved, [59, 41], RsvdZ, 0x0, Reserved] + - [EndOfList, [40], RO, 0x0, End Of List] + - [NextDfhByteOffset, [39, 16], RO, 0x1000, Next DFH Byte offset] + - [FeatureRev, [15, 12], RO, 0x1, Feture Revision] + - [FeatureID, [59, 41], RsvdZ, 0x1, Feature ID] + - !!ofs/register + - [CE_FEATURE_GUID_L, 0x0008, 0xbd4257dc93ea7f91, CE Feature GUID_L] + - - [CE_ID_L, [63, 0], RO, 0xbd4257dc93ea7f91, Lower 64-bit of feature GUID] + - !!ofs/register + - [CE_FEATURE_GUID_H, 0x0010, 0x44bfc10db42a44e5, CE Feature GUID_H] + - - [CE_ID_H, [63, 0], RO, 0x44bfc10db42a44e5, Upper 64-bit of feature GUID] + - !!ofs/register + - [CE_FEATURE_CSR_ADDR, 0x0018, 0x0000000000000100, CE Feature CSR Address] + - - [CSR_REL, [63], RO, 0x0, "1'b0 = relative (offset from feature DFH start)\n + 1'b1 = absolute"] + - [CSR_ADDR, [62, 0], RO, 0x100, CSR address Offset from start of DFH or absolute address to beginning of CSRs for this Feature or Interface] + - !!ofs/register + - [CE_FEATURE_CSR_SIZE_GROUP, 0x0020, 0x0000005000000000, CE Feature CSR Size group] + - - [CSR_SIZE, [63, 32], RO, 0x50, Size of CSR block in bytes total CSR size] + - [HAS_PARAMS, [31], RO, 0x0, Parameters exist or not 1 = Parameters follow this DFH block] + - [GROUPING_ID, [30, 0], RO, 0x0, "Used to group features / interfaces Logical grouping ID for features or interfaces.\n + All features or interfaces with the same ID will be assumed to be logically grouped together.\n + For instance, 2 channels each with a control and data interface have each pair specify a different ID."] + - !!ofs/register + - [CSR_HOST_SCRATCHPAD, 0x0100, 0x0000000000000000, Scratchpad register] + - - [HOST_SCRATCHPAD, [63, 0], RW, 0x0, Scratchpad register used during board bring up] - !!ofs/register - [CSR_HPS2HOST_RDY_TIMEOUT, 0x0108, 0x0000000000000000, "HPS Ready Timeout"] - - [Reserved, [63, 1], RsvdZ, 0x0, Reserved]
Expand ConnectionClose doc.
@@ -23,7 +23,11 @@ The valid handle to an open connection object. # Remarks -**TODO** +`ConnectionClose` cleans up and frees all resources allocated for the connection in `ConnectionOpen`. + +A caller should shutdown an active connection via `ConnectionShutdown` before calling `ConnectionClose`; calling `ConnectionClose` without `ConnectionShutdown` will implicitly call `ConnectionShutdown` with the `QUIC_CONNECTION_SHUTDOWN_FLAG_SILENT` flag. + +`ConnectionClose` is the **last** API call to use a connection handle. An application **MUST NOT** use a connection handle after calling `ConnectionClose`! Any calls using a connection handle after calling `ConnectionClose` is a use-after-free. # See Also
README,cosmetics: fix a couple typos
@@ -113,7 +113,7 @@ make install CMake: ------ -With CMake, you can compile libwebp, cwebp, dwebp, gif2web, img2webp, webpinfo +With CMake, you can compile libwebp, cwebp, dwebp, gif2webp, img2webp, webpinfo and the JS bindings. Prerequisites: @@ -429,7 +429,7 @@ Prerequisites: 1) OpenGL & OpenGL Utility Toolkit (GLUT) Linux: $ sudo apt-get install freeglut3-dev mesa-common-dev - Mac + XCode: + Mac + Xcode: - These libraries should be available in the OpenGL / GLUT frameworks. Windows: http://freeglut.sourceforge.net/index.php#download
Test entity substitution in attributes big-endian
@@ -6453,6 +6453,24 @@ START_TEST(test_unknown_encoding_bad_ignore) } END_TEST +START_TEST(test_entity_in_utf16_be_attr) +{ + const char text[] = + /* <e a='&#228;'></e> */ + "\0<\0e\0 \0a\0=\0'\0&\0#\0\x32\0\x32\0\x38\0;\0'\0>\0<\0/\0e\0>"; + const XML_Char *expected = "\xc3\xa4"; + CharData storage; + + CharData_Init(&storage); + XML_SetUserData(parser, &storage); + XML_SetStartElementHandler(parser, accumulate_attribute); + if (_XML_Parse_SINGLE_BYTES(parser, text, sizeof(text)-1, + XML_TRUE) == XML_STATUS_ERROR) + xml_failure(parser); + CharData_CheckXMLChars(&storage, expected); +} +END_TEST + /* * Namespaces tests. */ @@ -11928,6 +11946,7 @@ make_suite(void) tcase_add_test(tc_basic, test_bad_doctype_star); tcase_add_test(tc_basic, test_bad_doctype_query); tcase_add_test(tc_basic, test_unknown_encoding_bad_ignore); + tcase_add_test(tc_basic, test_entity_in_utf16_be_attr); suite_add_tcase(s, tc_namespace); tcase_add_checked_fixture(tc_namespace,
harness: call hake with a proper architecture
@@ -51,7 +51,7 @@ class HakeBuildBase(Build): print archs if not os.path.isabs(srcdir): srcdir = os.path.relpath(srcdir, self.build_dir) - debug.checkcmd([os.path.join(srcdir, "hake", "hake.sh"), "--source-dir", srcdir], + debug.checkcmd([os.path.join(srcdir, "hake", "hake.sh"), "--source-dir", srcdir, "-a", archs[0]], cwd=self.build_dir) def _get_hake_conf(self, srcdir, archs):
Add more tests Test directory filename is_absolute is_relative
@@ -19,6 +19,70 @@ return { end), }, + group 'directory' { + test('directory from file path', function () + print(path.join{'/', '2020', 'img', 'mask.jpg'}) + assert.are_equal( + path.directory(path.join{'/', '2020', 'img', 'mask.jpg'}), + path.join{'/', '2020', 'img'} + ) + end), + test('drops trailing path sep', function () + assert.are_equal( + path.directory(path.join{'this', 'that'} .. path.separator), + path.join{'this', 'that'} + ) + end), + test('returns dot if given just a filename', function () + assert.are_equal( + path.directory('index.html'), + '.' + ) + end) + }, + + group 'filename' { + test('removes directories', function () + assert.are_equal( + path.filename(path.join{'paper', 'refs.bib'}), + 'refs.bib' + ) + assert.are_equal( + path.filename(path.join{'www', '.htaccess'}), + '.htaccess' + ) + end), + test('empty if no filename present', function () + assert.are_equal( + path.filename(path.join{'usr', 'bin'} .. path.separator), + '' + ) + end) + }, + + group 'is_absolute' { + test('network path is absolute', function () + local paths = {'c:', 'Applications'} + assert.is_truthy(path.is_absolute '//foo/bar') + end), + test('pure filename is not absolute', function () + assert.is_falsy(path.is_absolute '1337.txt') + end), + }, + + group 'is_relative' { + test('joined paths are relative', function () + local paths = {'one', 'two', 'test'} + assert.is_truthy(path.is_relative(path.join(paths))) + end), + test('pure filename is relative', function () + assert.is_truthy(path.is_relative '1337.txt') + end), + test('network path is not relative', function () + assert.is_falsy(path.is_relative '//foo/bar') + end), + }, + group 'splitting/joining' { test('split_path is inverse of join', function () local paths = {'one', 'two', 'test'}
Fix invalid alloc size when invalidating caches In AddInvalidationMessage() a new chunk always has double size of last chunk, but once the size exceeds 1GB, the max allowed alloc size, an error like "invalid memory alloc request size 1,342,177,300" will be thrown. Fixed by limiting the chunk size.
@@ -248,6 +248,14 @@ AddInvalidationMessage(InvalidationChunk **listHdr, /* Need another chunk; double size of last chunk */ int chunksize = 2 * chunk->maxitems; + /* + * Keep in mind: the max allowed alloc size is about 1GB, for + * simplification we set the upper limit to half of that. + */ +#define MAXCHUNKSIZE (MaxAllocSize / 2 / sizeof(SharedInvalidationMessage)) + if (chunksize > MAXCHUNKSIZE) + chunksize >>= 1; + chunk = (InvalidationChunk *) MemoryContextAlloc(CurTransactionContext, offsetof(InvalidationChunk, msgs) +
Call completion if failed to perform cleaning
@@ -256,18 +256,22 @@ static inline void ocf_cleaning_perform_cleaning(ocf_cache_t cache, { ocf_cleaning_t policy; - if (unlikely(!ocf_refcnt_inc(&cache->cleaner.refcnt))) + if (unlikely(!ocf_refcnt_inc(&cache->cleaner.refcnt))) { + cmpl(&cache->cleaner, 1000); return; + } policy = cache->cleaner.policy; ENV_BUG_ON(policy >= ocf_cleaning_max); - if (unlikely(!cleaning_policy_ops[policy].perform_cleaning)) - goto unlock; + if (unlikely(!cleaning_policy_ops[policy].perform_cleaning)) { + ocf_refcnt_dec(&cache->cleaner.refcnt); + cmpl(&cache->cleaner, 1000); + return; + } cleaning_policy_ops[policy].perform_cleaning(cache, cmpl); -unlock: ocf_refcnt_dec(&cache->cleaner.refcnt); }
Adapt cutest for query_create() and query_add_optional()
@@ -40,6 +40,7 @@ static void init_dname_compr(nsd_type* nsd) /* create the answer to one query */ static int run_query(query_type* q, nsd_type* nsd, buffer_type* in, int bsz) { + uint32_t now = 0; int received; query_reset(q, bsz, 0); /* recvfrom, in q->packet */ @@ -47,9 +48,9 @@ static int run_query(query_type* q, nsd_type* nsd, buffer_type* in, int bsz) buffer_write_at(q->packet, 0, buffer_begin(in), received); buffer_skip(q->packet, received); buffer_flip(q->packet); - if (query_process(q, nsd) != QUERY_DISCARDED) { + if (query_process(q, nsd, &now) != QUERY_DISCARDED) { /* Add EDNS0 and TSIG info if necessary. */ - query_add_optional(q, nsd); + query_add_optional(q, nsd, &now); buffer_flip(q->packet); /* result is buffer_begin(q->packet), buffer_remaining(q->packet),
app/system/utils: Modify ping not to use LwIP API directly Modify lwip_freeaddrinfo to freeaddrinfo libc
@@ -479,7 +479,7 @@ int ping_process(int count, const char *taddr, int size) } } - lwip_freeaddrinfo(result); + freeaddrinfo(result); close(s); printf("--- %s ping statistics ---\n", taddr); @@ -490,7 +490,7 @@ int ping_process(int count, const char *taddr, int size) return OK; err_out: - lwip_freeaddrinfo(result); + freeaddrinfo(result); if (s >= 0) { close(s); s = -1;
added initial image support to udon parser
{$code p/tape} :: code literal {$text p/tape} :: text symbol {$link p/(list graf) q/tape} :: URL + {$mage p/tape q/tape} :: image {$expr p/tuna:hoot} :: interpolated hoon == -- [[lin `~] +<.^$] [[lin ~] eat-newline] :: - ++ look :: inspedt line + ++ look :: inspect line ^- (unit trig) %+ bind (wonk (look:parse loc txt)) |= a/trig ^+ a (ifix [lit rit] (cash rit)) == :: + :: ![alt text](url) + :: + %+ stag %mage + ;~ pfix zap + ;~ (glue (punt whit)) + (ifix [lac rac] (cash rac)) + (ifix [lit rit] (cash rit)) + == + == + :: :: #hoon :: %+ stag %list `(list graf)`[%text (tufa ~-~201d. ~)]~ == $link [[%a [%href q.nex] ~] ^$(gaf p.nex)]~ + $mage [[%img [%src q.nex] ?~(p.nex ~ [%alt p.nex]~)] ~]~ == -- ::
HV: Corrected return type of two static functions hv: vtd: corrected the return type of get_qi_queue and get_ir_table to void * Acked-by: Eddie Dong
@@ -167,16 +167,16 @@ static inline uint8_t *get_ctx_table(uint32_t dmar_index, uint8_t bus_no) /* * @pre dmar_index < CONFIG_MAX_IOMMU_NUM */ -static inline uint8_t *get_qi_queue(uint32_t dmar_index) +static inline void *get_qi_queue(uint32_t dmar_index) { static struct page qi_queues[CONFIG_MAX_IOMMU_NUM] __aligned(PAGE_SIZE); - return qi_queues[dmar_index].contents; + return (void *)qi_queues[dmar_index].contents; } -static inline uint8_t *get_ir_table(uint32_t dmar_index) +static inline void *get_ir_table(uint32_t dmar_index) { static struct intr_remap_table ir_tables[CONFIG_MAX_IOMMU_NUM] __aligned(PAGE_SIZE); - return ir_tables[dmar_index].tables[0].contents; + return (void *)ir_tables[dmar_index].tables[0].contents; } bool iommu_snoop_supported(const struct iommu_domain *iommu)
TCPMv2: PD Timers - Add PE SourceCap to framework BRANCH=none TEST=make runtests Tested-by: Denis Brockus
@@ -588,15 +588,6 @@ static struct policy_engine { uint32_t vdm_data[VDO_HDR_SIZE + VDO_MAX_SIZE]; uint8_t vdm_ack_min_data_objects; - /* Timers */ - - /* - * Prior to a successful negotiation, a Source Shall use the - * SourceCapabilityTimer to periodically send out a - * Source_Capabilities Message. - */ - uint64_t source_cap_timer; - /* Counters */ /* @@ -748,8 +739,8 @@ static void pe_init(int port) pe[port].flags = 0; pe[port].dpm_request = 0; pe[port].dpm_curr_request = 0; - pe[port].source_cap_timer = TIMER_DISABLED; pd_timer_disable(port, PE_TIMER_NO_RESPONSE); + pd_timer_disable(port, PE_TIMER_SOURCE_CAP); pe[port].data_role = pd_get_data_role(port); pe[port].tx_type = TCPC_TX_INVALID; pe[port].events = 0; @@ -2136,8 +2127,8 @@ static void pe_src_discovery_entry(int port) * is in place. All other probing must happen from ready states. */ if (get_last_state_pe(port) != PE_VDM_IDENTITY_REQUEST_CBL) - pe[port].source_cap_timer = - get_time().val + PD_T_SEND_SOURCE_CAP; + pd_timer_enable(port, PE_TIMER_SOURCE_CAP, + PD_T_SEND_SOURCE_CAP); } static void pe_src_discovery_run(int port) @@ -2156,7 +2147,7 @@ static void pe_src_discovery_run(int port) * 1) DPM requests the identity of the cable plug and * 2) DiscoverIdentityCounter < nDiscoverIdentityCount */ - if (get_time().val > pe[port].source_cap_timer) { + if (pd_timer_is_expired(port, PE_TIMER_SOURCE_CAP)) { if (pe[port].caps_counter <= N_CAPS_COUNT) { set_state_pe(port, PE_SRC_SEND_CAPABILITIES); return;
Removes unused macros
@@ -295,9 +295,6 @@ typedef enum acvp_rsa_param { #define RSA_SIG_TYPE_PKCS1V15_NAME "PKCS1v1.5" #define RSA_SIG_TYPE_PKCS1PSS_NAME "PSS" -#define PROB_PRIME_TEST_2 2 -#define PROB_PRIME_TEST_3 3 - #define PRIME_TEST_TBLC2_NAME "tblC2" #define PRIME_TEST_TBLC3_NAME "tblC3"
hv: modify SOS i915 plane setting for hybrid scenario Change i915.domain_plane_owners and i915.avail_planes_per_pipe for hybrid scenario;because some User vm(like:Ubuntu/Debian and WaaG) doesn't support plane restriction; it will use PipeA by default.
"no_timer_check " \ "quiet loglevel=3 " \ "i915.nuclear_pageflip=1 " \ - "i915.avail_planes_per_pipe=0x01010F " \ - "i915.domain_plane_owners=0x011111110000 " \ + "i915.avail_planes_per_pipe=0x010700 " \ + "i915.domain_plane_owners=0x011100001111 " \ "i915.enable_gvt=1 " \ SOS_BOOTARGS_DIFF
options/posix: Enable SIGIO and SIGPWR in strsignal
@@ -69,9 +69,8 @@ char *strsignal(int sig) { CASE_FOR(SIGSEGV) CASE_FOR(SIGTERM) CASE_FOR(SIGPROF) -// TODO: Uncomment these after fixing the ABI. -// CASE_FOR(SIGIO) -// CASE_FOR(SIGPWR) + CASE_FOR(SIGIO) + CASE_FOR(SIGPWR) CASE_FOR(SIGALRM) CASE_FOR(SIGBUS) CASE_FOR(SIGCHLD)
Move add_subdirectory for shaders and VmaReplay to the end of the file
-if(VMA_BUILD_EXAMPLE_APP_SHADERS) - add_subdirectory(Shaders) -endif() - -if(VMA_BUILD_REPLAY_APP) - add_subdirectory(VmaReplay) -endif() - set(VMA_LIBRARY_SOURCE_FILES VmaUsage.cpp ) @@ -79,3 +71,11 @@ if (VMA_BUILD_EXAMPLE_APP) message(STATUS "VmaExample application is not supported to Linux") endif() endif() + +if(VMA_BUILD_EXAMPLE_APP_SHADERS) + add_subdirectory(Shaders) +endif() + +if(VMA_BUILD_REPLAY_APP) + add_subdirectory(VmaReplay) +endif()
docs: enable openhpc repo in chroot for leap
@@ -48,5 +48,6 @@ default location for this example is in [sms](*\#*) mkdir -m 755 $CHROOT/dev # create chroot /dev dir [sms](*\#*) mknod -m 666 $CHROOT/dev/zero c 1 5 # create /dev/zero device [sms](*\#*) wwmkchroot -v opensuse-15.1 $CHROOT # create base image +[sms](*\#*) cp -p /etc/zypp/repos.d/OpenHPC.repo $CHROOT/etc/zypp/repos.d \end{lstlisting} % end_ohpc_run
debian: bump to v0.12.4
+td-agent-bit (0.12.4) stable; urgency=low + + * Based on Fluent Bit v0.12.4 + + -- Eduardo Silva <[email protected]> Fri, 29 Sep 2017 22:00:00 -0600 + td-agent-bit (0.12.3) stable; urgency=low * Based on Fluent Bit v0.12.3
odissey: include total sent/recv bytes in console stats
@@ -142,12 +142,14 @@ od_console_show_stats_add(shapito_stream_t *stream, return -1; /* total_received */ - rc = shapito_be_write_data_row_add(stream, offset, "0", 1); + data_len = snprintf(data, sizeof(data), "%" PRIu64, total->bytes_recv); + rc = shapito_be_write_data_row_add(stream, offset, data, data_len); if (rc == -1) return -1; /* total_sent */ - rc = shapito_be_write_data_row_add(stream, offset, "0", 1); + data_len = snprintf(data, sizeof(data), "%" PRIu64, total->bytes_sent); + rc = shapito_be_write_data_row_add(stream, offset, data, data_len); if (rc == -1) return -1;
testcase/le_tc: AF_PACKET domain tests fixes add checking that AF_PACKET is set, before AF_PACKET tests
@@ -377,6 +377,7 @@ static void tc_net_socket_af_ax25_sock_stream_n(void) } #endif +#ifdef AF_PACKET /** * @testcase tc_net_socket_af_packet_sock_stream_n * @brief @@ -394,6 +395,7 @@ static void tc_net_socket_af_packet_sock_stream_n(void) close(fd); } +#endif #ifdef AF_UNIX /** @@ -1111,6 +1113,7 @@ static void tc_net_socket_af_ax25_sock_dgram_n(void) } #endif +#ifdef AF_PACKET /** * @testcase tc_net_socket_af_packet_sock_dgram_p * @brief @@ -1128,6 +1131,7 @@ static void tc_net_socket_af_packet_sock_dgram_p(void) close(fd); } +#endif /** * @testcase tc_net_socket_af_inet_sock_raw_p @@ -1506,7 +1510,9 @@ int net_socket_main(void) #ifdef AF_AX25 tc_net_socket_af_ax25_sock_stream_n(); #endif +#ifdef AF_PACKET tc_net_socket_af_packet_sock_stream_n(); +#endif #ifdef AF_UNIX tc_net_socket_af_unix_sock_stream_p(); tc_net_socket_af_unix_sock_stream_udp_n(); @@ -1560,7 +1566,9 @@ int net_socket_main(void) #ifdef AF_AX25 tc_net_socket_af_ax25_sock_dgram_n(); #endif +#ifdef AF_PACKET tc_net_socket_af_packet_sock_dgram_p(); +#endif tc_net_socket_af_inet_sock_raw_p(); tc_net_socket_af_inet_sock_raw_tcp_p(); tc_net_socket_af_inet_sock_raw_udp_p();
DataHubTest: Fix compilation
@@ -48,7 +48,7 @@ STATIC GUID SystemUUID = {0x5BC82C38, 0x4DB6, 0x4883, {0x85, 0x2E, 0xE7, 0x8D, 0 STATIC UINT8 BoardRevision = 1; STATIC UINT64 StartupPowerEvents = 0; STATIC UINT64 InitialTSC = 0; -STATIC UINT8 DevicePathsSupported = 1; +STATIC UINT32 DevicePathsSupported = 1; STATIC UINT8 SmcRevision[OC_SMC_REVISION_SIZE] = {0x02, 0x15, 0x0f, 0x00, 0x00, 0x07}; STATIC UINT8 SmcBranch[OC_SMC_BRANCH_SIZE] = {0x6a, 0x31, 0x37, 0x00, 0x00, 00, 0x00, 0x00}; STATIC UINT8 SmcPlatform[OC_SMC_PLATFORM_SIZE] = {0x6a, 0x31, 0x36, 0x6a, 0x31, 0x37, 0x00, 0x00};
Fix CMakeLists.txt file.
@@ -536,7 +536,7 @@ endif() # TINYSPLINE_LIBRARY_C_FLAGS # TINYSPLINE_LIBRARY_CXX_FLAGS # TINYSPLINE_BINDING_CXX_FLAGS -if(BUILD_SHARED_LIBS and ${TINYSPLINE_PLATFORM_IS_WINDOWS}) +if(BUILD_SHARED_LIBS AND ${TINYSPLINE_PLATFORM_IS_WINDOWS}) # Add TINYSPLINE_SHARED to the list of compiler definitions in order to # export it to the install targets (CMake, pkg-config etc.). This # ensures that that clients set this definition when linking against
improve package.tools.cmake
@@ -116,6 +116,11 @@ function _get_cflags(package, opt) table.join2(result, opt.cxflags) end table.join2(result, _get_cflags_from_packagedeps(package, opt)) + for i, flag in ipairs(result) do + if flag:match(" ") then + result[i] = '"' .. flag .. '"' + end + end if #result > 0 then return table.concat(result, ' ') end @@ -141,6 +146,11 @@ function _get_cxxflags(package, opt) table.join2(result, opt.cxflags) end table.join2(result, _get_cflags_from_packagedeps(package, opt)) + for i, flag in ipairs(result) do + if flag:match(" ") then + result[i] = '"' .. flag .. '"' + end + end if #result > 0 then return table.concat(result, ' ') end @@ -160,6 +170,11 @@ function _get_asflags(package, opt) if opt.asflags then table.join2(result, opt.asflags) end + for i, flag in ipairs(result) do + if flag:match(" ") then + result[i] = '"' .. flag .. '"' + end + end if #result > 0 then return table.concat(result, ' ') end @@ -179,6 +194,11 @@ function _get_ldflags(package, opt) if opt.ldflags then table.join2(result, opt.ldflags) end + for i, flag in ipairs(result) do + if flag:match(" ") then + result[i] = '"' .. flag .. '"' + end + end if #result > 0 then return table.concat(result, ' ') end @@ -198,6 +218,11 @@ function _get_shflags(package, opt) if opt.shflags then table.join2(result, opt.shflags) end + for i, flag in ipairs(result) do + if flag:match(" ") then + result[i] = '"' .. flag .. '"' + end + end if #result > 0 then return table.concat(result, ' ') end
board/kinox/sensors.c: Format with clang-format BRANCH=none TEST=none
@@ -63,30 +63,22 @@ BUILD_ASSERT(ARRAY_SIZE(adc_channels) == ADC_CH_COUNT); /* Temperature sensor configuration */ const struct temp_sensor_t temp_sensors[] = { - [TEMP_SENSOR_1_CPU] = { - .name = "CPU", + [TEMP_SENSOR_1_CPU] = { .name = "CPU", .type = TEMP_SENSOR_TYPE_BOARD, .read = get_temp_3v3_30k9_47k_4050b, - .idx = ADC_TEMP_SENSOR_1_CPU - }, - [TEMP_SENSOR_2_CPU_VR] = { - .name = "CPU VR", + .idx = ADC_TEMP_SENSOR_1_CPU }, + [TEMP_SENSOR_2_CPU_VR] = { .name = "CPU VR", .type = TEMP_SENSOR_TYPE_BOARD, .read = get_temp_3v3_30k9_47k_4050b, - .idx = ADC_TEMP_SENSOR_2_CPU_VR - }, - [TEMP_SENSOR_3_WIFI] = { - .name = "WIFI", + .idx = ADC_TEMP_SENSOR_2_CPU_VR }, + [TEMP_SENSOR_3_WIFI] = { .name = "WIFI", .type = TEMP_SENSOR_TYPE_BOARD, .read = get_temp_3v3_30k9_47k_4050b, - .idx = ADC_TEMP_SENSOR_3_WIFI - }, - [TEMP_SENSOR_4_DIMM] = { - .name = "DIMM", + .idx = ADC_TEMP_SENSOR_3_WIFI }, + [TEMP_SENSOR_4_DIMM] = { .name = "DIMM", .type = TEMP_SENSOR_TYPE_BOARD, .read = get_temp_3v3_30k9_47k_4050b, - .idx = ADC_TEMP_SENSOR_4_DIMM - }, + .idx = ADC_TEMP_SENSOR_4_DIMM }, }; BUILD_ASSERT(ARRAY_SIZE(temp_sensors) == TEMP_SENSOR_COUNT);
[tests] fix test_mcp2
@@ -6,7 +6,7 @@ import numpy as np # import siconos.numerics * fails with py.test! import siconos.numerics as SN -def mcp_function(n1, n2, z, F): +def mcp_function(n, z, F): M = np.array([[2., 1.], [1., 2.]]) @@ -14,7 +14,7 @@ def mcp_function(n1, n2, z, F): F[:] = np.dot(M,z) + q pass -def mcp_Nablafunction (n1, n2, z, nabla_F): +def mcp_Nablafunction (n, z, nabla_F): M = np.array([[2., 1.], [1., 2.]]) nabla_F[:] = M
Mention AutoAdb in README
@@ -261,6 +261,16 @@ scrcpy -s 192.168.0.1:5555 # short version You can start several instances of _scrcpy_ for several devices. +#### Autostart on device connection + +You could use [AutoAdb]: + +```bash +autoadb scrcpy -s '{}' +``` + +[AutoAdb]: https://github.com/rom1v/usbaudio + #### SSH tunnel To connect to a remote device, it is possible to connect a local `adb` client to
Protocol 21213
@@ -24,23 +24,23 @@ extern const std::string CLIENT_DATE; // // database format versioning // -static const int DATABASE_VERSION = 31213; +static const int DATABASE_VERSION = 21213; // // network protocol versioning // -static const int PROTOCOL_VERSION = 31213; //Old Version 21213 +static const int PROTOCOL_VERSION = 21213; //Old Version 21213 // intial proto version, to be increased after version/verack negotiation static const int INIT_PROTO_VERSION = 21212; // disconnect from peers older than this proto version -static const int MIN_PEER_PROTO_VERSION = 31213; +static const int MIN_PEER_PROTO_VERSION = 21213; -static const int MIN_INSTANTX_PROTO_VERSION = 31213; +static const int MIN_INSTANTX_PROTO_VERSION = 21213; -static const int MIN_MN_PROTO_VERSION = 31213; +static const int MIN_MN_PROTO_VERSION = 21213; // nTime field added to CAddress, starting with this version; // if possible, avoid requesting addresses nodes older than this