message
stringlengths
6
474
diff
stringlengths
8
5.22k
Home+Menu enters shipping mode
@@ -446,10 +446,6 @@ void process_input() { // Tie backlight on/off to button X // HAL_GPIO_WritePin(GPIOE, GPIO_PIN_1, HAL_GPIO_ReadPin(GPIOD, GPIO_PIN_0)); - // Tie shipping mode enable to button X - //if(HAL_GPIO_ReadPin(GPIOD, GPIO_PIN_0) == 0) { - // bq24295_enable_shipping_mode(&hi2c4); - //} /*vibe++; HAL_GPIO_WritePin(GPIOB, GPIO_PIN_6, vibe > vibe_trigger ? 1 : 0); @@ -499,6 +495,11 @@ void process_input() { (!HAL_GPIO_ReadPin(GPIOD, GPIO_PIN_5) ? blit::MENU : 0) | (!HAL_GPIO_ReadPin(GPIOC, GPIO_PIN_5) ? blit::JOYSTICK : 0); + // Tie shipping mode enable to HOME + MENU + if((blit::buttons & blit::HOME) && (blit::buttons & blit::MENU)) { + bq24295_enable_shipping_mode(&hi2c4); + } + // read accelerometer #ifdef I2C_READ_ACCEL
Fix for passing Bus to fpgainfo
@@ -61,7 +61,7 @@ def main(args): # Display data from FPGA info for feature in FEATURES: - cmd = "fpgainfo {} -B {}".format(feature, bdf['bus']) + cmd = "fpgainfo {} -B 0x{}".format(feature, bdf['bus']) subprocess.call(cmd, shell=True) gbs_paths = args.gbs_paths
Fixed issue with 1 n_tile and upconvert
@@ -611,8 +611,11 @@ void libxsmm_generator_gemm_load_C_amx( libxsmm_generated_code* io_ge i_gp_reg_mapping->gp_reg_ldc, 4, (i_n_offset * i_xgemm_desc->ldc + i_m_offset) * i_micro_kernel_config->datatype_size, - im * n_tiles + in); - + acc_id); + acc_id++; + if (n_tiles == 1) { + acc_id++; + } i_n_offset += n_blocking_info->sizes[in]; } i_m_offset += m_blocking_info->sizes[im];
handle_method_request in method sample
@@ -51,7 +51,7 @@ static void parse_method_message( int topic_len, MQTTClient_message const* message, az_iot_hub_client_method_request* out_method_request); -static void handle_method_message(az_iot_hub_client_method_request const* method_request); +static void handle_method_request(az_iot_hub_client_method_request const* method_request); static az_span invoke_ping(void); static void send_method_response( az_iot_hub_client_method_request const* request, @@ -242,7 +242,7 @@ static void receive_method_messages(void) parse_method_message(topic, topic_len, message, &method_request); IOT_SAMPLE_LOG_SUCCESS("Client parsed Method message."); - handle_method_message(&method_request); + handle_method_request(&method_request); MQTTClient_freeMessage(&message); MQTTClient_free(topic); @@ -289,7 +289,7 @@ static void parse_method_message( IOT_SAMPLE_LOG_AZ_SPAN("Payload:", message_span); } -static void handle_method_message(az_iot_hub_client_method_request const* method_request) +static void handle_method_request(az_iot_hub_client_method_request const* method_request) { if (az_span_is_content_equal(ping_method_name, method_request->name)) {
add ranking screen for process 0
@@ -85,9 +85,28 @@ def create_frame(codec, beatmap, skin, replay_event, replay_info, resultinfo, st if showranking: component.rankingpanel.start_show() + component.rankinghitresults.start_show() + component.rankingtitle.start_show() + component.rankingcombo.start_show() + component.rankingaccuracy.start_show() + component.rankinggrade.start_show() + component.menuback.start_show() + component.modicons.start_show() + component.rankingreplay.start_show() + component.rankinggraph.start_show() for x in range(200): # np_img.fill(0) component.rankingpanel.add_to_frame(pbuffer) + component.rankinghitresults.add_to_frame(pbuffer) + component.rankingtitle.add_to_frame(pbuffer, np_img) + component.rankingcombo.add_to_frame(pbuffer) + component.rankingaccuracy.add_to_frame(pbuffer) + component.rankinggrade.add_to_frame(pbuffer) + component.menuback.add_to_frame(pbuffer) + component.modicons.add_to_frame(pbuffer) + component.rankingreplay.add_to_frame(pbuffer) + component.rankinggraph.add_to_frame(pbuffer) + im = cv2.cvtColor(np_img, cv2.COLOR_BGRA2RGB) writer.write(im)
Only attempt to ftxwake in sempost if there might be a waiter.
@@ -6,6 +6,7 @@ use "futex" pkg thread = type sem = struct _val : ftxtag + _nwaiters : uint32 ;; const mksem : (v : uint32 -> sem) @@ -21,9 +22,11 @@ const mksem = {v const semwait = {s var v = 0 + xadd(&s._nwaiters, 1) for ; ; while (v = s._val) > 0 if xcas(&s._val, v, v - 1) == v + xadd(&s._nwaiters, -1) -> void ;; ;; @@ -47,6 +50,7 @@ const semtrywait = {s const sempost = {s std.assert((xadd(&s._val, 1) : uint32) != ~0x0, "error: semaphore overflowed\n") - /* Unconditionally wake one waiter */ + if xget(&s._nwaiters) > 0 ftxwake(&s._val) + ;; }
zephyr/shim/chip/npcx/npcx_monitor/npcx_monitor.c: Format with clang-format BRANCH=none TEST=none
@@ -261,7 +261,6 @@ int sspi_flash_get_image_used(const char *fw_base) ; return size ? size + 1 : 0; /* 0xea byte IS part of the image */ - } /* Entry function of spi upload function */
Add main to list of checked generator branch names [ci skip]
@@ -51,9 +51,9 @@ submodules=("cva6" "ibex" "boom" "gemmini" "hwacha" "icenet" "nvdla" "rocket-chi dir="generators" if [ "$CIRCLE_BRANCH" == "master" ] || [ "$CIRCLE_BRANCH" == "dev" ] then - branches=("master") + branches=("master" "main") else - branches=("master" "dev") + branches=("master" "main" "dev") fi search
libretro: add zlib on djgpp
@@ -623,9 +623,23 @@ if(BUILD_LIBRETRO) set(LIBRETRO_EXTENSION "a") endif() set_target_properties(tic80_libretro PROPERTIES SUFFIX "_partial.a") + include(CheckCSourceCompiles) + check_c_source_compiles( +"#ifndef __MSDOS__ +#error \"Not DOS\" +#endif" +IS_DOS +) + + if(IS_DOS) + add_custom_command(TARGET tic80_libretro + POST_BUILD + COMMAND ${CMAKE_SOURCE_DIR}/build/libretro/merge_static.sh $(AR) ${CMAKE_BINARY_DIR}/lib/tic80_libretro${LIBRETRO_SUFFIX}.${LIBRETRO_EXTENSION} ${CMAKE_BINARY_DIR}/lib/tic80_libretro_partial.a ${CMAKE_BINARY_DIR}/lib/libtic80core.a ${CMAKE_BINARY_DIR}/lib/liblua.a ${CMAKE_BINARY_DIR}/lib/libblipbuf.a ${CMAKE_BINARY_DIR}/lib/libduktape.a ${CMAKE_BINARY_DIR}/lib/libwren.a ${CMAKE_BINARY_DIR}/lib/libwasm.a ${CMAKE_BINARY_DIR}/lib/libsquirrel.a ${CMAKE_BINARY_DIR}/lib/libgiflib.a ${CMAKE_BINARY_DIR}/lib/liblpeg.a ${CMAKE_BINARY_DIR}/lib/libzlib.a ${MRUBY_LIB}) + else() add_custom_command(TARGET tic80_libretro POST_BUILD COMMAND ${CMAKE_SOURCE_DIR}/build/libretro/merge_static.sh $(AR) ${CMAKE_BINARY_DIR}/lib/tic80_libretro${LIBRETRO_SUFFIX}.${LIBRETRO_EXTENSION} ${CMAKE_BINARY_DIR}/lib/tic80_libretro_partial.a ${CMAKE_BINARY_DIR}/lib/libtic80core.a ${CMAKE_BINARY_DIR}/lib/liblua.a ${CMAKE_BINARY_DIR}/lib/libblipbuf.a ${CMAKE_BINARY_DIR}/lib/libduktape.a ${CMAKE_BINARY_DIR}/lib/libwren.a ${CMAKE_BINARY_DIR}/lib/libwasm.a ${CMAKE_BINARY_DIR}/lib/libsquirrel.a ${CMAKE_BINARY_DIR}/lib/libgiflib.a ${CMAKE_BINARY_DIR}/lib/liblpeg.a ${MRUBY_LIB}) + endif() else() add_library(tic80_libretro SHARED ${LIBRETRO_SRC}
[util][minor] replace Y_ASSERT with static_assert in bitops.h where possible
@@ -430,8 +430,8 @@ constexpr T RotateBitsRightCT(T value, const ui8 shift) noexcept { */ template <size_t Offset, size_t Size, class T> Y_FORCE_INLINE T SelectBits(T value) { - Y_ASSERT(Size < sizeof(T) * 8); - Y_ASSERT(Offset < sizeof(T) * 8); + static_assert(Size < sizeof(T) * 8, "violated: Size < sizeof(T) * 8"); + static_assert(Offset < sizeof(T) * 8, "violated: Offset < sizeof(T) * 8"); T id = 1; return (value >> Offset) & ((id << Size) - id); } @@ -441,8 +441,8 @@ Y_FORCE_INLINE T SelectBits(T value) { */ template <size_t Offset, size_t Size, class T> void SetBits(T& value, T bits) { - Y_ASSERT(Size < sizeof(T) * 8); - Y_ASSERT(Offset < sizeof(T) * 8); + static_assert(Size < sizeof(T) * 8, "violated: Size < sizeof(T) * 8"); + static_assert(Offset < sizeof(T) * 8, "violated: Offset < sizeof(T) * 8"); T id = 1; T maxValue = ((id << Size) - id); Y_ASSERT(bits <= maxValue);
pci-quirk: Fix initiliser warning core/pci-quirk.c:70:7: warning: missing field 'vendor_id' initializer [-Wmissing-field-initializers] {NULL} ^ Instead use an empty initaliser, as this is what the kernel does.
@@ -67,7 +67,7 @@ static void quirk_astbmc_vga(struct phb *phb __unused, static const struct pci_quirk quirk_table[] = { /* ASPEED 2400 VGA device */ { &quirk_astbmc_vga, 0x1a03, 0x2000 }, - {NULL} + { NULL, 0, 0 } }; void pci_handle_quirk(struct phb *phb, struct pci_device *pd)
Move monotonic_time to BPF class, use CLOCK_MONOTONIC This allows all the tools (currently: trace and memleak) to use the `monotonic_time` facility, with the fix to use `CLOCK_MONOTONIC` instead of `CLOCK_MONOTONIC_RAW`. Resolves
@@ -115,6 +115,30 @@ class BPF(object): "linux/netdevice.h": ["sk_buff", "net_device"] } + # BPF timestamps come from the monotonic clock. To be able to filter + # and compare them from Python, we need to invoke clock_gettime. + # Adapted from http://stackoverflow.com/a/1205762 + CLOCK_MONOTONIC = 1 # see <linux/time.h> + + class timespec(ct.Structure): + _fields_ = [('tv_sec', ct.c_long), ('tv_nsec', ct.c_long)] + + _librt = ct.CDLL('librt.so.1', use_errno=True) + _clock_gettime = _librt.clock_gettime + _clock_gettime.argtypes = [ct.c_int, ct.POINTER(timespec)] + + @classmethod + def monotonic_time(cls): + """monotonic_time() + Returns the system monotonic time from clock_gettime, using the + CLOCK_MONOTONIC constant. The time returned is in nanoseconds. + """ + t = cls.timespec() + if cls._clock_gettime(cls.CLOCK_MONOTONIC, ct.pointer(t)) != 0: + errno = ct.get_errno() + raise OSError(errno, os.strerror(errno)) + return t.tv_sec * 1e9 + t.tv_nsec + @classmethod def generate_auto_includes(cls, program_words): """
move wpa_supp to external_libs
- mingw-threads/mingw.thread.h - mingw-threads/mingw.mutex.h - mingw-threads/mingw.condition_variable.h -- source_filter: "^yandex_io/services/wifid/wpa_supplicant/" +- source_filter: "^yandex_io/external_libs/wpa_supplicant/" includes: - private/android_filesystem_config.h - cutils/sockets.h
Make settings and options parameters const in recordmethod.h
@@ -129,8 +129,9 @@ struct ossl_record_method_st { int level, unsigned char *secret, size_t secretlen, SSL_CIPHER *c, BIO *transport, BIO_ADDR *local, - BIO_ADDR *peer, OSSL_PARAM *settings, - OSSL_PARAM *options); + BIO_ADDR *peer, + const OSSL_PARAM *settings, + const OSSL_PARAM *options); void (*free)(OSSL_RECORD_LAYER *rl); int (*reset)(OSSL_RECORD_LAYER *rl); /* Is this needed? */
Remove "make" from build dependencies The project is built with meson+ninja.
@@ -43,7 +43,7 @@ Install the required packages from your package manager. sudo apt install ffmpeg libsdl2-2.0-0 # client build dependencies -sudo apt install make gcc git pkg-config meson ninja-build \ +sudo apt install gcc git pkg-config meson ninja-build \ libavcodec-dev libavformat-dev libavutil-dev \ libsdl2-dev
[Kernel] Re-enable user-mode frame symbolication
@@ -125,14 +125,12 @@ bool symbolicate_and_append(int frame_idx, uintptr_t* frame_addr, char** buf_hea } } else { - /* task_small_t* current_task = tasking_get_current_task(); const char* program_symbol = elf_sym_lookup(&current_task->elf_symbol_table, (uintptr_t)frame_addr); snprintf(symbol, sizeof(symbol), "[%s] %s", current_task->name, program_symbol); - if (!strncmp(program_symbol, "_start", 8)) { + if (!strncmp(program_symbol, "_start", 7)) { found_program_start = true; } - */ } printf("[%02d] 0x%p %s\n", frame_idx, (uintptr_t)frame_addr, symbol);
fuzz: correct hw minimization coverage
@@ -208,8 +208,8 @@ static void fuzz_perfFeedbackForMinimization(run_t* run) { ATOMIC_GET(run->global->feedback.feedbackMap->pidFeedbackEdge[run->fuzzNo]); uint64_t softCntCmp = ATOMIC_GET(run->global->feedback.feedbackMap->pidFeedbackCmp[run->fuzzNo]); - uint64_t cpuInstr = run->global->linux.hwCnts.cpuInstrCnt; - uint64_t cpuBranch = run->global->linux.hwCnts.cpuBranchCnt; + uint64_t cpuInstr = run->linux.hwCnts.cpuInstrCnt; + uint64_t cpuBranch = run->linux.hwCnts.cpuBranchCnt; LOG_I("Corpus Minimization, len:%zu (i,b,hw,ed,ip,cmp): %" PRIu64 "/%" PRIu64 "/%" PRIu64 "/%" PRIu64 "/%" PRIu64 "/%" PRIu64,
Allow path 45 for multi-sig
@@ -22,6 +22,8 @@ include $(BOLOS_SDK)/Makefile.defines DEFINES_LIB = USE_LIB_ETHEREUM APP_LOAD_PARAMS= --curve secp256k1 $(COMMON_LOAD_PARAMS) +# Allow the app to use path 45 for multi-sig (see BIP45). +APP_LOAD_PARAMS += --path "45'" APPVERSION_M=1 APPVERSION_N=1
timer: Move update_timer_expiry call to separate function
@@ -23,6 +23,14 @@ static LIST_HEAD(timer_poll_list); static bool timer_in_poll; static uint64_t timer_poll_gen; +static inline void update_timer_expiry(uint64_t target) +{ + if (proc_gen < proc_gen_p9) + p8_sbe_update_timer_expiry(target); + else + p9_sbe_update_timer_expiry(target); +} + void init_timer(struct timer *t, timer_func_t expiry, void *data) { t->link.next = t->link.prev = NULL; @@ -111,10 +119,7 @@ static void __schedule_timer_at(struct timer *t, uint64_t when) /* Pick up the next timer and upddate the SBE HW timer */ lt = list_top(&timer_list, struct timer, link); if (lt) { - if (proc_gen < proc_gen_p9) - p8_sbe_update_timer_expiry(lt->target); - else - p9_sbe_update_timer_expiry(lt->target); + update_timer_expiry(lt->target); } } @@ -172,11 +177,7 @@ static void __check_poll_timers(uint64_t now) * arbitrarily 1us. */ if (t->running) { - if (proc_gen < proc_gen_p9) - p8_sbe_update_timer_expiry(now + usecs_to_tb(1)); - else - p9_sbe_update_timer_expiry(now + usecs_to_tb(1)); - + update_timer_expiry(now + usecs_to_tb(1)); break; }
fix: Restore fabric and hwbcs header files
@@ -47,7 +47,7 @@ boatiotsdk.h is the wrapper header file for 3rd application to include. #endif #if PROTOCOL_USE_HLFABRIC == 1 - +#include "protocolapi/api_hlfabric.h" #endif #if PROTOCOL_USE_PLATONE == 1 @@ -59,7 +59,7 @@ boatiotsdk.h is the wrapper header file for 3rd application to include. #endif #if PROTOCOL_USE_HWBCS == 1 -// #include "protocolapi/api_hw_bcs.h" +#include "protocolapi/api_hw_bcs.h" #endif #if PROTOCOL_USE_CHAINMAKER == 1
BugID:17573647:fix white scan issue
@@ -97,6 +97,7 @@ NetworkContext *CoAPNetwork_init (const NetworkInit *p_param) #ifdef COAP_DTLS_SUPPORT if (COAP_NETWORK_DTLS == network->type) { // TODO: + coap_free(network); return NULL; }else{ #endif
naive: fix nonce set
|- ^- tang ?~ current-events ~ %+ weld $(current-events t.current-events) - =/ cur-event i.-.current-events + =/ cur-event i.current-events %+ category (weld "dominion " (scow %tas dominion.cur-event)) %+ category (weld "proxy " (scow %tas proxy.cur-event)) %+ category (weld "tx-type " (scow %tas tx-type.cur-event)) %bat =< q %- gen-tx - :+ +(nonce.owner.own:(~(got by points.state) cur-ship)) + :+ nonce.owner.own:(~(got by points.state) cur-ship) :+ [cur-ship proxy.cur-event] %set-management-proxy ::tx-type.cur-event why does the tx-type not work? (addr common-mgmt)
doc: update release note text
@@ -264,7 +264,8 @@ Many problems were resolved with the following fixes: - OpenSSL now also works properly, if we treat warnings as errors (compiler switch `-Werror`). -- [multifile](http://libelektra.org/plugins/multifile) now passes the child config to the storage plugins too and also handles symlinks correctly. +- The [multifile plugin](http://libelektra.org/plugins/multifile) now passes the child config + to the storage plugins too and also handles symlinks correctly. ## Outlook
graph-store: safely peek update-log Safely returns a null when either the update-log does not exists, or it is empty Fixes
[%x %peek-update-log @ @ ~] =/ =ship (slav %p i.t.t.path) =/ =term i.t.t.t.path - =/ update-log=(unit update-log:store) (~(get by update-logs) [ship term]) - ?~ update-log [~ ~] - =/ result=(unit [time update:store]) - (peek:orm-log:store u.update-log) - ?~ result [~ ~] - ``noun+!>([~ -.u.result]) + =/ m-update-log=(unit update-log:store) (~(get by update-logs) [ship term]) + :- ~ :- ~ :- %noun + !> ^- (unit time) + %+ biff m-update-log + |= =update-log:store + =/ result=(unit [=time =update:store]) + (peek:orm-log:store update-log) + (bind result |=([=time update:store] time)) == :: ++ get-node
Report fixed digits for AHRS info on web UI.
@@ -138,26 +138,26 @@ function GPSCtrl($rootScope, $scope, $state, $http, $interval) { $scope.press_time = Date.parse(situation.BaroLastMeasurementTime); $scope.gps_time = Date.parse(situation.GPSLastGPSTimeStratuxTime); if ($scope.gps_time - $scope.press_time < 1000) { - $scope.ahrs_alt = Math.round(situation.BaroPressureAltitude); + $scope.ahrs_alt = Math.round(situation.BaroPressureAltitude.toFixed(0)); } else { $scope.ahrs_alt = "---"; } - $scope.ahrs_heading = Math.round(situation.AHRSGyroHeading); + $scope.ahrs_heading = Math.round(situation.AHRSGyroHeading.toFixed(0)); // pitch and roll are in degrees - $scope.ahrs_pitch = Math.round(situation.AHRSPitch*10)/10; - $scope.ahrs_roll = Math.round(situation.AHRSRoll*10)/10; - $scope.ahrs_slip_skid = Math.round(situation.AHRSSlipSkid*10)/10; - ahrs.update($scope.ahrs_pitch, $scope.ahrs_roll, $scope.ahrs_heading, $scope.ahrs_slip_skid); + $scope.ahrs_pitch = situation.AHRSPitch.toFixed(1); + $scope.ahrs_roll = situation.AHRSRoll.toFixed(1); + $scope.ahrs_slip_skid = situation.AHRSSlipSkid.toFixed(1); + ahrs.update(situation.AHRSPitch, situation.AHRSRoll, situation.AHRSGyroHeading, situation.AHRSSlipSkid); - $scope.ahrs_heading_mag = Math.round(situation.AHRSMagHeading); - $scope.ahrs_gload = Math.round(situation.AHRSGLoad*100)/100; - gMeter.update($scope.ahrs_gload); + $scope.ahrs_heading_mag = situation.AHRSMagHeading.toFixed(0); + $scope.ahrs_gload = situation.AHRSGLoad.toFixed(2); + gMeter.update(situation.AHRSGLoad); if (situation.AHRSTurnRate> 0.25) { - $scope.ahrs_turn_rate = Math.round(360/situation.AHRSTurnRate/60*10)/10; // minutes/turn + $scope.ahrs_turn_rate = (60/situation.AHRSTurnRate).toFixed(1); // minutes/turn } else { - $scope.ahrs_turn_rate = '---' + $scope.ahrs_turn_rate = '\u221e'; } if (situation.AHRSStatus & 0x01) { statusGPS.classList.remove("off");
IPSEC: remove double byte swap of IP addresses
@@ -86,25 +86,25 @@ ipsec_input_protect_policy_match (ipsec_spd_t * spd, u32 sa, u32 da, u32 spi) if (ipsec_sa_is_set_IS_TUNNEL (s)) { - if (da != clib_net_to_host_u32 (s->tunnel_dst_addr.ip4.as_u32)) + if (da != s->tunnel_dst_addr.ip4.as_u32) continue; - if (sa != clib_net_to_host_u32 (s->tunnel_src_addr.ip4.as_u32)) + if (sa != s->tunnel_src_addr.ip4.as_u32) continue; return p; } - if (da < clib_net_to_host_u32 (p->laddr.start.ip4.as_u32)) + if (da < p->laddr.start.ip4.as_u32) continue; - if (da > clib_net_to_host_u32 (p->laddr.stop.ip4.as_u32)) + if (da > p->laddr.stop.ip4.as_u32) continue; - if (sa < clib_net_to_host_u32 (p->raddr.start.ip4.as_u32)) + if (sa < p->raddr.start.ip4.as_u32) continue; - if (sa > clib_net_to_host_u32 (p->raddr.stop.ip4.as_u32)) + if (sa > p->raddr.stop.ip4.as_u32) continue; return p; @@ -233,12 +233,8 @@ VLIB_NODE_FN (ipsec4_input_node) (vlib_main_t * vm, /* FIXME TODO missing check whether there is enough data inside * IP/UDP to contain ESP header & stuff ? */ p0 = ipsec_input_protect_policy_match (spd0, - clib_net_to_host_u32 - (ip0->src_address. - as_u32), - clib_net_to_host_u32 - (ip0->dst_address. - as_u32), + ip0->src_address.as_u32, + ip0->dst_address.as_u32, clib_net_to_host_u32 (esp0->spi)); @@ -283,12 +279,8 @@ VLIB_NODE_FN (ipsec4_input_node) (vlib_main_t * vm, { ah0 = (ah_header_t *) ((u8 *) ip0 + ip4_header_bytes (ip0)); p0 = ipsec_input_protect_policy_match (spd0, - clib_net_to_host_u32 - (ip0->src_address. - as_u32), - clib_net_to_host_u32 - (ip0->dst_address. - as_u32), + ip0->src_address.as_u32, + ip0->dst_address.as_u32, clib_net_to_host_u32 (ah0->spi));
no longer need altnerate host compiler to be gcc so we can remove logic for minimum gcc versions
@@ -73,44 +73,12 @@ if [ "$1" == "install" ] ; then $SUDO rm $INSTALL_OPENMP/testfile fi -GCCMIN=9 if [ "$AOMP_BUILD_CUDA" == 1 ] ; then if [ -f $CUDABIN/nvcc ] ; then CUDAVER=`$CUDABIN/nvcc --version | grep compilation | cut -d" " -f5 | cut -d"." -f1 ` echo "CUDA VERSION IS $CUDAVER" - if [ $CUDAVER -gt 8 ] ; then - GCCMIN=7 fi fi -fi - -function getgcc9orless(){ - _loc=`which gcc` - [ "$_loc" == "" ] && return - gccver=`$_loc --version | grep gcc | cut -d")" -f2 | cut -d"." -f1` - [ $gccver -gt $GCCMIN ] && _loc=`which gcc-$GCCMIN` - echo $_loc -} -function getgxx9orless(){ - _loc=`which g++` - [ "$_loc" == "" ] && return - gxxver=`$_loc --version | grep g++ | cut -d")" -f2 | cut -d"." -f1` - [ $gxxver -gt $GCCMIN ] && _loc=`which g++-$GCCMIN` - echo $_loc -} - -GCCLOC=$(getgcc9orless) -GXXLOC=$(getgxx9orless) -if [ "$GCCLOC" == "" ] ; then - echo "ERROR: NO ADEQUATE gcc" - echo " Please install gcc-5, gcc-7, gcc-8 or gcc-9" - exit 1 -fi -if [ "$GXXLOC" == "" ] ; then - echo "ERROR: NO ADEQUATE g++" - echo " Please install g++-5, g++-7, g++-8 or g++-9" - exit 1 -fi export LLVM_DIR=$AOMP_INSTALL_DIR GFXSEMICOLONS=`echo $GFXLIST | tr ' ' ';' ` @@ -143,7 +111,6 @@ if [ "$AOMP_BUILD_CUDA" == 1 ] ; then COMMON_CMAKE_OPTS="$COMMON_CMAKE_OPTS -DLIBOMPTARGET_NVPTX_ENABLE_BCLIB=ON -DLIBOMPTARGET_NVPTX_CUDA_COMPILER=$AOMP/bin/clang++ --DLIBOMPTARGET_NVPTX_ALTERNATE_HOST_COMPILER=$GCCLOC -DLIBOMPTARGET_NVPTX_BC_LINKER=$AOMP/bin/llvm-link -DLIBOMPTARGET_NVPTX_COMPUTE_CAPABILITIES=$NVPTXGPUS" fi
ipfix-export: tidy code style in flow_report.c Indent sections of code properly in vec_foreach loops. Type: style
@@ -322,8 +322,8 @@ flow_report_process (vlib_main_t * vm, nf->n_vectors++; } - nf = fr->flow_data_callback (frm, fr, - nf, to_next, ip4_lookup_node_index); + nf = fr->flow_data_callback (frm, fr, nf, to_next, + ip4_lookup_node_index); if (nf) vlib_put_frame_to_node (vm, ip4_lookup_node_index, nf); }
Add missing pointer helper macros
#define ALIGN_UP_POINTER_BY(Pointer, Align) ((PVOID)ALIGN_UP_BY(Pointer, Align)) #define ALIGN_UP(Address, Type) ALIGN_UP_BY(Address, sizeof(Type)) #define ALIGN_UP_POINTER(Pointer, Type) ((PVOID)ALIGN_UP(Pointer, Type)) +#define ALIGN_DOWN_BY(Address, Align) ((ULONG_PTR)(Address) & ~((ULONG_PTR)(Align) - 1)) +#define ALIGN_DOWN_POINTER_BY(Pointer, Align) ((PVOID)ALIGN_DOWN_BY(Pointer, Align)) +#define ALIGN_DOWN(Address, Type) ALIGN_DOWN_BY(Address, sizeof(Type)) +#define ALIGN_DOWN_POINTER(Pointer, Type) ((PVOID)ALIGN_DOWN(Pointer, Type)) #define PAGE_SIZE 0x1000
Adjust event filter
@@ -17,7 +17,7 @@ extern "C" { typedef struct clap_plugin_event_filter { // Returns true if the plugin is interested in the given event type. // [main-thread] - bool (*accepts)(const clap_plugin_t *plugin, clap_event_type event_type); + bool (*accepts)(const clap_plugin_t *plugin, uint16_t space_id, uint16_t event_id); } clap_plugin_event_filter_t;
Fixed typo for NIH
@@ -129,7 +129,7 @@ and use to get a basic plugin experience: - [clap-juce-extension](https://github.com/free-audio/clap-juce-extension), juce add-on - [MIP2](https://github.com/skei/MIP2), host and plugins - [Avendish](https://github.com/celtera/avendish), a reflection-based API for media plug-ins in C++ which supports Clap -- [nih-plug](https://github.com/robbert-vdh/nih-plug), an API-agnostic, Rust-based plugin framework aiming to reduce boilerplate without getting in your way +- [NIH-plug](https://github.com/robbert-vdh/nih-plug), an API-agnostic, Rust-based plugin framework aiming to reduce boilerplate without getting in your way ## Programming Language Bindings
docs: re-enable Lustre manifest for x86/centos
\renewcommand{\firstColWidth}{5.1cm} \renewcommand{\secondColWidth}{1.4cm} -%%% -%%% % Lustre -%%% \begin{table}[h!] -%%% \caption{\bf Lustre} \vspace*{\captionSpace{}} \label{table:lustre} -%%% \input manifest/lustre -%%% \vspace*{\tabSpaceBot{}} -%%% \end{table} + +% Lustre +\begin{table}[h!] +\caption{\bf Lustre} \vspace*{\captionSpace{}} \label{table:lustre} +\input manifest/lustre +\vspace*{\tabSpaceBot{}} +\end{table} % IO Libs (1) \begin{table}[h!]
detect and repair damaged PRISM header
@@ -3191,6 +3191,7 @@ if(linktype == DLT_NULL) { if(caplen < (uint32_t)LOBA_SIZE) { + pcapreaderrors = 1; printf("failed to read loopback header\n"); return; } @@ -3201,6 +3202,7 @@ else if(linktype == DLT_EN10MB) { if(caplen < (uint32_t)ETH2_SIZE) { + pcapreaderrors = 1; printf("failed to read ethernet header\n"); return; } @@ -3212,6 +3214,7 @@ else if(linktype == DLT_IEEE802_11_RADIO) { if(caplen < (uint32_t)RTH_SIZE) { + pcapreaderrors = 1; printf("failed to read radiotap header\n"); return; } @@ -3222,6 +3225,7 @@ else if(linktype == DLT_IEEE802_11_RADIO) #endif if(rth->it_len > caplen) { + pcapreaderrors = 1; printf("failed to read radiotap header\n"); return; } @@ -3236,6 +3240,7 @@ else if(linktype == DLT_PRISM_HEADER) { if(caplen < (uint32_t)PRISM_SIZE) { + pcapreaderrors = 1; printf("failed to read prism header\n"); return; } @@ -3243,12 +3248,19 @@ else if(linktype == DLT_PRISM_HEADER) #ifdef BIG_ENDIAN_HOST prism->msgcode = byte_swap_32(prism->msgcode); prism->msglen = byte_swap_32(prism->msglen); + prism->frmlen.data = byte_swap_32(prism->frmlen.data); + #endif if(prism->msglen > caplen) { + if(prism->frmlen.data > caplen) + { + pcapreaderrors = 1; printf("failed to read prism header\n"); return; } + prism->msglen = caplen -prism->frmlen.data; + } packet_ptr += prism->msglen; caplen -= prism->msglen; } @@ -3256,6 +3268,7 @@ else if(linktype == DLT_PPI) { if(caplen < (uint32_t)PPI_SIZE) { + pcapreaderrors = 1; printf("failed to read ppi header\n"); return; } @@ -3265,6 +3278,7 @@ else if(linktype == DLT_PPI) #endif if(ppi->pph_len > caplen) { + pcapreaderrors = 1; printf("failed to read ppi header\n"); return; } @@ -3278,6 +3292,7 @@ else if(caplen < 4) { + pcapreaderrors = 1; printf("failed to read packet\n"); return; }
[chainmaker]add header file function declaration
@@ -128,6 +128,20 @@ void BoatFree(void *mem_ptr); ******************************************************************************/ void BoatSleep(BUINT32 second); +/*!**************************************************************************** + * @brief Wrapper function for sleep (thread suspension) + * + * @details + * This function is a wrapper for sleep (thread suspension). + * \n It typically wraps sleep() or usleep() in a linux or Windows system. + * \n For RTOS it depends on the specification of the RTOS. + * + * @return + * This function returns the time second + ******************************************************************************/ +BUINT64 BoatGetTimes(void); + + /*! @}*/ #ifdef __cplusplus
[agx] Drop test
@@ -837,13 +837,6 @@ mod test { ); } - #[test] - fn test_constrain_rect() { - let m = Rect::new(0, 0, 100, 100); - let r = Rect::new(-5, -3, 6, 4); - assert_eq!(m.constrain(r), Rect::new(0, 0, 1, 1)); - } - #[test] fn test_rect_diff() { let main = Rect::new(0, 150, 300, 300);
feat[#1190]:Type conversion of enum variables
@@ -127,7 +127,7 @@ BOAT_RESULT hlchainmakerTransactionPacked(BoatHlchainmakerTx *tx_ptr, BCHAR* met sender.is_full_cert = true; tx_header.chain_id = tx_ptr->wallet_ptr->node_info.chain_id_info; - tx_header.tx_type = tx_type; + tx_header.tx_type = (Common__TxType)tx_type; tx_header.tx_id = tx_id; tx_header.timestamp = BoatGetTimes(); tx_header.sender = &sender;
HLS Sponge: Adding code to display status in MMIO registers ...
@@ -155,14 +155,20 @@ void action_wrapper(snap_membus_t *din_gmem, } for (slice = 0; slice < NB_SLICES; slice++) { - if (pe == (slice % nb_pe)) + if (pe == (slice % nb_pe)) { checksum ^= sponge(slice); + + /* Intermediate result display */ + write_results(Action_Output, Action_Input, + ReturnCode, checksum, slice); + } } timer_ticks += 42; } while (0); + /* Final output register writes */ write_results(Action_Output, Action_Input, ReturnCode, checksum, timer_ticks);
fixes 111 now correctly setting dead for infinite lifetimes
@@ -151,7 +151,7 @@ void agent_handleAdd(int sock, list_t* loaded_accounts, } else { timeout = agent_state.defaultTimeout; } - account_setDeath(account, time(NULL) + timeout); + account_setDeath(account, timeout ? time(NULL) + timeout : 0); struct oidc_account* found = NULL; if ((found = getAccountFromList(loaded_accounts, account)) != NULL) { if (account_getDeath(*found) != account_getDeath(*account)) {
Add squashfs-tools for building Linux AppImage from CircleCI
@@ -111,6 +111,7 @@ jobs: - run: sudo apt-get -y update - run: sudo apt-get -y install fakeroot - run: sudo apt-get -y install rpm + - run: sudo apt-get -y install squashfs-tools - attach_workspace: at: ~/ - checkout
Small update in hashmap header
#include <stddef.h> #include "celixbool.h" -#include "exports.h" #ifdef __cplusplus extern "C" { @@ -51,7 +50,7 @@ void celix_stringHashmap_destroy(celix_string_hashmap_t* map, bool freeValues); /** * @brief Returns the size of the hashmap */ -size_t celix_stringHashMap_size(celix_string_hashmap_t* map); +size_t celix_stringHashmap_size(celix_string_hashmap_t* map); /** * @brief add pointer entry the string hash map. @@ -61,7 +60,7 @@ size_t celix_stringHashMap_size(celix_string_hashmap_t* map); * @param value The pointer value to store with the key * @return The previous key or NULL of no key was set. Note also returns NULL if the previous value for the key was NULL. */ -void* celix_stringHashMap_put(celix_string_hashmap_t* map, const char* key, void* value); +void* celix_stringHashmap_put(celix_string_hashmap_t* map, const char* key, void* value); /** * @brief Returns the value for the provided key. @@ -83,7 +82,7 @@ bool celix_stringHashmap_hasKey(celix_string_hashmap_t* map, const char* key); * @param key The key te remove. * @return Return the pointer value for the removed key or NULL. Note will also return NULL if the pointer value for the removed key is NULL. */ -void* celix_stringHashMap_remove(celix_string_hashmap_t* map, const char* key); +void* celix_stringHashmap_remove(celix_string_hashmap_t* map, const char* key); #ifdef __cplusplus }
Use stringbuilder in ecma_raise_standard_error_with_format JerryScript-DCO-1.0-Signed-off-by: Adam Szilagyi
@@ -257,7 +257,7 @@ ecma_raise_standard_error_with_format (ecma_standard_error_t error_type, /**< er { JERRY_ASSERT (format != NULL); - ecma_string_t *error_msg_p = ecma_get_magic_string (LIT_MAGIC_STRING__EMPTY); + ecma_stringbuilder_t builder = ecma_stringbuilder_create (); const char *start_p = format; const char *end_p = format; @@ -273,13 +273,7 @@ ecma_raise_standard_error_with_format (ecma_standard_error_t error_type, /**< er /* Concat template string. */ if (end_p > start_p) { - const lit_utf8_byte_t *chars_p = (const lit_utf8_byte_t *) start_p; - lit_utf8_size_t chars_size = (lit_utf8_size_t) (end_p - start_p); - - error_msg_p = ecma_append_chars_to_string (error_msg_p, - chars_p, - chars_size, - lit_utf8_string_length (chars_p, chars_size)); + ecma_stringbuilder_append_raw (&builder, (lit_utf8_byte_t *) start_p, (lit_utf8_size_t) (end_p - start_p)); } /* Convert an argument to string without side effects. */ @@ -306,7 +300,8 @@ ecma_raise_standard_error_with_format (ecma_standard_error_t error_type, /**< er } /* Concat argument. */ - error_msg_p = ecma_concat_ecma_strings (error_msg_p, arg_string_p); + ecma_stringbuilder_append (&builder, arg_string_p); + ecma_deref_ecma_string (arg_string_p); start_p = end_p + 1; @@ -320,17 +315,14 @@ ecma_raise_standard_error_with_format (ecma_standard_error_t error_type, /**< er /* Concat reset of template string. */ if (start_p < end_p) { - const lit_utf8_byte_t *chars_p = (const lit_utf8_byte_t *) start_p; - lit_utf8_size_t chars_size = (lit_utf8_size_t) (end_p - start_p); - - error_msg_p = ecma_append_chars_to_string (error_msg_p, - chars_p, - chars_size, - lit_utf8_string_length (chars_p, chars_size)); + ecma_stringbuilder_append_raw (&builder, (lit_utf8_byte_t *) start_p, (lit_utf8_size_t) (end_p - start_p)); } - ecma_object_t *error_obj_p = ecma_new_standard_error_with_message (error_type, error_msg_p); - ecma_deref_ecma_string (error_msg_p); + ecma_string_t *builder_str_p = ecma_stringbuilder_finalize (&builder); + + ecma_object_t *error_obj_p = ecma_new_standard_error_with_message (error_type, builder_str_p); + + ecma_deref_ecma_string (builder_str_p); jcontext_raise_exception (ecma_make_object_value (error_obj_p)); return ECMA_VALUE_ERROR;
options/posix: Define quad_t and u_quad_t
@@ -43,5 +43,9 @@ typedef uint16_t u_int16_t; typedef uint32_t u_int32_t; typedef uint64_t u_int64_t; +// BSD extensions +typedef int64_t quad_t; +typedef uint64_t u_quad_t; + #endif // _SYS_TYPES_H
Cleanup dependencies Re-add later if needed for WSI extensions
@@ -90,39 +90,13 @@ vulkan_wsi_deps = [] with_platform_x11 = true with_platform_wayland = false -with_xlib_lease = true dep_x11 = dependency('x11') -dep_xext = dependency('xext') -dep_xcb = dependency('xcb') -dep_x11_xcb = dependency('x11-xcb') -dep_xcb_dri2 = dependency('xcb-dri2', version : '>= 1.8') -dep_libdrm = dependency( - 'libdrm', version : '>=' + '2.4.81', - required : true -) - -pre_args += '-DHAVE_DRI3' -dep_xcb_dri3 = dependency('xcb-dri3') -dep_xcb_present = dependency('xcb-present') -# until xcb-dri3 has been around long enough to make a hard-dependency: -if (dep_xcb_dri3.version().version_compare('>= 1.13') and - dep_xcb_present.version().version_compare('>= 1.13')) -pre_args += '-DHAVE_DRI3_MODIFIERS' -endif -dep_xcb_sync = dependency('xcb-sync') -dep_xshmfence = dependency('xshmfence', version : '>= 1.1') if with_platform_x11 - vulkan_wsi_args += ['-DVK_USE_PLATFORM_XCB_KHR', '-DVK_USE_PLATFORM_XLIB_KHR'] + vulkan_wsi_args += ['-DVK_USE_PLATFORM_XLIB_KHR'] vulkan_wsi_deps += [ - dep_xcb, - dep_x11_xcb, - dep_xcb_dri2, - dep_xcb_dri3, - dep_xcb_present, - dep_xcb_sync, - dep_xshmfence, + dep_x11, ] endif if with_platform_wayland @@ -131,16 +105,6 @@ if with_platform_wayland vulkan_wsi_deps += dep_wayland_client endif -vulkan_wsi_args += '-DVK_USE_PLATFORM_DISPLAY_KHR' -vulkan_wsi_deps += [dep_libdrm] - -if with_xlib_lease - dep_xcb_xrandr = dependency('xcb-randr') - dep_xlib_xrandr = dependency('xrandr', version : '>= 1.3') - vulkan_wsi_args += '-DVK_USE_PLATFORM_XLIB_XRANDR_EXT' - vulkan_wsi_deps += [dep_xcb_xrandr, dep_xlib_xrandr] -endif - inc_common = [ include_directories('include'), ]
launch: force black base hash
@@ -63,7 +63,7 @@ export default function LaunchApp(props) { }, 2000); }} > - <Text mono bold>{hashText || props.baseHash}</Text> + <Text mono bold color="#000000">{hashText || props.baseHash}</Text> </Box> );
Fix code markup
@@ -19,8 +19,10 @@ Quick instructions for doing a CMake based build: * Copy the sample CMake configuration into the top: +``` cp cfe/cmake/Makefile.sample Makefile cp -r cfe/cmake/sample\_defs sample\_defs +``` The files in "sample\_defs" will need to be adjusted to meet the needs of your mission, but the sample values provided are sufficient
Using engine task to avoid racing condition.
@@ -1540,7 +1540,12 @@ nxt_router_listen_socket_update(nxt_task_t *task, void *obj, void *data) nxt_event_engine_post(job->tmcf->engine, &job->work); - nxt_router_conf_release(task, old); + /* + * The task is allocated from configuration temporary + * memory pool so it can be freed after engine post operation. + */ + + nxt_router_conf_release(&engine->task, old); }
Auto detect version of windows for windows 10 with powershell >= v5.0 uses Expand_Archive utility for windows below 10 it requires unzip to be installed
@@ -14,16 +14,17 @@ powershell -command "(new-object System.Net.WebClient).DownloadFile('https://www powershell -command "(new-object System.Net.WebClient).DownloadFile('https://www.sqlite.org/2018/sqlite-amalgamation-3240000.zip','sqlite-amalgamation.zip')" :: Unzip zip files -if "%1" == "use_unzip" ( - unzip libodb-2.4.0.zip - unzip libodb-sqlite-2.4.0.zip - unzip sqlite-dll.zip - unzip sqlite-amalgamation.zip -) ELSE ( +ver | findstr /i "10\.0\." > nul && (set use=expand_archive) +if "%use%" == "expand_archive" ( powershell -command "Expand-Archive libodb-2.4.0.zip ." powershell -command "Expand-Archive libodb-sqlite-2.4.0.zip ." powershell -command "Expand-Archive sqlite-dll.zip ." powershell -command "Expand-Archive sqlite-amalgamation.zip ." +) ELSE ( + unzip libodb-2.4.0.zip + unzip libodb-sqlite-2.4.0.zip + unzip sqlite-dll.zip + unzip sqlite-amalgamation.zip ) :: Restructure directory @@ -51,10 +52,12 @@ goto :eof :help echo Usage: -echo install_dependencies.bat installs using powershell(>=5.0) commands to unzip -echo install_dependencies.bat use_unzip use GNU32 unzip utility to unzip files +echo install_dependencies.bat run install scripts echo install_dependencies.bat /? displays help echo. echo it downloads the given dependencies: echo - odb common runtime library libodb-2.4.0 echo - odb sqlite runtime library libodb-sqlite-2.4.0 +echo. +echo Requires unzip for windows version below 10 +
evp: fix coverity copy into fixed size buffer
@@ -1344,7 +1344,7 @@ static int fix_rsa_pss_saltlen(enum state state, break; } if (i == OSSL_NELEM(str_value_map)) { - BIO_snprintf(ctx->name_buf, 5, "%d", ctx->p1); + BIO_snprintf(ctx->name_buf, sizeof(ctx->name_buf), "%d", ctx->p1); } else { strcpy(ctx->name_buf, str_value_map[i].ptr); }
smaller, faster!
@@ -148,9 +148,8 @@ void UIShowText_b() __banked { if (l) { dest += strlen(itoa(script_variables[var_index], dest)); src += l + 1; - break; + continue; } - *dest++ = *src++; break; case '#': @@ -158,9 +157,8 @@ void UIShowText_b() __banked { if (l) { *dest++ = script_variables[var_index] + 0x20u; src += l + 1; - break; + continue; } - *dest++ = *src++; break; case '!': @@ -169,16 +167,12 @@ void UIShowText_b() __banked { if (l) { *dest++ = var_index + 0x10u; src += l + 2; - break; + continue; } } - *dest++ = *src++; - break; - - default: - *dest++ = *src++; break; } + *dest++ = *src++; } *dest = 0;
Fix 007_sync_rep.pl to notice failures in ALTER SYSTEM SET. If a test case tried to set an invalid value of synchronous_standby_names, the test script didn't detect that, which seems like a bad idea. Noticed while testing a proposed patch that broke some of these test cases.
@@ -18,7 +18,7 @@ sub test_sync_state if (defined($setting)) { - $self->psql('postgres', + $self->safe_psql('postgres', "ALTER SYSTEM SET synchronous_standby_names = '$setting';"); $self->reload; }
Print error message on bad CLI usage. This was a small regression when bundling cli-main into boot.janet.
@@ -93,6 +93,9 @@ int main(int argc, char **argv) { JanetFiber *fiber = janet_fiber(janet_unwrap_function(mainfun), 64, 1, mainargs); fiber->env = env; status = janet_continue(fiber, janet_wrap_nil(), &out); + if (status != JANET_SIGNAL_OK) { + janet_stacktrace(fiber, out); + } /* Deinitialize vm */ janet_deinit();
hssi: change CLI (hssi_loopback) for consistency
@@ -54,7 +54,7 @@ loopback_app::loopback_app() , ports_(0) { options_.add_option<uint8_t>("socket-id", 'S', option::with_argument, "Socket id encoded in BBS"); - options_.add_option<uint8_t>("bus-number", 'B', option::with_argument, "Bus number of PCIe device"); + options_.add_option<uint8_t>("bus", 'B', option::with_argument, "Bus number of PCIe device"); options_.add_option<uint8_t>("device", 'D', option::with_argument, "Device number of PCIe device"); options_.add_option<uint8_t>("function", 'F', option::with_argument, "Function number of PCIe device"); options_.add_option<std::string>("guid", 'G', option::with_argument, "GUID of AFC to open");
fpgabist input as str
@@ -45,7 +45,7 @@ def get_all_fpga_bdfs(): m = bdf_pattern.match(symlink) data = m.groupdict() if m else {} if data: - bdf_list.append(dict([(k, int(v, 16)) + bdf_list.append(dict([(k, v) for (k, v) in data.iteritems()])) return bdf_list @@ -103,13 +103,13 @@ def global_arguments(parser): type=str, help='Device Id for Intel FPGA default: 09c4') - parser.add_argument('-b', '--bus', type=int, + parser.add_argument('-b', '--bus', type=str, help='Bus number for specific FPGA') - parser.add_argument('-d', '--device', type=int, + parser.add_argument('-d', '--device', type=str, help='Device number for specific FPGA') - parser.add_argument('-f', '--function', type=int, + parser.add_argument('-f', '--function', type=str, help='Function number for specific FPGA') parser.add_argument('gbs_paths', nargs='+', type=str,
bufr_dump: option '-f' should dump header if unpack fails
@@ -281,7 +281,7 @@ int grib_tool_new_handle_action(grib_runtime_options* options, grib_handle* h) } else { fprintf(stdout,"\"ERROR: unable to unpack data section\""); options->error=err; - return err; + /*return err; See ECC-723*/ } } a=grib_find_accessor(h,"numericValues"); @@ -299,7 +299,7 @@ int grib_tool_new_handle_action(grib_runtime_options* options, grib_handle* h) } else { fprintf(stdout,"\"ERROR: unable to unpack data section\""); options->error=err; - return err; + /*return err; See ECC-723*/ } } grib_dump_content(h,stdout,options->dump_mode,options->dump_flags,0); @@ -314,7 +314,7 @@ int grib_tool_new_handle_action(grib_runtime_options* options, grib_handle* h) } else { fprintf(stdout,"\"ERROR: unable to unpack data section\""); options->error=err; - return err; + /*return err; See ECC-723*/ } } options->dump_flags=GRIB_DUMP_FLAG_ALL_ATTRIBUTES; @@ -338,9 +338,9 @@ int grib_tool_new_handle_action(grib_runtime_options* options, grib_handle* h) fprintf(stderr, "ERROR: unable to unpack data section: %s\n",grib_get_error_message(err)); exit(err); } else { - fprintf(stdout,"\"ERROR: unable to unpack data section\""); + fprintf(stdout,"ERROR: unable to unpack data section\n"); options->error=err; - return err; + /*return err; See ECC-723*/ } } grib_dump_content(h,stdout,options->dump_mode,options->dump_flags,0); @@ -354,7 +354,7 @@ int grib_tool_new_handle_action(grib_runtime_options* options, grib_handle* h) } else { fprintf(stdout,"\"ERROR: unable to unpack data section\""); options->error=err; - return err; + /*return err; See ECC-723*/ } } print_header(options);
Update System.access() tests
@@ -21,14 +21,10 @@ assert(System.access("/", F_OK).success()); assert(System.access("/", R_OK).success()); assert(System.access("/", X_OK).success()); assert(not System.access("/", W_OK).success()); -assert(System.access("/", W_OK).unwrapError() == 'Read-only file system'); assert(not System.access("/", F_OK|R_OK|W_OK).success()); -assert(System.access("/", F_OK|R_OK|W_OK).unwrapError() == 'Read-only file system'); assert(not System.access("/", F_OK|R_OK|W_OK|X_OK).success()); -assert(System.access("/", F_OK|R_OK|W_OK|X_OK).unwrapError() == 'Read-only file system'); assert(System.access("/", F_OK|R_OK|X_OK).success()); assert(not System.access(__file__, X_OK).success()); -assert(System.access(__file__, X_OK).unwrapError() == 'Permission denied'); import Path;
extmod/modnxtdevices: update SoundSensor method The soundsensor measures approximate sound intensity, not actual dB.
@@ -145,28 +145,25 @@ STATIC mp_obj_t nxtdevices_SoundSensor_make_new(const mp_obj_type_t *type, size_ return MP_OBJ_FROM_PTR(self); } -// pybricks.nxtdevices.SoundSensor.db -STATIC mp_obj_t nxtdevices_SoundSensor_db(mp_obj_t self_in) { - nxtdevices_SoundSensor_obj_t *self = MP_OBJ_TO_PTR(self_in); - int32_t analog; - pbdevice_get_values(self->pbdev, PBIO_IODEV_MODE_NXT_ANALOG__PASSIVE, &analog); - return mp_obj_new_int(analog_scale(analog, 650, 4860, true)); -} -STATIC MP_DEFINE_CONST_FUN_OBJ_1(nxtdevices_SoundSensor_db_obj, nxtdevices_SoundSensor_db); +// pybricks.nxtdevices.SoundSensor.intensity +STATIC mp_obj_t nxtdevices_SoundSensor_intensity(size_t n_args, const mp_obj_t *pos_args, mp_map_t *kw_args) { -// pybricks.nxtdevices.SoundSensor.dba -STATIC mp_obj_t nxtdevices_SoundSensor_dba(mp_obj_t self_in) { - nxtdevices_SoundSensor_obj_t *self = MP_OBJ_TO_PTR(self_in); + PB_PARSE_ARGS_METHOD(n_args, pos_args, kw_args, + nxtdevices_SoundSensor_obj_t, self, + PB_ARG_DEFAULT_TRUE(audible_only) + ); + + uint8_t mode = mp_obj_is_true(audible_only) ? PBIO_IODEV_MODE_NXT_ANALOG__ACTIVE : PBIO_IODEV_MODE_NXT_ANALOG__PASSIVE; int32_t analog; - pbdevice_get_values(self->pbdev, PBIO_IODEV_MODE_NXT_ANALOG__ACTIVE, &analog); + pbdevice_get_values(self->pbdev, mode, &analog); + return mp_obj_new_int(analog_scale(analog, 650, 4860, true)); } -STATIC MP_DEFINE_CONST_FUN_OBJ_1(nxtdevices_SoundSensor_dba_obj, nxtdevices_SoundSensor_dba); +STATIC MP_DEFINE_CONST_FUN_OBJ_KW(nxtdevices_SoundSensor_intensity_obj, 0, nxtdevices_SoundSensor_intensity); // dir(pybricks.ev3devices.SoundSensor) STATIC const mp_rom_map_elem_t nxtdevices_SoundSensor_locals_dict_table[] = { - { MP_ROM_QSTR(MP_QSTR_db), MP_ROM_PTR(&nxtdevices_SoundSensor_db_obj ) }, - { MP_ROM_QSTR(MP_QSTR_dba), MP_ROM_PTR(&nxtdevices_SoundSensor_dba_obj) }, + { MP_ROM_QSTR(MP_QSTR_intensity), MP_ROM_PTR(&nxtdevices_SoundSensor_intensity_obj ) }, }; STATIC MP_DEFINE_CONST_DICT(nxtdevices_SoundSensor_locals_dict, nxtdevices_SoundSensor_locals_dict_table);
Make test_alloc_realloc_long_attribute_value() robust vs allocations
@@ -9591,7 +9591,9 @@ START_TEST(test_alloc_realloc_long_attribute_value) if (_XML_Parse_SINGLE_BYTES(parser, text, strlen(text), XML_TRUE) != XML_STATUS_ERROR) break; - XML_ParserReset(parser, NULL); + /* See comment in test_alloc_parse_xdecl() */ + alloc_teardown(); + alloc_setup(); } if (i == 0) fail("Parse succeeded despite failing reallocator");
Remove unused data argument
@@ -323,7 +323,7 @@ static char * generateSpecProblemErrorMessage (const char * application) "\t\"$ sudo kdb umount spec:%s\"\n" "and then reinstall the application.\n\n" "If that does not help, please consult the application's documentation or contact its developers.\n", - application, application, application, application); + application, application, application); } /**
Update version classifiers.
@@ -573,6 +573,8 @@ setup(name = 'mod_wsgi', 'Programming Language :: Python :: 3.4', 'Programming Language :: Python :: 3.5', 'Programming Language :: Python :: 3.6', + 'Programming Language :: Python :: 3.7', + 'Programming Language :: Python :: 3.8', 'Topic :: Internet :: WWW/HTTP :: WSGI', 'Topic :: Internet :: WWW/HTTP :: WSGI :: Server' ],
fix bug in ranking tutorial ( )
"\n", "train_with_weights = Pool(\n", " data=X_train,\n", - " label=y_train,\n", - " group_id=queries_train\n", + " label=best_docs_train,\n", + " group_id=queries_train,\n", + " group_weight=create_weights(queries_train)\n", ")\n", "\n", "test_with_weights = Pool(\n", " data=X_test,\n", - " label=y_test,\n", - " group_id=queries_test\n", + " label=best_docs_test,\n", + " group_id=queries_test,\n", + " group_weight=create_weights(queries_test)\n", ")\n", "\n", "fit_model(\n",
Use mbedtls_xor in CMAC
@@ -148,15 +148,6 @@ exit: #endif /* !defined(MBEDTLS_CMAC_ALT) || defined(MBEDTLS_SELF_TEST) */ #if !defined(MBEDTLS_CMAC_ALT) -static void cmac_xor_block( unsigned char *output, const unsigned char *input1, - const unsigned char *input2, - const size_t block_size ) -{ - size_t idx; - - for( idx = 0; idx < block_size; idx++ ) - output[ idx ] = input1[ idx ] ^ input2[ idx ]; -} /* * Create padded last block from (partial) last block. @@ -247,7 +238,7 @@ int mbedtls_cipher_cmac_update( mbedtls_cipher_context_t *ctx, input, block_size - cmac_ctx->unprocessed_len ); - cmac_xor_block( state, cmac_ctx->unprocessed_block, state, block_size ); + mbedtls_xor( state, cmac_ctx->unprocessed_block, state, block_size ); if( ( ret = mbedtls_cipher_update( ctx, state, block_size, state, &olen ) ) != 0 ) @@ -267,7 +258,7 @@ int mbedtls_cipher_cmac_update( mbedtls_cipher_context_t *ctx, * final partial or complete block */ for( j = 1; j < n; j++ ) { - cmac_xor_block( state, input, state, block_size ); + mbedtls_xor( state, input, state, block_size ); if( ( ret = mbedtls_cipher_update( ctx, state, block_size, state, &olen ) ) != 0 ) @@ -319,16 +310,16 @@ int mbedtls_cipher_cmac_finish( mbedtls_cipher_context_t *ctx, if( cmac_ctx->unprocessed_len < block_size ) { cmac_pad( M_last, block_size, last_block, cmac_ctx->unprocessed_len ); - cmac_xor_block( M_last, M_last, K2, block_size ); + mbedtls_xor( M_last, M_last, K2, block_size ); } else { /* Last block is complete block */ - cmac_xor_block( M_last, last_block, K1, block_size ); + mbedtls_xor( M_last, last_block, K1, block_size ); } - cmac_xor_block( state, M_last, state, block_size ); + mbedtls_xor( state, M_last, state, block_size ); if( ( ret = mbedtls_cipher_update( ctx, state, block_size, state, &olen ) ) != 0 ) {
nimble/ll: Fix LE Read Supported States with no peripheral Bits 32,33 34 are for connectable advertising during connection state as central and thus should be reported only if both peripheral and central roles are enabled.
@@ -202,17 +202,13 @@ int8_t g_ble_ll_tx_power = MYNEWT_VAL(BLE_LL_TX_PWR_DBM); #define BLE_LL_S_CA_INIT ((uint64_t)1 << 32) #define BLE_LL_S_HDCA_INIT ((uint64_t)1 << 33) #define BLE_LL_S_LDCA_INIT ((uint64_t)1 << 34) -#else -#define BLE_LL_S_CA_INIT ((uint64_t)0 << 32) -#define BLE_LL_S_HDCA_INIT ((uint64_t)0 << 33) -#define BLE_LL_S_LDCA_INIT ((uint64_t)0 << 34) -#endif - -#if MYNEWT_VAL(BLE_LL_ROLE_CENTRAL) #define BLE_LL_S_CA_CENTRAL ((uint64_t)1 << 35) #define BLE_LL_S_HDCA_CENTRAL ((uint64_t)1 << 36) #define BLE_LL_S_LDCA_CENTRAL ((uint64_t)1 << 37) #else +#define BLE_LL_S_CA_INIT ((uint64_t)0 << 32) +#define BLE_LL_S_HDCA_INIT ((uint64_t)0 << 33) +#define BLE_LL_S_LDCA_INIT ((uint64_t)0 << 34) #define BLE_LL_S_CA_CENTRAL ((uint64_t)0 << 35) #define BLE_LL_S_HDCA_CENTRAL ((uint64_t)0 << 36) #define BLE_LL_S_LDCA_CENTRAL ((uint64_t)0 << 37)
pbio/platform/motors: Reduce medium motor gains. This reduces sensitivity to high inertial loads like free-spinning wheels. See also:
@@ -89,7 +89,7 @@ static const pbio_observer_settings_t settings_observer_technic_m_angular = { .k_1 = SCALE(0.000267785410941794f, PBIO_OBSERVER_SCALE_HIGH), .k_2 = SCALE(0.00643543836108826f, PBIO_OBSERVER_SCALE_HIGH), .f_low = SCALE(0.01218641268292683f, PBIO_OBSERVER_SCALE_TRQ), - .obs_gain = SCALE(0.002f, PBIO_OBSERVER_SCALE_TRQ), + .obs_gain = SCALE(0.001f, PBIO_OBSERVER_SCALE_TRQ), }; static const pbio_control_settings_t settings_servo_technic_m_angular = { @@ -99,11 +99,11 @@ static const pbio_control_settings_t settings_servo_technic_m_angular = { .count_tolerance = 10, .stall_rate_limit = 20, .stall_time = 200 * US_PER_MS, - .pid_kp = 20000, + .pid_kp = 10000, .pid_ki = 2000, .pid_kd = 1200, .integral_range = 45, - .integral_rate = 5, + .integral_rate = 25, .max_duty = 10000, .max_torque = 160000, .use_estimated_rate = true,
rsa: fix coverity resource leak
@@ -250,6 +250,7 @@ static int rsa_decrypt(void *vprsactx, unsigned char *out, size_t *outlen, if (prsactx->oaep_md == NULL) { prsactx->oaep_md = EVP_MD_fetch(prsactx->libctx, "SHA-1", NULL); if (prsactx->oaep_md == NULL) { + OPENSSL_free(tbuf); ERR_raise(ERR_LIB_PROV, ERR_R_INTERNAL_ERROR); return 0; } @@ -264,6 +265,7 @@ static int rsa_decrypt(void *vprsactx, unsigned char *out, size_t *outlen, /* RSA_PKCS1_WITH_TLS_PADDING */ if (prsactx->client_version <= 0) { ERR_raise(ERR_LIB_PROV, PROV_R_BAD_TLS_CLIENT_VERSION); + OPENSSL_free(tbuf); return 0; } ret = ossl_rsa_padding_check_PKCS1_type_2_TLS(
docs: update current year
\vspace*{0.5cm} -\noindent Copyright {\small\copyright} 2016-2018, OpenHPC, a Linux Foundation +\noindent Copyright {\small\copyright} 2016-2019, OpenHPC, a Linux Foundation Collaborative Project. All rights reserved. \\ \vspace*{0.1cm}
.ci/check-tidy: remove needless linter
@@ -57,5 +57,5 @@ for dir in build build-build; do echo "Checking $(echo ${SOURCES} | wc -w) files with clang-tidy" # The list of tidy checks must stay in sync with scripts/tidy - ${CLANGTIDY} -quiet -p ${dir} -checks=-*,clang-analyzer-*,-clang-analyzer-cplusplus*,bugprone-*,performance-*,portability-*,readability-*,-readability-braces-around-statements,-readability-magic-numbers,-readability-isolate-declaration,-readability-identifier-length,-readability-function-cognitive-complexity,-bugprone-reserved-identifier,-performance-no-int-to-ptr -warnings-as-errors=* -header-filter '.*' ${SOURCES} + ${CLANGTIDY} -quiet -p ${dir} -checks=-*,clang-analyzer-*,-clang-analyzer-cplusplus*,bugprone-*,performance-*,portability-*,readability-*,-readability-braces-around-statements,-readability-magic-numbers,-readability-isolate-declaration,-readability-identifier-length,-readability-function-cognitive-complexity,-bugprone-reserved-identifier,-bugprone-easily-swappable-parameters,-performance-no-int-to-ptr -warnings-as-errors=* -header-filter '.*' ${SOURCES} done
doc: review edits for rt_industry doc
@@ -20,7 +20,8 @@ for the RTVM. - Intel Kaby Lake (aka KBL) NUC platform with two disks inside (refer to :ref:`the tables <hardware_setup>` for detailed information). -- If you need to enable the serial port on KBL NUC, navigate to the :ref:`troubleshooting <connect_serial_port>` to prepare the cable. +- If you need to enable the serial port on KBL NUC, navigate to the + :ref:`troubleshooting <connect_serial_port>` to prepare the cable. - Follow below steps to install Clear Linux OS (Ver: 31470) onto both disks on the KBL NUC: .. _Clear Linux OS Server image: @@ -99,8 +100,9 @@ Hardware Setup +----------------------+-------------------+----------------------+-----------------------------------------------------------+ .. [1] The maximum supported memory size for ACRN is 16GB. If you are using - 32GB memory, follow the :ref:`config_32GB_memory` instruction to make the customized ACRN hypervisor - which is supported 32GB memory. For more detailed information about how to build ACRN + 32GB memory, follow the :ref:`config_32GB_memory` instruction to make + a customized ACRN hypervisor that can support 32GB memory. For more + detailed information about how to build ACRN from the source code, refer to this :ref:`guide <getting-started-building>`. Set up the ACRN Hypervisor for industry scenario @@ -158,8 +160,8 @@ Use the pre-installed industry ACRN hypervisor Boot000D* INTEL SSDPEKKW256G8 : PART 0 : Boot Drive BBS(HD,,0x0)..BO Boot000E* UEFI : INTEL SSDPEKKW256G8 : PART 0 : OS Bootloader PciRoot(0x0)/Pci(0x1d,0x0)/Pci(0x0,0x0)/NVMe(0x1,00-00-00-00-00-00-00-00)/HD(1,GPT,8aa992f8-8149-4f6b-8b64-503998c776c1,0x800,0x47000)..BO - .. note:: Ensure the ACRN is the first boot order, or you may use ``efibootmgr -o 1`` command to move it - to the first order. + .. note:: Ensure the ACRN is first in the boot order, or you may use ``efibootmgr -o 1`` command to move it + to the first position. .. note:: If you need to enable the serial port, run the following command before reboot: @@ -192,7 +194,7 @@ Use the ACRN industry out-of-the-box image # wget https://github.com/projectacrn/acrn-hypervisor/releases/download/acrn-2019w39.1-140000p/sos-industry-31080.img.xz -#. Decompress the xz image:: +#. Decompress the .xz image:: # xz -d sos-industry-31080.img.xz
avx512vl: test for all required ISA extensions These functions require both AVX-512BW and AVX-512VL.
@@ -56,7 +56,7 @@ SIMDE__BEGIN_DECLS SIMDE__FUNCTION_ATTRIBUTES simde__m128i simde_mm_cvtsepi16_epi8 (simde__m128i a) { - #if defined(SIMDE_AVX512VL_NATIVE) + #if defined(SIMDE_AVX512VL_NATIVE) && defined(SIMDE_AVX512BW_NATIVE) return _mm_cvtsepi16_epi8(a); #else simde__m128i_private r_ = simde__m128i_to_private(simde_mm_setzero_si128());; @@ -82,7 +82,7 @@ simde_mm_cvtsepi16_epi8 (simde__m128i a) { SIMDE__FUNCTION_ATTRIBUTES simde__m128i simde_mm256_cvtsepi16_epi8 (simde__m256i a) { - #if defined(SIMDE_AVX512VL_NATIVE) + #if defined(SIMDE_AVX512VL_NATIVE) && defined(SIMDE_AVX512BW_NATIVE) return _mm256_cvtsepi16_epi8(a); #else simde__m128i_private r_;
neon: test for MMX/SSE instead of x86 when choosing implementation On Elbrus we want to use MMX/SSE, so the old code was causing problems on Elbrus since the code assumed that if MMX/SSE was enabled the Intel types would be used.
@@ -174,7 +174,7 @@ SIMDE_ARM_NEON_TYPE_FLOAT_DEFINE_(64, 2, SIMDE_ALIGN_16_) #define SIMDE_ARM_NEON_NEED_PORTABLE_F64X1XN #define SIMDE_ARM_NEON_NEED_PORTABLE_F64X2XN #endif -#elif defined(SIMDE_ARCH_X86) || defined(SIMDE_ARCH_AMD64) +#elif defined(SIMDE_X86_MMX_NATIVE) || defined(SIMDE_X86_SSE_NATIVE) #define SIMDE_ARM_NEON_NEED_PORTABLE_F32 #define SIMDE_ARM_NEON_NEED_PORTABLE_F64
nuttx: extend configuration options
* the default upgrade mode. */ -/* Uncomment to enable the overwrite-only code path. */ +/* Enable the overwrite-only code path. */ -/* #define MCUBOOT_OVERWRITE_ONLY */ - -#ifdef MCUBOOT_OVERWRITE_ONLY +#ifdef CONFIG_MCUBOOT_OVERWRITE_ONLY +# define MCUBOOT_OVERWRITE_ONLY +#endif -/* Uncomment to only erase and overwrite those primary slot sectors needed +/* Only erase and overwrite those primary slot sectors needed * to install the new image, rather than the entire image slot. */ -/* #define MCUBOOT_OVERWRITE_ONLY_FAST */ +#ifdef CONFIG_MCUBOOT_OVERWRITE_ONLY_FAST +# define MCUBOOT_OVERWRITE_ONLY_FAST +#endif +/* Enable the direct-xip code path. */ + +#ifdef CONFIG_MCUBOOT_DIRECT_XIP +# define MCUBOOT_DIRECT_XIP #endif -/* Uncomment to enable the direct-xip code path. */ +/* Enable the revert mechanism in direct-xip mode. */ -/* #define MCUBOOT_DIRECT_XIP */ +#ifdef CONFIG_MCUBOOT_DIRECT_XIP_REVERT +# define MCUBOOT_DIRECT_XIP_REVERT +#endif -/* Uncomment to enable the ram-load code path. */ +/* Enable the ram-load code path. */ -/* #define MCUBOOT_RAM_LOAD */ +#ifdef CONFIG_MCUBOOT_RAM_LOAD +# define MCUBOOT_RAM_LOAD +#endif + +/* Enable bootstrapping the erased primary slot from the secondary slot */ + +#ifdef CONFIG_MCUBOOT_BOOTSTRAP +# define MCUBOOT_BOOTSTRAP +#endif /* Cryptographic settings *
Trying TRAVIS_PULL_REQUEST != false.
@@ -36,10 +36,10 @@ git: lfs_skip_smudge: true script: - - if [ "$TRAVIS_PULL_REQUEST_BRANCH" = "master" ]; then make coverage; fi - - if [ "$TRAVIS_PULL_REQUEST_BRANCH" = "" ]; then py.test; fi + - if [ "$TRAVIS_PULL_REQUEST" != "false" ]; then make coverage; fi + - if [ "$TRAVIS_PULL_REQUEST" = "false" ]; then py.test; fi after_success: - - if [ "$TRAVIS_PULL_REQUEST_BRANCH" = "master" ]; then coveralls --verbose; fi - - if [ "$TRAVIS_PULL_REQUEST_BRANCH" = "master" ]; then source .ci/build-docs.sh; fi + - if [ "$TRAVIS_PULL_REQUEST" != "false" ]; then coveralls --verbose; fi + - if [ "$TRAVIS_PULL_REQUEST" != "false" ]; then source .ci/build-docs.sh; fi
removed some debug printf's
@@ -1344,8 +1344,6 @@ while((pcapstatus = pcap_next_ex(pcapin, &pkh, &packet)) != -2) if(pkh->len < (macl +LLC_SIZE +IP_SIZE_MIN +GRE_MIN_SIZE +PPP_SIZE +PPPCHAPHDR_MIN_CHAL_SIZE)) continue; - printf("%d %ld\n", pkh->len, macl +LLC_SIZE +IP_SIZE_MIN +GRE_MIN_SIZE +PPP_SIZE); - iph = (ip_frame_t*)(payload + LLC_SIZE); iphlen = (iph->ver_hlen & 0x0f) * 4; if(iph->protocol != 0x2f) @@ -1668,7 +1666,7 @@ printf("%s %s (C) %s ZeroBeat\n" "-P <file> : output extended eapol packets pcap file (analysis purpose)\n" "-l <file> : output IPv4/IPv6 packets pcap file (analysis purpose)\n" "-m <file> : output extended eapol file (iSCSI CHAP authentication, MD5(CHAP): use hashcat -m 4800)\n" - "-n <file> : output extended eapol file (NetNTLMv1: use hashcat -m 5500)\n" + "-n <file> : output extended eapol file (NetNTLMv1 authentication: use hashcat -m 5500)\n" "-e <file> : output wordlist to use as hashcat input wordlist\n" "-E <file> : output wordlist to use as hashcat input wordlist (unicode)\n" "-u <file> : output usernames/identities file\n"
Fix compile error with gcc (again)
@@ -327,7 +327,7 @@ ssize_t ngtcp2_pkt_decode_stream_frame(ngtcp2_stream *dest, idlen = (size_t)(((type & NGTCP2_STREAM_SS_MASK) >> 3) + 1); - b = (type & NGTCP2_STREAM_OO_MASK) >> 1; + b = (uint8_t)((type & NGTCP2_STREAM_OO_MASK) >> 1); if (b) { offsetlen = (size_t)(1 << b); }
extstore: add extstore_limit_maxbytes stat was easy. also kills some comments.
@@ -489,7 +489,7 @@ void conn_worker_readd(conn *c) { if (c->io_wraplist) { //assert(c->io_wrapleft == 0); // assert no more to process conn_set_state(c, conn_mwrite); - drive_machine(c); // FIXME: Again, is it really this easy? + drive_machine(c); } #endif } @@ -3168,6 +3168,7 @@ static void server_stats(ADD_STAT add_stats, conn *c) { APPEND_STAT("extstore_bytes_read", "%llu", (unsigned long long)st.bytes_read); APPEND_STAT("extstore_bytes_used", "%llu", (unsigned long long)st.bytes_used); APPEND_STAT("extstore_bytes_fragmented", "%llu", (unsigned long long)st.bytes_fragmented); + APPEND_STAT("extstore_limit_maxbytes", "%llu", (unsigned long long)(st.page_count * st.page_size)); } #endif } @@ -3595,9 +3596,6 @@ static void _get_extstore_cb(void *e, obj_io *io, int ret) { if (c->io_wrapleft == 0) { assert(c->io_queued == true); c->io_queued = false; - // FIXME: Is it really this easy? - // I have worries this won't be performant enough under load though. - // Can cause the IO threads to block if the pipes are full, too. redispatch_conn(c); } }
makefile: add driverless-fax
@@ -116,9 +116,12 @@ cups_brf_SOURCES = \ # PPD Generators # ============== pkgppdgendir = $(CUPS_SERVERBIN)/driver - +driverlessfaxscripts = \ + utils/driverless-fax if ENABLE_DRIVERLESS pkgppdgen_PROGRAMS = driverless +pkgppdgen_SCRIPTS = \ + $(driverlessfaxscripts) endif driverless_SOURCES = \ @@ -133,6 +136,11 @@ driverless_LDADD = \ libppd.la \ $(CUPS_LIBS) + +EXTRA_DIST += \ + $(driverlessfaxscripts) + + # ======= # Banners # ======= @@ -1183,6 +1191,8 @@ endif if ENABLE_DRIVERLESS $(LN_SRF) $(DESTDIR)$(pkgppdgendir)/driverless $(DESTDIR)$(bindir) $(LN_SRF) $(DESTDIR)$(pkgppdgendir)/driverless $(DESTDIR)$(pkgbackenddir) + $(LN_SRF) $(DESTDIR)$(pkgppdgendir)/driverless-fax $(DESTDIR)$(bindir) + $(LN_SRF) $(DESTDIR)$(pkgppdgendir)/driverless-fax $(DESTDIR)$(pkgbackenddir) endif if ENABLE_BRAILLE $(LN_S) -f imagetobrf $(DESTDIR)$(pkgfilterdir)/imagetoubrl @@ -1228,6 +1238,8 @@ endif if ENABLE_DRIVERLESS $(RM) $(DESTDIR)$(bindir)/driverless $(RM) $(DESTDIR)$(pkgbackenddir)/driverless + $(RM) $(DESTDIR)$(bindir)/driverless-fax + $(RM) $(DESTDIR)$(pkgbackenddir)/driverless-fax endif if ENABLE_BRAILLE $(RM) $(DESTDIR)$(pkgfilterdir)/imagetoubrl
actions BUGFIX install libval from source
@@ -9,7 +9,7 @@ on: env: DEFAULT_OPTIONS: -DENABLE_BUILD_TESTS=ON -DENABLE_DNSSEC=ON - DEFAULT_PACKAGES: libcmocka-dev zlib1g-dev libssh-dev libssl-dev libval-dev + DEFAULT_PACKAGES: libcmocka-dev zlib1g-dev libssh-dev libssl-dev jobs: build: @@ -123,6 +123,13 @@ jobs: make -j2 sudo make install + git clone https://github.com/DNSSEC-Tools/DNSSEC-Tools.git dnssec-tools + cd dnssec-tools/dnssec-tools/validator + ./configure + make -j2 + sudo make install + + - name: Configure shell: bash working-directory: ${{ github.workspace }}
filtering_pState uses VLD1 and it needs to be aligned to avoid alignment faults
@@ -10,7 +10,7 @@ float32_t filtering_output_ref[LMS_MAX_BLOCKSIZE*2] = {0}; float32_t filtering_output_f32_fut[LMS_MAX_BLOCKSIZE*2] = {0}; float32_t filtering_output_f32_ref[LMS_MAX_BLOCKSIZE*2] = {0}; float32_t filtering_input_lms[LMS_MAX_BLOCKSIZE*2] = {0}; -float32_t filtering_pState[LMS_MAX_BLOCKSIZE + FILTERING_MAX_NUMTAPS] = {0}; +__ALIGNED(8) float32_t filtering_pState[LMS_MAX_BLOCKSIZE + FILTERING_MAX_NUMTAPS] = {0}; float32_t filtering_scratch[FILTERING_MAX_BLOCKSIZE * 3] = {0}; float32_t filtering_scratch2[FILTERING_MAX_BLOCKSIZE * 3] = {0}; float32_t filtering_coeffs_lms[FILTERING_MAX_NUMTAPS];
Add "cleandepend" target (clean *.d).
@@ -135,7 +135,7 @@ endef $(foreach prog, $(PROGRAMS), $(eval $(call build_program,$(prog)))) -ifeq ($(filter print-% clean,$(MAKECMDGOALS)),) +ifeq ($(filter print-% clean cleandepend,$(MAKECMDGOALS)),) -include $(sort $(DEPFILES)) endif @@ -159,6 +159,7 @@ endif # clean .PHONY: clean pre-clean do-clean post-clean +.PHONY: cleandepend pre-clean: @@ -171,6 +172,10 @@ post-clean: do-clean clean: post-clean +cleandepend: + $(foreach d,$(SUBDIR),$(call execute_command,$(Q) $(MAKE) -C $d cleandepend)) + $(Q) $(RM) $(DEPFILES) + ############################################################################## # implicit rules
Fix typo in ASN1_STRING_length doc CLA: trivial
@@ -71,8 +71,8 @@ utility functions should be used instead. In general it cannot be assumed that the data returned by ASN1_STRING_data() is null terminated or does not contain embedded nulls. The actual format of the data will depend on the actual string type itself: for example -for and IA5String the data will be ASCII, for a BMPString two bytes per -character in big endian format, UTF8String will be in UTF8 format. +for an IA5String the data will be ASCII, for a BMPString two bytes per +character in big endian format, and for an UTF8String it will be in UTF8 format. Similar care should be take to ensure the data is in the correct format when calling ASN1_STRING_set().
Fix LED return values.
@@ -5,33 +5,33 @@ int led_count(void) { if (rval.type == TOCK_SYSCALL_SUCCESS_U32) { return rval.data[0]; } else { - return 0; + return tock_error_to_rcode(rval.data[0]); } } int led_on(int led_num) { syscall_return_t rval = command2(DRIVER_NUM_LEDS, 1, led_num, 0); if (rval.type == TOCK_SYSCALL_SUCCESS) { - return 0; + return TOCK_SUCCESS; } else { - return 1; + return tock_error_to_rcode(rval.data[0]); } } int led_off(int led_num) { syscall_return_t rval = command2(DRIVER_NUM_LEDS, 2, led_num, 0); if (rval.type == TOCK_SYSCALL_SUCCESS) { - return 0; + return TOCK_SUCCESS; } else { - return 1; + return tock_error_to_rcode(rval.data[0]); } } int led_toggle(int led_num) { syscall_return_t rval = command2(DRIVER_NUM_LEDS, 3, led_num, 0); if (rval.type == TOCK_SYSCALL_SUCCESS) { - return 0; + return TOCK_SUCCESS; } else { - return 1; + return tock_error_to_rcode(rval.data[0]); } }
Turn off parallelization for h2d and d2h copies
@@ -554,6 +554,16 @@ static bool use_gpu(int p, void* ptr[p]) #endif return gpu; } + +static bool one_on_gpu(int p, void* ptr[p]) +{ + bool gpu = false; + + for (int i = 0; i < p; i++) + gpu |= cuda_ondevice(ptr[i]); + + return gpu; +} #endif extern double md_flp_total_time; @@ -699,7 +709,7 @@ out: debug_print_dims(DP_DEBUG4, D, dim); #ifdef USE_CUDA - if (num_auto_parallelize && !use_gpu(N, nptr1)) { + if (num_auto_parallelize && !use_gpu(N, nptr1) && !one_on_gpu(N, nptr1)) { #else if (num_auto_parallelize) { #endif
test: add ethereum test cases test_004ParametersInit_0002TxInitFailureNullParam test_004ParametersInit_0003TxInitFailureErrorGasPriceHexFormat
@@ -152,6 +152,57 @@ START_TEST(test_004ParametersInit_0001TxInitSuccess) } END_TEST +START_TEST(test_004ParametersInit_0002TxInitFailureNullParam) +{ + BSINT32 rtnVal; + BoatEthTx tx_ptr; + rtnVal = ethereumWalletPrepare(); + ck_assert_int_eq(rtnVal, BOAT_SUCCESS); + + rtnVal = BoatEthTxInit(NULL, &tx_ptr, TEST_IS_SYNC_TX, TEST_GAS_PRICE, + TEST_GAS_LIMIT, TEST_RECIPIENT_ADDRESS); + ck_assert(rtnVal == BOAT_ERROR_COMMON_INVALID_ARGUMENT); + + rtnVal = BoatEthTxInit(g_ethereum_wallet_ptr, NULL, TEST_IS_SYNC_TX, TEST_GAS_PRICE, + TEST_GAS_LIMIT, TEST_RECIPIENT_ADDRESS); + ck_assert(rtnVal == BOAT_ERROR_COMMON_INVALID_ARGUMENT); + + rtnVal = BoatEthTxInit(g_ethereum_wallet_ptr, &tx_ptr, TEST_IS_SYNC_TX, TEST_GAS_PRICE, + TEST_GAS_LIMIT, NULL); + ck_assert(rtnVal == BOAT_ERROR_COMMON_INVALID_ARGUMENT); + + rtnVal = BoatEthTxInit(NULL, NULL, TEST_IS_SYNC_TX, TEST_GAS_PRICE, + TEST_GAS_LIMIT, TEST_RECIPIENT_ADDRESS); + ck_assert(rtnVal == BOAT_ERROR_COMMON_INVALID_ARGUMENT); + + rtnVal = BoatEthTxInit(NULL, &tx_ptr, TEST_IS_SYNC_TX, TEST_GAS_PRICE, + TEST_GAS_LIMIT, NULL); + ck_assert(rtnVal == BOAT_ERROR_COMMON_INVALID_ARGUMENT); + + rtnVal = BoatEthTxInit(g_ethereum_wallet_ptr, NULL, TEST_IS_SYNC_TX, TEST_GAS_PRICE, + TEST_GAS_LIMIT, NULL); + ck_assert(rtnVal == BOAT_ERROR_COMMON_INVALID_ARGUMENT); + + rtnVal = BoatEthTxInit(NULL, NULL, TEST_IS_SYNC_TX, TEST_GAS_PRICE, + TEST_GAS_LIMIT, NULL); + ck_assert(rtnVal == BOAT_ERROR_COMMON_INVALID_ARGUMENT); + BoatIotSdkDeInit(); +} +END_TEST + +START_TEST(test_004ParametersInit_0003TxInitFailureErrorGasPriceHexFormat) +{ + BSINT32 rtnVal; + BoatEthTx tx_ptr; + rtnVal = ethereumWalletPrepare(); + ck_assert_int_eq(rtnVal, BOAT_SUCCESS); + rtnVal = BoatEthTxInit(g_ethereum_wallet_ptr, &tx_ptr, TEST_IS_SYNC_TX, "0x123G", + TEST_GAS_LIMIT, TEST_RECIPIENT_ADDRESS); + ck_assert(rtnVal == BOAT_ERROR_COMMON_INVALID_ARGUMENT); + +} +END_TEST + Suite *make_parameters_suite(void) { /* Create Suite */ @@ -164,6 +215,8 @@ Suite *make_parameters_suite(void) suite_add_tcase(s_param, tc_param_api); /* Test cases are added to the test set */ tcase_add_test(tc_param_api, test_004ParametersInit_0001TxInitSuccess); + tcase_add_test(tc_param_api, test_004ParametersInit_0002TxInitFailureNullParam); + tcase_add_test(tc_param_api, test_004ParametersInit_0003TxInitFailureErrorGasPriceHexFormat); return s_param; }
This comment is wrong.
@@ -11,7 +11,6 @@ Lily is a programming language focused on expressiveness and type safety. ``` scoped enum Color { Black, Blue, Cyan, Green, Magenta, Red, White, Yellow } -# Class properties and methods are public by default. class Terminal(var @foreground: Color, width_str: String) { public var @width = width_str.parse_i().unwrap_or(80)
add kernel-devel
To add optional support for mounting \beegfs{} file systems, an additional \pkgmgr{} repository must be configured. In this recipe, it is assumed that the \beegfs{} file system is hosted by servers that are pre-existing -and are not part of the install process. Once the client is configured to point +and are not part of the install process. Installing the client package triggers +a build of a kernel module, so the kernel module development packages must be +installed first. Once the client is configured to point to the \beegfs{} system management server, starting the client should trigger file system mounts. % begin_ohpc_run % ohpc_validation_newline -% ohpc_command if [[ ${enable_bgfs} -eq 1 ]];then +% ohpc_command if [[ ${enable_bgfs_client} -eq 1 ]];then % ohpc_indent 5 \begin{lstlisting}[language=bash,literate={-}{-}1,keywords={},upquote=true] [sms](*\#*) cd /etc/yum.repos.d [sms](*\#*) wget ${beegfs_repo} +[sms](*\#*) (*\install*) kernel-devel [sms](*\#*) (*\install*) beegfs-client [sms](*\#*) perl -pi -e "s/^sysMgmtdHost.*$/sysMgmtdHost = ${sysmgmtd_host}/" /etc/beegfs/beegfs-client.conf
Migrate old projectile events to include new data fields
@@ -15,7 +15,7 @@ import uuid from "uuid"; const indexById = indexBy("id"); export const LATEST_PROJECT_VERSION = "2.0.0"; -export const LATEST_PROJECT_MINOR_VERSION = "10"; +export const LATEST_PROJECT_MINOR_VERSION = "11"; /* * Helper function to make sure that all migrated functions @@ -1098,6 +1098,57 @@ export const migrateFrom200r9To200r10Triggers = (data) => { }; }; +/* Version 2.0.0 r11 adds additional parameters to EVENT_LAUNCH_PROJECTILE + */ +export const migrateFrom200r10To200r11Event = (event) => { + const migrateMeta = generateMigrateMeta(event); + + if (event.args && event.command === "EVENT_LAUNCH_PROJECTILE") { + const unionType = + (event.args && event.args.direction && event.args.direction.type) || + "direction"; + const unionValue = + event.args && event.args.direction && event.args.direction.value; + + let directionType = "direction"; + if (unionType === "variable") { + directionType = "anglevar"; + } else if (unionType === "property") { + directionType = "actor"; + } + + return migrateMeta({ + ...event, + args: { + ...event.args, + animSpeed: 7, + lifeTime: 1, + directionType, + direction: unionType === "direction" ? unionValue : "right", + angleVariable: unionType === "variable" ? unionValue : "0", + angle: 0, + otherActorId: + unionType === "property" ? unionValue.replace(/:.*/, "") : "$self$", + }, + }); + } + + return event; +}; + +const migrateFrom200r10To200r11Events = (data) => { + return { + ...data, + scenes: mapScenesEvents(data.scenes, migrateFrom200r10To200r11Event), + customEvents: (data.customEvents || []).map((customEvent) => { + return { + ...customEvent, + script: mapEvents(customEvent.script, migrateFrom200r10To200r11Event), + }; + }), + }; +}; + const migrateProject = (project) => { let data = { ...project }; let version = project._version || "1.0.0"; @@ -1169,6 +1220,10 @@ const migrateProject = (project) => { data = migrateFrom200r9To200r10Triggers(data); release = "10"; } + if (release === "10") { + data = migrateFrom200r10To200r11Events(data); + release = "11"; + } } if (process.env.NODE_ENV !== "production") {
stm32/usbdev: Be honest about data not being written to HID endpoint. USB_HID.send() should now return 0 if it could not send the report to the host.
@@ -1161,9 +1161,10 @@ uint8_t USBD_HID_SendReport(usbd_cdc_msc_hid_state_t *usbd, uint8_t *report, uin if (usbd->HID_ClassData.state == HID_IDLE) { usbd->HID_ClassData.state = HID_BUSY; USBD_LL_Transmit(usbd->pdev, usbd->hid_in_ep, report, len); + return USBD_OK; } } - return USBD_OK; + return USBD_FAIL; } uint8_t USBD_HID_SetNAK(usbd_cdc_msc_hid_state_t *usbd) {
Increase d_m3MaxFunctionStackHeight on some platforms
@@ -153,7 +153,7 @@ typedef int8_t i8; # ifndef d_m3MaxFunctionStackHeight # if defined(ESP8266) || defined(ESP32) || defined(ARDUINO_AMEBA) || defined(TEENSYDUINO) -# define d_m3MaxFunctionStackHeight 128 +# define d_m3MaxFunctionStackHeight 256 # endif # endif @@ -183,7 +183,7 @@ typedef int8_t i8; # define d_m3MaxConstantTableSize 64 # endif # ifndef d_m3MaxFunctionStackHeight -# define d_m3MaxFunctionStackHeight 64 +# define d_m3MaxFunctionStackHeight 128 # endif # ifndef d_m3CodePageAlignSize # define d_m3CodePageAlignSize 1024
add missing buffer_free
@@ -524,6 +524,7 @@ read_entry(FILE* in, const char* name, int *lineno, uint32_t* default_ttl, /* store raw EDNS for matching */ cur_reply->raw_ednsdata = data_buffer2wire(hex_ednsdata_buffer); + ldns_buffer_free(edns); ldns_buffer_free(hex_ednsdata_buffer); hex_ednsdata_buffer = NULL; } else if(reading_hex_ednsdata) {
Update link to TPP1 spec in RGBFIX man page To match the repo transfer from late 2021.
@@ -192,7 +192,7 @@ SurvivalKids.gbc .Sh TPP1 TPP1 is a homebrew mapper designed as a functional superset of the common traditional MBCs, allowing larger ROM and RAM sizes combined with other hardware features. Its specification, as well as more resources, can be found online at -.Lk https://github.com/TwitchPlaysPokemon/tpp1 . +.Lk https://github.com/aaaaaa123456789/tpp1 . .Ss MBC name The MBC name for TPP1 is more complex than standard mappers. It must be followed with the revision number, of the form
Add missing DefaultAlpha
@@ -4669,7 +4669,7 @@ TVector<THolder<IMetric>> TUserDefinedPerObjectMetric::Create(const TMetricConfi TUserDefinedPerObjectMetric::TUserDefinedPerObjectMetric(const TLossParams& params) : TMetric(ELossFunction::UserPerObjMetric, params) - , Alpha(params.GetParamsMap().contains("alpha") ? FromString<float>(params.GetParamsMap().at("alpha")) : 0.0) { + , Alpha(params.GetParamsMap().contains("alpha") ? FromString<float>(params.GetParamsMap().at("alpha")) : DefaultAlpha) { UseWeights.MakeIgnored(); } @@ -4714,6 +4714,7 @@ namespace { private: const double Alpha; + static constexpr double DefaultAlpha = 0.0; }; }
[ymake.core.conf] Make ADD_COMPILABLE_TRANSLATE output NOAUTO
@@ -3323,7 +3323,7 @@ macro EXTRALIBS_STATIC(Args...) { macro ADD_COMPILABLE_TRANSLATE(Dict, Name, MakeTransDictOptions...) { __translatename_lower=${tolower:Name} __translate_dict=${BINDIR}/transdict.${__translatename_lower}.cpp - RUN_PROGRAM(dict/tools/maketransdict -i ${Dict} ${MakeTransDictOptions} ${Name} STDOUT ${__translate_dict} IN ${Dict}) + RUN_PROGRAM(dict/tools/maketransdict -i ${Dict} ${MakeTransDictOptions} ${Name} STDOUT_NOAUTO ${__translate_dict} IN ${Dict}) } ### @usage ADD_COMPILABLE_TRANSLIT(TranslitTable NGrams Name Options...)
core/init: rearrange final boot steps Take secondaries out of sleep mode as late as possible, which tends to help with simulator boot speeds. Make give_self_os() the last step before starting the kernel, which matches the way secondaries behave.
@@ -565,24 +565,12 @@ void __noreturn load_and_boot_kernel(bool is_reboot) /* Clear SRCs on the op-panel when Linux starts */ op_panel_clear_src(); - cpu_give_self_os(); - mem_dump_free(); - /* Take processours out of nap */ - cpu_set_sreset_enable(false); - cpu_set_ipi_enable(false); - /* Dump the selected console */ stdoutp = dt_prop_get_def(dt_chosen, "linux,stdout-path", NULL); prlog(PR_DEBUG, "INIT: stdout-path: %s\n", stdoutp ? stdoutp : ""); - - printf("INIT: Starting kernel at 0x%llx, fdt at %p %u bytes\n", - kernel_entry, fdt, fdt_totalsize(fdt)); - - debug_descriptor.state_flags |= OPAL_BOOT_COMPLETE; - fdt_set_boot_cpuid_phys(fdt, this_cpu()->pir); /* Check there is something there before we branch to it */ @@ -591,6 +579,17 @@ void __noreturn load_and_boot_kernel(bool is_reboot) assert(0); } + /* Take processors out of nap */ + cpu_set_sreset_enable(false); + cpu_set_ipi_enable(false); + + printf("INIT: Starting kernel at 0x%llx, fdt at %p %u bytes\n", + kernel_entry, fdt, fdt_totalsize(fdt)); + + debug_descriptor.state_flags |= OPAL_BOOT_COMPLETE; + + cpu_give_self_os(); + if (kernel_32bit) start_kernel32(kernel_entry, fdt, mem_top); start_kernel(kernel_entry, fdt, mem_top);
board/brya/usbc_config.c: Format with clang-format BRANCH=none TEST=none
@@ -241,8 +241,8 @@ int board_is_vbus_too_low(int port, enum chg_ramp_vbus_state ramp_state) } if (voltage < BC12_MIN_VOLTAGE) { - CPRINTS("%s: port %d: vbus %d lower than %d", __func__, - port, voltage, BC12_MIN_VOLTAGE); + CPRINTS("%s: port %d: vbus %d lower than %d", __func__, port, + voltage, BC12_MIN_VOLTAGE); return 1; }
fixes bash completion deb package installation
dh $@ override_dh_auto_install: - $(MAKE) INSTALL_PATH=$$(pwd)/debian/oidc-agent/usr MAN_PATH=$$(pwd)/debian/oidc-agent/usr/share/man CONFIG_PATH=$$(pwd)/debian/oidc-agent/etc BASH_COMPLETION_PATH=$$(pwd)/debian/oidc-agent/usr/share/bash-completion/completer install + $(MAKE) INSTALL_PATH=$$(pwd)/debian/oidc-agent/usr MAN_PATH=$$(pwd)/debian/oidc-agent/usr/share/man CONFIG_PATH=$$(pwd)/debian/oidc-agent/etc BASH_COMPLETION_PATH=$$(pwd)/debian/oidc-agent/usr/share/bash-completion/completions install
Missing actor ids when calling custom event defaults to $self$
@@ -23,7 +23,7 @@ const compile = (input, helpers) => { if (!e.args) return; if (e.args.actorId && e.args.actordId !== "player") { - e.args.actorId = input[`$actor[${e.args.actorId}]$`]; + e.args.actorId = input[`$actor[${e.args.actorId}]$`] || "$self$"; } if (e.args.otherActorId && e.args.otherActorId !== "player") { e.args.otherActorId = input[`$actor[${e.args.otherActorId}]$`];
reduce amount of sbt calls for sim
@@ -8,7 +8,7 @@ SHELL=/bin/bash ######################################################################################### lookup_scala_srcs = $(shell find -L $(1)/ -iname "*.scala" 2> /dev/null) -PACKAGES=rocket-chip testchipip boom hwacha sifive-blocks utilities example +PACKAGES=rocket-chip testchipip boom hwacha sifive-blocks example SCALA_SOURCES=$(foreach pkg,$(PACKAGES),$(call lookup_scala_srcs,$(base_dir)/generators/$(pkg)/src/main/scala)) ######################################################################################### @@ -31,7 +31,7 @@ $(FIRRTL_JAR): $(call lookup_scala_srcs, $(REBAR_FIRRTL_DIR)/src/main/scala) ######################################################################################### # create simulation args file rule ######################################################################################### -$(sim_dotf): $(SCALA_SOURCES) $(FIRRTL_JAR) +$(sim_dotf): $(call lookup_scala_srcs,$(base_dir)/generators/utilities/src/main/scala) $(FIRRTL_JAR) cd $(base_dir) && $(SBT) "project utilities" "runMain utilities.GenerateSimFiles -td $(build_dir) -sim $(sim_name)" #########################################################################################
removed empty file warning from get_compression_from_magic_num this method was called twice so the warning is being printed twice.
@@ -106,9 +106,6 @@ namespace ebi * (5 characters), then we assume there's no compression. */ if (line.size() < 5) { - if (line.size() == 0) { - BOOST_LOG_TRIVIAL(warning) << "The VCF file provided is empty"; - } return NO_EXT; }
Build: Fix format specifier for `st_size` on macOS
@@ -86,7 +86,13 @@ else () set (ELEKTRA_TIME_USEC_F "\"%d\"") endif () -if (SIZEOF_STAT_ST_SIZE EQUAL SIZEOF_LONG) +# Unfortunately `long` and `long long` have the same size (8 bytes) on `amd64` architectures in macOS and Debian GNU/Linux. This means we +# can not differentiate these types only based on their size. Consequently we set the `long long` format specifier for `st_size` on macOS, +# and hope that all other operating systems, either use differently sized types for `long` and `long long`, or just use `long` as data type +# for `st_size`. +if (APPLE) + set (ELEKTRA_STAT_ST_SIZE_F "\"%llu\"") +elseif (SIZEOF_STAT_ST_SIZE EQUAL SIZEOF_LONG) set (ELEKTRA_STAT_ST_SIZE_F "\"%lu\"") elseif (SIZEOF_STAT_ST_SIZE EQUAL SIZEOF_LONG_LONG) set (ELEKTRA_STAT_ST_SIZE_F "\"%llu\"")
Off-by one error
@@ -468,7 +468,7 @@ _ (EvaluateExpression (io_module, & segmentOffset, c_m3Type_i32, & start, _throwif ("unallocated linear memory", !(io_memory->mallocated)); - if (segmentOffset > 0 && (size_t) segmentOffset + segment->size <= io_memory->mallocated->length) + if (segmentOffset >= 0 && (size_t)(segmentOffset) + segment->size <= io_memory->mallocated->length) { u8 * dest = m3MemData (io_memory->mallocated) + segmentOffset; memcpy (dest, segment->data, segment->size);
tneat - fixes
@@ -318,7 +318,7 @@ on_close(struct neat_flow_operations *opCB) printf("\tbytes\t\t: %u\n", tnf->rcv.bytes); printf("\trcv-calls\t: %u\n", tnf->rcv.calls); printf("\tduration\t: %.2fs\n", time_elapsed); - if (time_elapsed) { + if (time_elapsed > 0.0) { printf("\tbandwidth\t: %s/s\n", filesize_human(tnf->rcv.bytes/time_elapsed, buffer_filesize_human, sizeof(buffer_filesize_human))); } @@ -331,7 +331,7 @@ on_close(struct neat_flow_operations *opCB) printf("\tbytes\t\t: %u\n", tnf->snd.bytes); printf("\tsnd-calls\t: %u\n", tnf->snd.calls); printf("\tduration\t: %.2fs\n", time_elapsed); - if (time_elapsed > 0) { + if (time_elapsed > 0.0) { printf("\tbandwidth\t: %s/s\n", filesize_human(tnf->snd.bytes/time_elapsed, buffer_filesize_human, sizeof(buffer_filesize_human))); } }