message
stringlengths
6
474
diff
stringlengths
8
5.22k
Mark mpchargetime member wiki documented.
@@ -2450,7 +2450,7 @@ typedef struct entity u32 nextattack; // Time for next chance to attack. ~~ u32 next_hit_time; // When temporary invincibility after getting hit expires. ~~ u32 pausetime; // 2012/4/30 UT: Remove lastanimpos and add this. Otherwise hit pause is always bound to frame and attack box. ~~ - u32 mpchargetime; // For the CHARGE animation + u32 mpchargetime; // Next recharge tick when in the CHARGE animation. ~~ u32 sleeptime; // For the SLEEP animation u32 knockdowntime; // count knock down hit u32 invinctime; // Used to set time for invincibility to expire
npu2: Add NPU2_SM_REG_OFFSET() Add a register offset calculation macro using SM block index, similar to the other NPU2_*_REG_OFFSET() macros. Rebase/refactor original changes]
@@ -55,6 +55,10 @@ void npu2_scom_write(uint64_t gcid, uint64_t scom_base, NPU2_REG_OFFSET(((ndev)->index >> 1), \ 8 + ((ndev)->index % 2)*2, offset) +#define NPU2_SM_REG_OFFSET(ndev, sm, offset) \ + NPU2_REG_OFFSET(NPU2_STACK_STCK_0 + ((ndev)->index >> 1), \ + NPU2_BLOCK_SM_0 + (sm), offset) + /* Get the offset for this register */ #define NPU2_REG(reg) \ ((reg) & 0xffff)
Use Cortex-M mutexes (CC13xx/CC26xx)
/*---------------------------------------------------------------------------*/ /* Path to CMSIS header */ #define CMSIS_CONF_HEADER_PATH "cc13x0-cc26x0-cm3.h" + +/* Path to headers with implementation of mutexes and memory barriers */ +#define MUTEX_CONF_ARCH_HEADER_PATH "mutex-cortex.h" #define MEMORY_BARRIER_CONF_ARCH_HEADER_PATH "memory-barrier-cortex.h" /*---------------------------------------------------------------------------*/ #endif /* CC13XX_CC26XX_DEF_H_ */
GBP: BD index not BD ID
@@ -721,7 +721,7 @@ gbp_vxlan_tunnel_add (u32 vni, gbp_vxlan_tunnel_layer_t layer, gb = gbp_bridge_domain_get (gbi); gt->gt_gbd = gbi; - gt->gt_bd_index = gb->gb_bd_id; + gt->gt_bd_index = gb->gb_bd_index; gb->gb_vni_sw_if_index = gt->gt_sw_if_index; /* set it up as a GBP interface */ gt->gt_itf = gbp_itf_add_and_lock (gt->gt_sw_if_index,
suppress warnings for Mingw
#if defined( _WIN32 ) # if (defined(_M_AMD64) || defined(_M_X64)) || _M_IX86_FP == 2 +# ifndef __SSE2__ # define __SSE2__ +# endif # elif _M_IX86_FP == 1 +# ifndef __SSE__ # define __SSE__ # endif # endif +#endif #if defined( __SSE__ ) || defined( __SSE2__ ) # include <xmmintrin.h>
Some Initial Diagnostics Documentation
-# Diagnosing Issues using MsQuic +# Diagnosing Issues with MsQuic -TODO +This document describes various ways to debug and diagnose issues when using MsQuic. +# Logging + +For functional problems, generally logging is the best way to diagnose problems. MsQuic has extensive logs in the code to facilitate debugging. + +## Windows + +On Windows, MsQuic leverages [ETW](https://docs.microsoft.com/en-us/windows/win32/etw/event-tracing-portal) for its logging. + +To start collecting a trace, you can use the following command: + +``` +netsh.exe trace start overwrite=yes report=dis correlation=dis traceFile=quic.etl provider={ff15e657-4f26-570e-88ab-0796b258d11c} level=0x5 keywords=0xffffffff +``` + +And to stop log the trace session, you can use the following command: + +``` +netsh.exe trace stop +``` + +To convert the trace, you can use the following command: + +``` +netsh.exe trace convert quic.etl +``` + +> **Important** - If you're using a version of MsQuic that uses an ETW manifest version more recent than the one built into the Windows image, decoding may not provide correct output. **TODO** - Provide instructions to get around this problem. + +## Linux + +On Linux, MsQuic leverages [LTTng](https://lttng.org/features/) for its logging. + +To start collecting a trace, you can use the following commands: + +``` +mkdir msquic_lttng +lttng create msquic -o=./msquic_lttng +lttng enable-event --userspace CLOG_* +lttng add-context --userspace --type=vpid --type=vtid +lttng start +``` + +And to stop log the trace session, you can use the following command: + +``` +lttng stop msquic +``` + +To convert the trace, you can use the following commands: + +``` +babeltrace --names all ./msquic_lttng/* > quic.babel.txt +clog2text_lttng -i quic.babel.txt -s clog.sidecar -o quic.log --showTimestamp --showCpuInfo +``` + +> **Note** - The `clog.sidecar` file that was used to build MsQuic must be used. It can be found in the `./src/manifest` directory of the repository. + +# Performance + +When dealing with performance issues or you're just trying to profile the performance of the system logging isn't usually the best way forward. The following sections describe a few ways to anaylze difference performance characteristics of MsQuic. + +## Traces + + +## Windows + +First off, you're going to need xperf and wpa. Installing the [Windows ADK](https://docs.microsoft.com/en-us/windows-hardware/get-started/adk-install) is one of the easiest ways to get them. + +## Counters + +# FAQ
Swooshy launcher background
@@ -350,12 +350,50 @@ void init() { credits::prepare(); } +void swoosh(uint32_t time, float t1, float t2, float s1, float s2, int t0, int offset_y=120, int size=60, int alpha=45) { + for(auto x = 0u; x < screen.bounds.w; x++) { + if((x + 1) & 0b10) continue; // This is an aesthetic choice, not an optimisation! + float t_a = (x / s1) + float(time + t0) / t1; + float t_b = (x / s2) + float(time + t0) / t2; + + int s1 = sinf(t_a) * size; + int s2 = sinf(t_b) * size; + + int y1 = std::min(s1, s2) + offset_y; + int y2 = std::max(s1, s2) + offset_y; + + y2 += 2; + + int range = y2 - y1; + + for(auto y = 0; y <= range; y++) { + if(y > range / 2){ + screen.pen.a = alpha - (alpha * y / range); + } + else + { + screen.pen.a = alpha * y / range; + } + screen.pixel(Point(x, y1 + y)); + } + } +} + void render(uint32_t time) { screen.sprites = spritesheet; screen.pen = theme.color_background; screen.clear(); + if(currentScreen != Screen::screenshot) { + screen.pen = Pen(255, 255, 255); + swoosh(time, 5100.0f, 3900.0f, 1900.0f, 900.0f, 3500); + screen.pen = theme.color_accent; + swoosh(time, 5000.0f, 3000.0f, 1000.0f, 1000.0f, 0); + screen.pen = Pen(~theme.color_accent.r, ~theme.color_accent.g, ~theme.color_accent.b); + swoosh(time, 5100.0f, 3900.0f, 900.0f, 1100.0f, 5000); + } + if(!game_list.empty() && selected_game.type == GameType::screenshot) { if(screenshot->bounds.w == screen.bounds.w) { screen.blit(screenshot, Rect(Point(0, 0), screenshot->bounds), Point(0, 0));
clay: better print
^- path =/ paz (segments pax) |- ^- path - ?~ paz ~|(no-file+pre^pax !!) + ?~ paz ~_(leaf/"clay: no files match /{<pre>}/{<pax>}/hoon" !!) =/ pux=path pre^(snoc i.paz %hoon) ?: (~(has in deletes) pux) $(paz t.paz)
Fix the adding of padding to COOKIE-ECHO chunks. Thanks to Mark Wodrich who found this issue while fuzz testing the usrsctp stack and reported the issue in
#ifdef __FreeBSD__ #include <sys/cdefs.h> -__FBSDID("$FreeBSD: head/sys/netinet/sctp_output.c 351654 2019-09-01 10:09:53Z tuexen $"); +__FBSDID("$FreeBSD: head/sys/netinet/sctp_output.c 353119 2019-10-05 09:46:11Z tuexen $"); #endif #include <netinet/sctp_os.h> @@ -9569,8 +9569,7 @@ sctp_send_cookie_echo(struct mbuf *m, pad = 4 - pad; } if (pad > 0) { - cookie = sctp_pad_lastmbuf(cookie, pad, NULL); - if (cookie == NULL) { + if (sctp_pad_lastmbuf(cookie, pad, NULL) == NULL) { return (-8); } }
gpinitsystem: gpinitsystem_help reflects flag changes
@@ -13,13 +13,13 @@ gpinitsystem -c <gpinitsystem_config> [-B <parallel_processes>] [-p <postgresql_conf_param_file>] [-s <standby_master_host> - [-P <standby_master_port>] [-F <standby_master_datadir>]] + [-P <standby_master_port>] [ {-S | --standby-datadir} <standby_master_datadir>] [--max_connections=<number>] [--shared_buffers=<size>] [--locale=<locale>] [--lc-collate=<locale>] [--lc-ctype=<locale>] [--lc-messages=<locale>] [--lc-monetary=<locale>] [--lc-numeric=<locale>] [--lc-time=<locale>] [--su_password=<password>] - [-S] [-a] [-q] [-l <logfile_directory>] [-D] + [--mirror-mode={group|spread}] [-a] [-q] [-l <logfile_directory>] [-D] gpinitsystem -v @@ -203,7 +203,7 @@ OPTIONS is the same as the primary master. --F <standby_master_datadir> +--segment-datadir=<standby_master_datadir> | -S <standby_master_datadir> Optional and effective only when specified with -s. Specifies the data directory of the standby. @@ -221,12 +221,11 @@ OPTIONS change default passwords immediately after installation. --S +--mirror-mode={group|spread} - If mirroring parameters are specified, spreads the mirror segments - across the available hosts. The default is to group the set of mirror + Uses the specified mirroring mode. The default is to group the set of mirror segments together on an alternate host from their primary segment set. - Mirror spreading will place each mirror on a different host within the + Specifying spread will place each mirror on a different host within the Greenplum Database array. Spreading is only allowed if there is a sufficient number of hosts in the array (number of hosts is greater than the number of segment instances).
BugID:17920924:modify macro name 1
@@ -14,6 +14,6 @@ GLOBAL_DEFINES += __BSD_VISIBLE endif GLOBAL_INCLUDES += . -GLOBAL_DEFINES += AOS_LITTLEVGL +GLOBAL_DEFINES += AOS_COMP_LITTLEVGL include ./3rdparty/experimental/gui/littlevGL/lvgl/lvgl.mk
added and removed a hack but something weird is going on on hyak so commiting just in case
@@ -3037,6 +3037,11 @@ void ForceBehaviorPoise(BODY *body,EVOLVE *evolve,IO *io,SYSTEM *system,UPDATE * } } + // hack! test perturbation in q + // if (evolve->dTime >= 100000*YEARSEC) { +// body[0].dLuminosity = 3.85e26; +// } + if (body[iBody].bDistRot == 0) { PrecessionExplicit(body,evolve,iBody); if (body[iBody].bForceObliq) {
remove frequency limits from sdr-transceiver-wide.c
@@ -17,6 +17,9 @@ volatile uint32_t *rx_freq, *tx_freq; volatile uint16_t *gpio, *rx_rate, *rx_cntr, *tx_rate, *tx_cntr; volatile uint8_t *rx_rst, *tx_rst; +const uint32_t freq_min = 0; +const uint32_t freq_max = 62500000; + int sock_thread[4] = {-1, -1, -1, -1}; void *rx_ctrl_handler(void *arg); @@ -139,8 +142,6 @@ void *rx_ctrl_handler(void *arg) { int sock_client = sock_thread[0]; uint32_t command, freq; - uint32_t freq_min = 50000; - uint32_t freq_max = 60000000; /* set default rx phase increment */ *rx_freq = (uint32_t)floor(600000/125.0e6*(1<<30)+0.5); @@ -163,31 +164,24 @@ void *rx_ctrl_handler(void *arg) switch(command & 7) { case 0: - freq_min = 10000; *rx_rate = 3125; break; case 1: - freq_min = 25000; *rx_rate = 1250; break; case 2: - freq_min = 50000; *rx_rate = 625; break; case 3: - freq_min = 125000; *rx_rate = 250; break; case 4: - freq_min = 250000; *rx_rate = 125; break; case 5: - freq_min = 625000; *rx_rate = 50; break; case 6: - freq_min = 1250000; *rx_rate = 25; break; } @@ -238,8 +232,6 @@ void *tx_ctrl_handler(void *arg) { int sock_client = sock_thread[2]; uint32_t command, freq; - uint32_t freq_min = 50000; - uint32_t freq_max = 60000000; /* set PTT pin to low */ *gpio = 0; @@ -264,31 +256,24 @@ void *tx_ctrl_handler(void *arg) switch(command & 7) { case 0: - freq_min = 10000; *tx_rate = 3125; break; case 1: - freq_min = 25000; *tx_rate = 1250; break; case 2: - freq_min = 50000; *tx_rate = 625; break; case 3: - freq_min = 125000; *tx_rate = 250; break; case 4: - freq_min = 250000; *tx_rate = 125; break; case 5: - freq_min = 625000; *tx_rate = 50; break; case 6: - freq_min = 1250000; *tx_rate = 25; break; }
updates u3m_soft to skip tank printing if we have no kernel
@@ -1180,10 +1180,20 @@ u3m_soft(c3_w sec_w, if ( 0 == u3h(why) ) { return why; - } else { - u3_noun tax, cod, pro, mok; + } + else { + // don't use .^ at the top level! + // + c3_assert(1 != u3h(why)); - c3_assert(1 != u3h(why)); // don't use .^ at the top level! + // don't call +mook if we have no kernel + // + if ( 0 == u3A->roc ) { + u3z(why); + return u3nc(2, u3_nul); + } + else { + u3_noun tax, cod, pro, mok; if ( 2 == u3h(why) ) { cod = c3__exit; @@ -1195,6 +1205,7 @@ u3m_soft(c3_w sec_w, cod = u3k(u3h(u3t(why))); tax = u3k(u3t(u3t(why))); } + mok = u3dc("mook", 2, tax); pro = u3nc(cod, u3k(u3t(mok))); @@ -1204,6 +1215,7 @@ u3m_soft(c3_w sec_w, return pro; } } +} /* _cm_is_tas(): yes iff som (RETAIN) is @tas. */
poppy: Fix sensors location Sensors are in the lid, behind the screen. Similar changes were done for scarlet in c/433222. BRANCH=none TEST=Compile. Tested-by: Rajat Jain
@@ -625,7 +625,7 @@ struct motion_sensor_t motion_sensors[] = { .active_mask = SENSOR_ACTIVE_S0, .chip = MOTIONSENSE_CHIP_BMI160, .type = MOTIONSENSE_TYPE_ACCEL, - .location = MOTIONSENSE_LOC_BASE, + .location = MOTIONSENSE_LOC_LID, .drv = &bmi160_drv, .mutex = &g_lid_mutex, .drv_data = &g_bmi160_data, @@ -662,7 +662,7 @@ struct motion_sensor_t motion_sensors[] = { .active_mask = SENSOR_ACTIVE_S0, .chip = MOTIONSENSE_CHIP_BMI160, .type = MOTIONSENSE_TYPE_GYRO, - .location = MOTIONSENSE_LOC_BASE, + .location = MOTIONSENSE_LOC_LID, .drv = &bmi160_drv, .mutex = &g_lid_mutex, .drv_data = &g_bmi160_data, @@ -699,7 +699,7 @@ struct motion_sensor_t motion_sensors[] = { .active_mask = SENSOR_ACTIVE_S0, .chip = MOTIONSENSE_CHIP_BMI160, .type = MOTIONSENSE_TYPE_MAG, - .location = MOTIONSENSE_LOC_BASE, + .location = MOTIONSENSE_LOC_LID, .drv = &bmi160_drv, .mutex = &g_lid_mutex, .drv_data = &g_bmi160_data, @@ -736,7 +736,7 @@ struct motion_sensor_t motion_sensors[] = { .active_mask = SENSOR_ACTIVE_S0, .chip = MOTIONSENSE_CHIP_BMP280, .type = MOTIONSENSE_TYPE_BARO, - .location = MOTIONSENSE_LOC_BASE, + .location = MOTIONSENSE_LOC_LID, .drv = &bmp280_drv, .drv_data = &bmp280_drv_data, .port = I2C_PORT_BARO,
Try 'XDG_CONFIG_HOME' too (issue
@@ -156,8 +156,12 @@ static const char *SPACING_ATTRIBUTE = "spacing"; static const char *FALSE_VALUE = "false"; static const char *TRUE_VALUE = "true"; -static const char CONFIG_FILE[] = "$HOME/.config/jwm/jwmrc"; -static const char OLD_CONFIG_FILE[] = "$HOME/.jwmrc"; +static const char * const CONFIG_FILES[] = { + "$XDG_CONFIG_HOME/jwm/jwmrc", + "$HOME/.config/jwm/jwmrc", + "$HOME/.jwmrc", +}; +static const unsigned CONFIG_FILE_COUNT = ARRAY_LENGTH(CONFIG_FILES); static char ParseFile(const char *fileName, int depth); static char *ReadFile(FILE *fd); @@ -248,14 +252,19 @@ void ParseConfig(const char *fileName) if(!ParseFile(fileName, 0)) { ParseError(NULL, _("could not open %s"), fileName); } - } else if(ParseFile(CONFIG_FILE, 0)) { - /* Found a config file in the new location. */ - } else if(ParseFile(OLD_CONFIG_FILE, 0)) { - /* Found a config file in the old location. */ - } else if(!ParseFile(SYSTEM_CONFIG, 0)) { - /* No config file could be found. */ + } else { + unsigned i; + char found = 0; + for(i = 0; i < CONFIG_FILE_COUNT; i++) { + if(ParseFile(CONFIG_FILES[i], 0)) { + found = 1; + break; + } + } + if(!found) { ParseError(NULL, _("could not open %s or %s"), - CONFIG_FILE, SYSTEM_CONFIG); + CONFIG_FILES[0], SYSTEM_CONFIG); + } } ValidateTrayButtons(); ValidateKeys();
cmake: convert python path to cmake path
@@ -10,6 +10,7 @@ set(IDFTOOL ${PYTHON} "${IDF_PATH}/tools/idf.py") # Internally, the Python interpreter is already set to 'python'. Re-set here # to be absolutely sure. set_default(PYTHON "python") +file(TO_CMAKE_PATH ${PYTHON} PYTHON) idf_build_set_property(PYTHON ${PYTHON}) # On processing, checking Python required modules can be turned off if it was
check cached provider isn't NULL Tested-by: Build Bot
@@ -247,9 +247,11 @@ void Confmon::do_next_provider() state &= ~CONFMON_S_ITERGRACE; for (ProviderList::const_iterator ii = active_providers.begin(); ii != active_providers.end(); ++ii) { - ConfigInfo *info; Provider* cached_provider = *ii; - info = cached_provider->get_cached(); + if (!cached_provider) { + continue; + } + ConfigInfo *info = cached_provider->get_cached(); if (!info) { continue; }
board/reef_mchp/usb_pd_policy.c: Format with clang-format BRANCH=none TEST=none
@@ -41,7 +41,8 @@ static void board_vbus_update_source_current(int port) { enum gpio_signal gpio = port ? GPIO_USB_C1_5V_EN : GPIO_USB_C0_5V_EN; int flags = (vbus_rp[port] == TYPEC_RP_1A5 && vbus_en[port]) ? - (GPIO_INPUT | GPIO_PULL_UP) : (GPIO_OUTPUT | GPIO_PULL_UP); + (GPIO_INPUT | GPIO_PULL_UP) : + (GPIO_OUTPUT | GPIO_PULL_UP); /* * Driving USB_Cx_5V_EN high, actually put a 16.5k resistance
chat: dismiss unread on scroll to bottom
@@ -99,6 +99,7 @@ export class ChatWindow extends Component { scrollIsAtBottom() { if (this.state.numPages !== 1) { this.setState({ numPages: 1 }); + this.dismissUnread(); } }
py/mpconfig.h: Define BITS_PER_BYTE only if not already defined. It's a common macro that is possibly defined in headers of systems/SDKs MicroPython is embedded into.
@@ -1610,7 +1610,9 @@ typedef double mp_float_t; #define BYTES_PER_WORD (sizeof(mp_uint_t)) #endif +#ifndef BITS_PER_BYTE #define BITS_PER_BYTE (8) +#endif #define BITS_PER_WORD (BITS_PER_BYTE * BYTES_PER_WORD) // mp_int_t value with most significant bit set #define WORD_MSBIT_HIGH (((mp_uint_t)1) << (BYTES_PER_WORD * 8 - 1))
Add gpcheckcat to the pipeline. * This adds gpcheckcat to the master pipeline. This test takes about 20 * minutes. Authors: Karen Huddleston and Chris Hajas
@@ -467,6 +467,24 @@ jobs: file: gpdb_src/ci/pulse/api/monitor_pulse.yml params: *pulse_properties + +- name: MU_gpcheckcat + plan: + - aggregate: *pulse_trigger_resource + - task: trigger_pulse + tags: ["gpdb5-pulse-worker"] + file: gpdb_src/ci/pulse/api/trigger_pulse.yml + input_mapping: *input_mappings + params: + <<: *pulse_properties + PULSE_PROJECT_NAME: "GPDB-BehaveGPCheckcat" + - task: monitor_pulse + tags: ["gpdb5-pulse-worker"] + file: gpdb_src/ci/pulse/api/monitor_pulse.yml + params: + <<: *pulse_properties + PULSE_PROJECT_NAME: "GPDB-BehaveGPCheckcat" + - name: cs-uao-regression plan: - aggregate: *pulse_trigger_resource
make test: add option in pg interfaces for duplicating packets
@@ -68,6 +68,8 @@ class VppPGInterface(VppInterface): @property def input_cli(self): """CLI string to load the injected packets""" + if self._nb_replays is not None: + return "%s limit %d" % (self._input_cli, self._nb_replays) return self._input_cli @property @@ -105,9 +107,13 @@ class VppPGInterface(VppInterface): self._input_cli = \ "packet-generator new pcap %s source pg%u name %s" % ( self.in_path, self.pg_index, self.cap_name) + self._nb_replays = None def enable_capture(self): - """ Enable capture on this packet-generator interface""" + """ Enable capture on this packet-generator interface + of at most n packets. + If n < 0, this is no limit + """ try: if os.path.isfile(self.out_path): name = "%s/history.[timestamp:%f].[%s-counter:%04d].%s" % \ @@ -125,13 +131,17 @@ class VppPGInterface(VppInterface): self.test.vapi.cli(self.capture_cli) self._pcap_reader = None - def add_stream(self, pkts): + def disable_capture(self): + self.test.vapi.cli("%s disable" % self.capture_cli) + + def add_stream(self, pkts, nb_replays=None): """ Add a stream of packets to this packet-generator :param pkts: iterable packets """ + self._nb_replays = nb_replays try: if os.path.isfile(self.in_path): name = "%s/history.[timestamp:%f].[%s-counter:%04d].%s" %\
parallel-libs/opencoarrays: rebase patch for v2.8.0
---- a/src/tests/unit/teams/CMakeLists.txt 2019-04-10 16:06:09.000000000 -0500 -+++ b/src/tests/unit/teams/CMakeLists.txt 2019-05-24 17:10:12.000000000 -0500 -@@ -1,3 +1,3 @@ +--- a/src/tests/unit/teams/CMakeLists.txt 2019-10-08 16:54:36.000000000 -0700 ++++ b/src/tests/unit/teams/CMakeLists.txt 2019-10-13 19:55:54.000000000 -0700 +@@ -1,6 +1,6 @@ caf_compile_executable(team_number team-number.f90) caf_compile_executable(teams_subset teams_subset.f90) -caf_compile_executable(get_communicator get-communicator.F90) +#caf_compile_executable(get_communicator get-communicator.F90) + caf_compile_executable(teams_coarray_get teams_coarray_get.f90) + caf_compile_executable(teams_coarray_get_by_ref teams_coarray_get.f90) + caf_compile_executable(teams_coarray_send teams_coarray_send.f90)
tests: internal: ra: add testcase for issue 4917
@@ -616,6 +616,79 @@ void cb_key_order_lookup() flb_free(out_buf); } +void cb_issue_4917() +{ + int len; + int ret; + int type; + char *out_buf; + size_t out_size; + char *json; + char *fmt_out; + size_t off = 0; + flb_sds_t fmt; + flb_sds_t str; + struct flb_record_accessor *ra; + msgpack_unpacked result; + msgpack_object map; + + fmt_out = "from.new.fluent.bit.out"; + + /* Sample JSON message */ + json = "{\"tool\": \"fluent\", \"sub\": {\"s1\": {\"s2\": \"bit\"}}}"; + /* Convert to msgpack */ + len = strlen(json); + ret = flb_pack_json(json, len, &out_buf, &out_size, &type); + TEST_CHECK(ret == 0); + if (ret == -1) { + exit(EXIT_FAILURE); + } + + printf("\n-- record --\n"); + flb_pack_print(out_buf, out_size); + + /* Formatter */ + fmt = flb_sds_create("from.new.$tool.$sub['s1']['s2'].out"); + if (!TEST_CHECK(fmt != NULL)) { + flb_free(out_buf); + exit(EXIT_FAILURE); + } + + /* create ra */ + ra = flb_ra_create(fmt, FLB_FALSE); + TEST_CHECK(ra != NULL); + if (!ra) { + flb_sds_destroy(fmt); + flb_free(out_buf); + exit(EXIT_FAILURE); + } + + /* Unpack msgpack object */ + msgpack_unpacked_init(&result); + msgpack_unpack_next(&result, out_buf, out_size, &off); + map = result.data; + + /* Do translation */ + str = flb_ra_translate(ra, NULL, -1, map, NULL); + TEST_CHECK(str != NULL); + if (!str) { + flb_ra_destroy(ra); + msgpack_unpacked_destroy(&result); + flb_sds_destroy(fmt); + flb_free(out_buf); + exit(EXIT_FAILURE); + } + TEST_CHECK(flb_sds_len(str) == strlen(fmt_out)); + TEST_CHECK(memcmp(str, fmt_out, strlen(fmt_out)) == 0); + printf("== input ==\n%s\n== output ==\n%s\n", str, fmt_out); + + flb_sds_destroy(fmt); + flb_sds_destroy(str); + flb_ra_destroy(ra); + flb_free(out_buf); + msgpack_unpacked_destroy(&result); +} + TEST_LIST = { { "keys" , cb_keys}, { "dash_key" , cb_dash_key}, @@ -626,5 +699,6 @@ TEST_LIST = { { "array_id" , cb_array_id}, { "get_kv_pair" , cb_get_kv_pair}, { "key_order_lookup", cb_key_order_lookup}, + { "issue_4917" , cb_issue_4917}, { NULL } };
Fix regex in SCons
@@ -109,7 +109,8 @@ def get_libtcod_version(): continue with open(os.path.join(LIBTCOD_ROOT_DIR, filename), 'r') as changelog: # Grab the first thing we see after a "===" separator. - return re.search('.*?=+\n([^ :]+)', changelog.read()).groups()[0] + return re.match(r'[^=]+=+(?:\r\n?|\n)([^ :]+)', + changelog.read()).groups()[0] LIBTCOD_ROOT_DIR = '../..'
add WHEEL NUM
#define DRIVE_INFORMATION_PUBLISH_PERIOD 30 //hz #define DRIVE_TEST_PERIOD 30 //hz +#define WHEEL_NUM 2 #define WHEEL_RADIUS 0.033 // meter #define WHEEL_SEPARATION 0.160 // meter (BURGER : 0.160, WAFFLE : 0.287) #define TURNING_RADIUS 0.080 // meter (BURGER : 0.080, WAFFLE : 0.1435)
Bump firmware version to 0x261d0500 Raise nwk buffers from 10 to 20 Backport some routing improvements from Bitcloud 3.3.0
@@ -61,7 +61,7 @@ DEFINES += GIT_COMMMIT=\\\"$$GIT_COMMIT\\\" \ # Minimum version of the RaspBee firmware # which shall be used in order to support all features for this software release (case sensitive) -DEFINES += GW_MIN_RPI_FW_VERSION=0x261c0500 +DEFINES += GW_MIN_RPI_FW_VERSION=0x261d0500 # Minimum version of the deRFusb23E0X firmware # which shall be used in order to support all features for this software release
test: improve error handling in x509_set_serial_check()
@@ -584,13 +584,18 @@ void x509_set_serial_check() sizeof(invalid_serial)), 0); TEST_EQUAL(mbedtls_x509write_crt_set_serial(&ctx, &serial_mpi), MBEDTLS_ERR_X509_BAD_INPUT_DATA); - mbedtls_mpi_free(&serial_mpi); #endif TEST_EQUAL(mbedtls_x509write_crt_set_serial_raw(&ctx, invalid_serial, sizeof(invalid_serial)), MBEDTLS_ERR_X509_BAD_INPUT_DATA); +exit: +#if defined(MBEDTLS_TEST_DEPRECATED) && defined(MBEDTLS_BIGNUM_C) + mbedtls_mpi_free(&serial_mpi); +#else + ; +#endif } /* END_CASE */
wsman-soap-envelope: Check right variable for NULL Wrong variable was checked for NULL: node instead of object.
@@ -1262,7 +1262,7 @@ wsman_get_selector_list_from_filter(WsContextH cntx, WsXmlDocH doc) } object = ws_xml_get_child(assInst, 0, XML_NS_CIM_BINDING, WSMB_OBJECT); - if(!node) { + if(!object) { debug("no SelectorSet defined. Missing Object"); return NULL; }
framework/wifi_manager: sscanf to strncpy for WiFi profile saving Change sscanf to strncpy when the WiFi profile information is saved Change an order of the saved information to read SSID length
pos += (strlen(conv) + DELI_LEN); \ } while (0) -#define DECODE_STRING(buf, data, pos) \ +#define DECODE_STRING(buf, data, pos, len) \ do { \ - sscanf(buf + pos, "%s", data); \ - pos += ((int)(strlen(data)) + DELI_LEN); \ + strncpy(data, buf + pos, len); \ + data[len] = '\0'; \ + pos += ((int)(len) + DELI_LEN); \ } while (0) #define DECODE_INTEGER(buf, data, pos) \ @@ -87,8 +88,8 @@ static int _wifi_profile_serialize(char *buf, uint32_t buf_size, wifi_manager_ap { memset(buf, 0, buf_size); int pos = 0; - ENCODE_STRING(buf, buf_size, config->ssid, pos); ENCODE_INTEGER(buf, buf_size, config->ssid_length, pos); + ENCODE_STRING(buf, buf_size, config->ssid, pos); int auth_type = (int)config->ap_auth_type; ENCODE_INTEGER(buf, buf_size, auth_type, pos); @@ -96,8 +97,8 @@ static int _wifi_profile_serialize(char *buf, uint32_t buf_size, wifi_manager_ap return strlen(buf) + 1; } - ENCODE_STRING(buf, buf_size, config->passphrase, pos); ENCODE_INTEGER(buf, buf_size, config->passphrase_length, pos); + ENCODE_STRING(buf, buf_size, config->passphrase, pos); int crypto_type = (int)config->ap_crypto_type; ENCODE_INTEGER(buf, buf_size, crypto_type, pos); @@ -108,16 +109,19 @@ static int _wifi_profile_serialize(char *buf, uint32_t buf_size, wifi_manager_ap static void _wifi_profile_deserialize(wifi_manager_ap_config_s *config, char *buf) { int pos = 0; - DECODE_STRING(buf, config->ssid, pos); DECODE_INTEGER(buf, config->ssid_length, pos); + DECODE_STRING(buf, config->ssid, pos, config->ssid_length); + int auth_type = 0; DECODE_INTEGER(buf, auth_type, pos); config->ap_auth_type = (wifi_manager_ap_auth_type_e)auth_type; if (config->ap_auth_type == WIFI_MANAGER_AUTH_OPEN) { return; } - DECODE_STRING(buf, config->passphrase, pos); + DECODE_INTEGER(buf, config->passphrase_length, pos); + DECODE_STRING(buf, config->passphrase, pos, config->passphrase_length); + int crypto_type = 0; DECODE_INTEGER(buf, crypto_type, pos); config->ap_crypto_type = (wifi_manager_ap_crypto_type_e)crypto_type;
fix remove wrong timer when it was created inside nmeCheck
@@ -185,11 +185,8 @@ class Timer { if (sRunningTimers!=null) { - var timerCount = sRunningTimers.length; - var origTimerCount = timerCount; - var i = 0; - while(i<timerCount) + while(i<sRunningTimers.length) { var timer = sRunningTimers[i]; if (timer.mRunning) @@ -197,20 +194,16 @@ class Timer if (!timer.mRunning) { - sRunningTimers[i] = sRunningTimers[timerCount-1]; - timerCount--; - } - else - i++; - } - if (timerCount<origTimerCount) - { + sRunningTimers[i] = sRunningTimers[sRunningTimers.length-1]; #if (cpp && haxe4) - cpp.NativeArray.setSize(sRunningTimers, timerCount); + cpp.NativeArray.setSize(sRunningTimers, sRunningTimers.length-1); #else - sRunningTimers.slice(timerCount, origTimerCount-timerCount); + sRunningTimers.splice(sRunningTimers.length-1, 1); #end } + else + i++; + } } }
do not handle case where `PTLS_ERROR_ASYNC_OPERATION` is returned but we have no async capability
@@ -1604,10 +1604,6 @@ static void proceed_handshake_picotls(h2o_socket_t *sock) ptls_buffer_init(&wbuf, "", 0); int ret; -#if PTLS_OPENSSL_HAVE_ASYNC -#else -Retry: -#endif ret = ptls_handshake(sock->ssl->ptls, &wbuf, sock->ssl->input.encrypted->bytes, &consumed, NULL); h2o_buffer_consume(&sock->ssl->input.encrypted, consumed); @@ -1621,7 +1617,8 @@ Retry: #if PTLS_OPENSSL_HAVE_ASYNC do_ssl_async(sock); #else - goto Retry; + h2o_error_printf("PTLS_ERROR_ASYNC_OPERATION returned but cannot be handled"); + abort(); #endif /* fallthrough */ case PTLS_ERROR_IN_PROGRESS: @@ -1791,10 +1788,6 @@ static void proceed_handshake_undetermined(h2o_socket_t *sock) *ptls_get_data_ptr(ptls) = sock; int ret; -#if PTLS_OPENSSL_HAVE_ASYNC -#else -Retry: -#endif ret = ptls_handshake(ptls, &wbuf, sock->ssl->input.encrypted->bytes, &consumed, NULL); if (ret == PTLS_ERROR_IN_PROGRESS && wbuf.off == 0) { @@ -1822,7 +1815,8 @@ Retry: #if PTLS_OPENSSL_HAVE_ASYNC do_ssl_async(sock); #else - goto Retry; + h2o_error_printf("PTLS_ERROR_ASYNC_OPERATION returned but cannot be handled"); + abort(); #endif /* fallthrough */ case PTLS_ERROR_IN_PROGRESS:
ci: move check_submodule_sync to test_deploy stage
tags: - deploy +# Check this before push_to_github +check_submodule_sync: + extends: + - .deploy_job_template + - .rules:test:submodule + stage: test_deploy + tags: + - github_sync + retry: 2 + variables: + GIT_STRATEGY: clone + SUBMODULES_TO_FETCH: "none" + PUBLIC_IDF_URL: "https://github.com/espressif/esp-idf.git" + dependencies: [] + script: + - git submodule deinit --force . + # setting the default remote URL to the public one, to resolve relative location URLs + - git config remote.origin.url ${PUBLIC_IDF_URL} + # check if all submodules are correctly synced to public repository + - git submodule init + - git config --get-regexp '^submodule\..*\.url$' || true + - git submodule update --recursive + - echo "IDF was cloned from ${PUBLIC_IDF_URL} completely" + push_to_github: extends: - .deploy_job_template @@ -51,25 +75,3 @@ deploy_test_result: - echo $BOT_JIRA_ACCOUNT > ${BOT_ACCOUNT_CONFIG_FILE} # update test results - python3 ImportTestResult.py -r "$GIT_SHA (r${REV_COUNT})" -j $JIRA_TEST_MANAGEMENT_PROJECT -s "$SUMMARY" -l CI -p ${CI_PROJECT_DIR}/TEST_LOGS --pipeline_url ${CI_PIPELINE_URL} - -check_submodule_sync: - extends: - - .deploy_job_template - - .rules:test:submodule - tags: - - github_sync - retry: 2 - variables: - GIT_STRATEGY: clone - SUBMODULES_TO_FETCH: "none" - PUBLIC_IDF_URL: "https://github.com/espressif/esp-idf.git" - dependencies: [] - script: - - git submodule deinit --force . - # setting the default remote URL to the public one, to resolve relative location URLs - - git config remote.origin.url ${PUBLIC_IDF_URL} - # check if all submodules are correctly synced to public repository - - git submodule init - - git config --get-regexp '^submodule\..*\.url$' || true - - git submodule update --recursive - - echo "IDF was cloned from ${PUBLIC_IDF_URL} completely"
tests: fix typo in test doc string Type: test
@@ -597,7 +597,7 @@ class IpsecTra4(object): class IpsecTra4Tests(IpsecTra4): """ UT test methods for Transport v4 """ def test_tra_anti_replay(self): - """ ipsec v4 transport anti-reply test """ + """ ipsec v4 transport anti-replay test """ self.verify_tra_anti_replay() def test_tra_basic(self, count=1):
Improve options dialog startup check for autorun
@@ -724,12 +724,40 @@ static BOOLEAN GetCurrentFont( return result; } +typedef struct _PHP_HKURUN_ENTRY +{ + PPH_STRING Value; + //PPH_STRING Name; +} PHP_HKURUN_ENTRY, *PPHP_HKURUN_ENTRY; + +BOOLEAN NTAPI PhpReadCurrentRunCallback( + _In_ HANDLE RootDirectory, + _In_ PKEY_VALUE_FULL_INFORMATION Information, + _In_opt_ PVOID Context + ) +{ + if (Context && Information->Type == REG_SZ) + { + PHP_HKURUN_ENTRY entry; + + if (Information->DataLength > sizeof(UNICODE_NULL)) + entry.Value = PhCreateStringEx(PTR_ADD_OFFSET(Information, Information->DataOffset), Information->DataLength); + else + entry.Value = PhReferenceEmptyString(); + + //entry.Name = PhCreateStringEx(Information->Name, Information->NameLength); + + PhAddItemArray(Context, &entry); + } + + return TRUE; +} + static VOID ReadCurrentUserRun( VOID ) { HANDLE keyHandle; - PPH_STRING value; CurrentUserRunPresent = FALSE; @@ -741,18 +769,26 @@ static VOID ReadCurrentUserRun( 0 ))) { - if (value = PhQueryRegistryString(keyHandle, L"Process Hacker")) + PH_ARRAY keyEntryArray; + + PhInitializeArray(&keyEntryArray, sizeof(PHP_HKURUN_ENTRY), 20); + PhEnumerateValueKey(keyHandle, KeyValueFullInformation, PhpReadCurrentRunCallback, &keyEntryArray); + + for (SIZE_T i = 0; i < keyEntryArray.Count; i++) { + PPHP_HKURUN_ENTRY entry = PhItemArray(&keyEntryArray, i); PH_STRINGREF fileName; PH_STRINGREF arguments; PPH_STRING fullFileName; PPH_STRING applicationFileName; - if (PhParseCommandLineFuzzy(&value->sr, &fileName, &arguments, &fullFileName)) + if (PhParseCommandLineFuzzy(&entry->Value->sr, &fileName, &arguments, &fullFileName)) { if (applicationFileName = PhGetApplicationFileName()) { - if (fullFileName && PhEqualString(fullFileName, applicationFileName, TRUE)) + PhMoveReference(&applicationFileName, PhGetBaseName(applicationFileName)); + + if (fullFileName && PhEndsWithString(fullFileName, applicationFileName, TRUE)) { CurrentUserRunPresent = TRUE; } @@ -763,9 +799,11 @@ static VOID ReadCurrentUserRun( if (fullFileName) PhDereferenceObject(fullFileName); } - PhDereferenceObject(value); + PhDereferenceObject(entry->Value); } + PhDeleteArray(&keyEntryArray); + NtClose(keyHandle); } }
language-server: prettier hover format
?~ p.tab-list ~ ?~ u.p.tab-list ~ :- ~ - %- crip - ;: weld - "`" - ~(ram re ~(duck easy-print detail.i.u.p.tab-list)) - "`" - == + =- (crip :(weld "```hoon\0a" tape "\0a```")) + ^- =tape + %- zing + %+ join "\0a" + %+ scag 20 + (~(win re ~(duck easy-print detail.i.u.p.tab-list)) 2 80) :: ++ sync-buf |= [buf=wall changes=(list change:lsp-sur)]
u3: correctly handle nock %9 with axis 1 in bytecode compilation
@@ -1382,7 +1382,7 @@ _n_comp(u3_noun* ops, u3_noun fol, c3_o los_o, c3_o tel_o) case 9: u3x_cell(arg, &hed, &tel); - if ( 3 == u3qc_cap(hed) ) { + if ( (1 == hed) || (3 == u3qc_cap(hed)) ) { u3_noun mac = u3nq(7, u3k(tel), 2, u3nt(u3nc(0, 1), 0, u3k(hed))); tot_w += _n_comp(ops, mac, los_o, tel_o); u3z(mac);
[ARB] Fixed the IS_SWIZZLE macro
#include "../config.h" // ARBCONV_DBG_RE - resolve* error ArbConverter debug logs +#ifdef DEBUG #define ARBCONV_DBG_RE(...) printf(__VA_ARGS__); - -#define IS_SWIZZLE(str) (((str)[0] >= 'w') && ((str)[0] <= 'z') && \ - (((str)[1] == '\0') || (((str)[1] >= 'w') && ((str)[1] <= 'z') && \ - (((str)[2] == '\0') || (((str)[2] >= 'w') && ((str)[2] <= 'z') && \ - (((str)[3] == '\0') || (((str)[3] >= 'w') && ((str)[3] <= 'z') && \ +#else +#define ARBCONV_DBG_RE(...) +#endif + +#define IS_SWIZ_VALUE(v) ((((v) >= 'w') && ((v) <= 'z')) || \ + ((v) == 'r') || ((v) == 'g') || ((v) == 'b') || ((v) == 'a')) +#define IS_SWIZZLE(str) (IS_SWIZ_VALUE((str)[0]) && \ + (((str)[1] == '\0') || (IS_SWIZ_VALUE((str)[1]) && \ + (((str)[2] == '\0') || (IS_SWIZ_VALUE((str)[2]) && \ + (((str)[3] == '\0') || (IS_SWIZ_VALUE((str)[3]) && \ ((str)[4] == '\0')))))))) #define IS_NEW_STR_OR_SWIZZLE(str, t) (((str)[0] == ',') || ((t == 1) && IS_SWIZZLE(str))) #define IS_NONE_OR_SWIZZLE (!newVar->strLen || IS_SWIZZLE(newVar->strParts[0]))
Freeing allocated memory for firstregion in test_malloc_iodesc().
@@ -1360,6 +1360,8 @@ int test_malloc_iodesc(int iosysid, int my_rank) if (iodesc->ndims != 1) return ERR_WRONG; ioid = pio_add_to_iodesc_list(iodesc); + if (iodesc->firstregion) + free_region_list(iodesc->firstregion); if ((ret = pio_delete_iodesc_from_list(ioid))) return ret; @@ -1371,6 +1373,8 @@ int test_malloc_iodesc(int iosysid, int my_rank) if (iodesc->ndims != 1) return ERR_WRONG; ioid = pio_add_to_iodesc_list(iodesc); + if (iodesc->firstregion) + free_region_list(iodesc->firstregion); if ((ret = pio_delete_iodesc_from_list(ioid))) return ret; @@ -1382,6 +1386,8 @@ int test_malloc_iodesc(int iosysid, int my_rank) if (iodesc->ndims != 1) return ERR_WRONG; ioid = pio_add_to_iodesc_list(iodesc); + if (iodesc->firstregion) + free_region_list(iodesc->firstregion); if ((ret = pio_delete_iodesc_from_list(ioid))) return ret;
filter_throttle: validate memory allocation
@@ -195,12 +195,18 @@ static int cb_throttle_init(struct flb_filter_instance *f_ins, return -1; } - ctx->hash = window_create(ctx->window_size); + ticker_ctx = flb_malloc(sizeof(struct ticker)); + if (!ticker_ctx) { + flb_errno(); + flb_free(ctx); + return -1; + } /* Set our context */ flb_filter_set_context(f_ins, ctx); - ticker_ctx = flb_malloc(sizeof(struct ticker)); + ctx->hash = window_create(ctx->window_size); + ticker_ctx->ctx = ctx; ticker_ctx->done = false; ticker_ctx->seconds = parse_duration(ctx, ctx->slide_interval);
Temp primitive draw functions.
@@ -128,22 +128,38 @@ ChipmunkDemoFreeSpaceChildren(cpSpace *space) cpSpaceEachBody(space, (cpSpaceBodyIteratorFunc)PostBodyFree, space); } -/* static void DrawCircle(cpVect p, cpFloat a, cpFloat r, cpSpaceDebugColor outline, cpSpaceDebugColor fill, cpDataPointer data) {ChipmunkDebugDrawCircle(p, a, r, outline, fill);} static void DrawSegment(cpVect a, cpVect b, cpSpaceDebugColor color, cpDataPointer data) -{ChipmunkDebugDrawSegment(a, b, color);} +// {ChipmunkDebugDrawSegment(a, b, color);} +{ + ChipmunkDebugDrawCircle(cpvlerp(a, b, 0.0), 0, 1, color, color); + ChipmunkDebugDrawCircle(cpvlerp(a, b, 0.2), 0, 1, color, color); + ChipmunkDebugDrawCircle(cpvlerp(a, b, 0.4), 0, 1, color, color); + ChipmunkDebugDrawCircle(cpvlerp(a, b, 0.6), 0, 1, color, color); + ChipmunkDebugDrawCircle(cpvlerp(a, b, 0.8), 0, 1, color, color); + ChipmunkDebugDrawCircle(cpvlerp(a, b, 1.0), 0, 1, color, color); +} static void DrawFatSegment(cpVect a, cpVect b, cpFloat r, cpSpaceDebugColor outline, cpSpaceDebugColor fill, cpDataPointer data) -{ChipmunkDebugDrawFatSegment(a, b, r, outline, fill);} +// {ChipmunkDebugDrawFatSegment(a, b, r, outline, fill);} +{ + ChipmunkDebugDrawCircle(cpvlerp(a, b, 0.0), 0, r, outline, fill); + ChipmunkDebugDrawCircle(cpvlerp(a, b, 0.2), 0, r, outline, fill); + ChipmunkDebugDrawCircle(cpvlerp(a, b, 0.4), 0, r, outline, fill); + ChipmunkDebugDrawCircle(cpvlerp(a, b, 0.6), 0, r, outline, fill); + ChipmunkDebugDrawCircle(cpvlerp(a, b, 0.8), 0, r, outline, fill); + ChipmunkDebugDrawCircle(cpvlerp(a, b, 1.0), 0, r, outline, fill); +} static void DrawPolygon(int count, const cpVect *verts, cpFloat r, cpSpaceDebugColor outline, cpSpaceDebugColor fill, cpDataPointer data) -{ChipmunkDebugDrawPolygon(count, verts, r, outline, fill);} +// {ChipmunkDebugDrawPolygon(count, verts, r, outline, fill);} +{for(int i = 0; i < count; i++) ChipmunkDebugDrawCircle(verts[i], 0, r, outline, fill);} static void DrawDot(cpFloat size, cpVect pos, cpSpaceDebugColor color, cpDataPointer data) @@ -195,11 +211,10 @@ ColorForShape(cpShape *shape, cpDataPointer data) } } } -*/ + void ChipmunkDemoDefaultDrawImpl(cpSpace *space) { - /* cpSpaceDebugDrawOptions drawOptions = { DrawCircle, DrawSegment, @@ -217,7 +232,6 @@ ChipmunkDemoDefaultDrawImpl(cpSpace *space) }; cpSpaceDebugDraw(space, &drawOptions); - */ } static void
win32: adding some extensions to rhosimulator
@@ -2058,9 +2058,17 @@ namespace "config" do else puts "do not checking for encrypt/decrypt because not iOS/Android 1" end - extensions << "zlib" if $current_platform == "win32" # required by coreapi on win32 for gzip support in Network + if $current_platform == "win32" + extensions << "zlib" # required by coreapi on win32 for gzip support in Network + extensions << "openssl.so" if $rhosimulator_build + extensions << "openssl" if $rhosimulator_build + extensions << "digest" if $rhosimulator_build + extensions << "digest-sha2" if $rhosimulator_build + end + extensions += get_extensions extensions << "rhoconnect-client" if $rhosimulator_build + extensions << "json" # filter list of extensions with main extensions list (regardless of case!) @@ -2174,6 +2182,7 @@ namespace "config" do if $current_platform == "uwp" $app_config['extensions'] = $app_config['extensions'] | ['barcode'] end + end if $current_platform == "android"
Fix potential compilation error for example multicast
@@ -71,7 +71,7 @@ tcpip_handler(void) if(uip_newdata()) { count++; PRINTF("In: [0x%08lx], TTL %u, total %u\n", - uip_ntohl((unsigned long) *((uint32_t *)(uip_appdata))), + (unsigned long)uip_ntohl((unsigned long) *((uint32_t *)(uip_appdata))), UIP_IP_BUF->ttl, count); } return;
USE_QRCODE def checks
@@ -65,7 +65,9 @@ AddressBookPage::AddressBookPage(Mode mode, Tabs tab, QWidget *parent) : QAction *copyLabelAction = new QAction(tr("Copy &Label"), this); QAction *copyAddressAction = new QAction(ui->copyToClipboard->text(), this); QAction *editAction = new QAction(tr("&Edit"), this); +#ifdef USE_QRCODE QAction *showQRCodeAction = new QAction(ui->showQRCode->text(), this); +#endif QAction *signMessageAction = new QAction(ui->signMessage->text(), this); QAction *verifyMessageAction = new QAction(ui->verifyMessage->text(), this); deleteAction = new QAction(ui->deleteButton->text(), this); @@ -81,12 +83,15 @@ AddressBookPage::AddressBookPage(Mode mode, Tabs tab, QWidget *parent) : #ifdef USE_QRCODE contextMenu->addAction(showQRCodeAction); #endif + if(tab == ReceivingTab) { contextMenu->addAction(signMessageAction); +#ifdef USE_QRCODE // Show QR Code on double click when in receiving tab if (mode == ForEditing) connect(ui->tableView, SIGNAL(doubleClicked(const QModelIndex&)), this, SLOT(onRowDoubleClicked(const QModelIndex&))); +#endif } else if(tab == SendingTab) contextMenu->addAction(verifyMessageAction); @@ -96,7 +101,9 @@ AddressBookPage::AddressBookPage(Mode mode, Tabs tab, QWidget *parent) : connect(copyLabelAction, SIGNAL(triggered()), this, SLOT(onCopyLabelAction())); connect(editAction, SIGNAL(triggered()), this, SLOT(onEditAction())); connect(deleteAction, SIGNAL(triggered()), this, SLOT(on_deleteButton_clicked())); +#ifdef USE_QRCODE connect(showQRCodeAction, SIGNAL(triggered()), this, SLOT(on_showQRCode_clicked())); +#endif connect(signMessageAction, SIGNAL(triggered()), this, SLOT(on_signMessage_clicked())); connect(verifyMessageAction, SIGNAL(triggered()), this, SLOT(on_verifyMessage_clicked()));
README: Fix small typo, dfeault -> default.
@@ -199,7 +199,7 @@ options (like cross-compiling), the same set of options should be passed to `make deplibs`. To actually enable/disable use of dependencies, edit `ports/unix/mpconfigport.mk` file, which has inline descriptions of the options. For example, to build SSL module (required for `upip` tool described above, -and so enabled by dfeault), `MICROPY_PY_USSL` should be set to 1. +and so enabled by default), `MICROPY_PY_USSL` should be set to 1. For some ports, building required dependences is transparent, and happens automatically. But they still need to be fetched with the `make submodules`
ccl_data initialization
@@ -119,10 +119,12 @@ ccl_cosmology * ccl_cosmology_create(ccl_parameters params, ccl_configuration co cosmo->data.accelerator_achi=NULL; cosmo->data.accelerator_m=NULL; cosmo->data.accelerator_d=NULL; + cosmo->data.accelerator_k=NULL; cosmo->data.growth0 = 1.; cosmo->data.achi=NULL; cosmo->data.logsigma = NULL; + cosmo->data.dlnsigma_dlogm = NULL; // hmf parameter for interpolation cosmo->data.alphahmf = NULL;
Remove improper flag from cibuildwheel
@@ -47,7 +47,7 @@ jobs: - name: Build wheels - Linux if: runner.os != 'Windows' - run: python -m cibuildwheel --use-binfmt + run: python -m cibuildwheel env: CIBW_MANYLINUX_X86_64_IMAGE: libsurvive_manylinux2014_x86_64 CIBW_MANYLINUX_AARCH64_IMAGE: libsurvive_manylinux2014_aarch64
Fix CBMC build flow for ParseDNSReply and ProcessDHCPReplies.
@@ -68,7 +68,7 @@ uint8_t *prvReadNameField(uint8_t *pucByte, char bit; size_t offset; uint8_t *rc = bit ? pucByte + offset : 0; - __CPROVER_assum(offset <= NETWORK_BUFFER_SIZE); + __CPROVER_assume(offset <= NETWORK_BUFFER_SIZE); // Postconditions __CPROVER_assume((rc == 0) || @@ -107,7 +107,7 @@ uint8_t *prvSkipNameField( uint8_t *pucByte, size_t xSourceLen ){ char bit; size_t offset; uint8_t *rc = bit ? pucByte + offset : 0; - __CPROVER_assum(offset <= NETWORK_BUFFER_SIZE); + __CPROVER_assume(offset <= NETWORK_BUFFER_SIZE); // Postconditions __CPROVER_assume((rc == 0) ||
test CHANGE use ECDSA keys instead of deprecated DSA
@@ -202,7 +202,7 @@ ssh_endpt_del_authkey_thread(void *arg) pthread_barrier_wait(&barrier); - ret = nc_server_ssh_del_authkey(TESTS_DIR"/data/key_ecdsa.pub", NULL, 0, "test2"); + ret = nc_server_ssh_del_authkey(TESTS_DIR"/data/key_dsa.pub", NULL, 0, "test2"); nc_assert(!ret); return NULL; @@ -235,7 +235,7 @@ ssh_client_thread(void *arg) ret = nc_client_ssh_set_username("test"); nc_assert(!ret); - ret = nc_client_ssh_add_keypair(TESTS_DIR"/data/key_dsa.pub", TESTS_DIR"/data/key_dsa"); + ret = nc_client_ssh_add_keypair(TESTS_DIR"/data/key_ecdsa.pub", TESTS_DIR"/data/key_ecdsa"); nc_assert(!ret); nc_client_ssh_set_auth_pref(NC_SSH_AUTH_PUBLICKEY, 1); @@ -681,7 +681,7 @@ main(void) nc_assert(!ret); ret = nc_server_endpt_set_port("main_ssh", 6001); nc_assert(!ret); - ret = nc_server_ssh_add_authkey_path(TESTS_DIR"/data/key_dsa.pub", "test"); + ret = nc_server_ssh_add_authkey_path(TESTS_DIR"/data/key_ecdsa.pub", "test"); nc_assert(!ret); ret = nc_server_ssh_endpt_add_hostkey("main_ssh", "key_rsa", -1); nc_assert(!ret); @@ -692,7 +692,7 @@ main(void) ++clients; /* for ssh_endpt_del_authkey */ - ret = nc_server_ssh_add_authkey_path(TESTS_DIR"/data/key_ecdsa.pub", "test2"); + ret = nc_server_ssh_add_authkey_path(TESTS_DIR"/data/key_dsa.pub", "test2"); nc_assert(!ret); ret = nc_server_add_endpt("secondary", NC_TI_LIBSSH);
search for libdevice in multiple locations
@@ -407,21 +407,47 @@ void linkLibDevice(llvm::Module *Module, const char *KernelName, else LibDeviceSM = 30; + const char *BasePath[] = { + "/usr/local/lib/cuda", + "/usr/local/lib", + "/usr/lib", + pocl_get_string_option("POCL_CUDA_TOOLKIT_PATH", CUDA_TOOLKIT_ROOT_DIR), + NULL + }; + + static const char *NVVMPath[] = { + "/nvvm", + "/nvidia-cuda-toolkit", + "", + NULL + }; + // Construct path to libdevice bitcode library. - const char *ToolkitPath = - pocl_get_string_option("POCL_CUDA_TOOLKIT_PATH", CUDA_TOOLKIT_ROOT_DIR); - const char *LibDeviceFormat = "%s/nvvm/libdevice/libdevice.compute_%d.10.bc"; - - size_t PathSize = - snprintf(NULL, 0, LibDeviceFormat, ToolkitPath, LibDeviceSM); - char *LibDevicePath = (char *)malloc(PathSize + 1); - sprintf(LibDevicePath, LibDeviceFormat, ToolkitPath, LibDeviceSM); - POCL_MSG_PRINT_INFO("loading libdevice from '%s'\n", LibDevicePath); - llvm::ErrorOr<std::unique_ptr<llvm::MemoryBuffer>> Buffer = - llvm::MemoryBuffer::getFile(LibDevicePath); - free(LibDevicePath); + static const char *LibDeviceFormat = "%s%s/libdevice/libdevice.compute_%d.10.bc"; +#ifndef PATH_MAX +#define PATH_MAX 4096 +#endif + char LibDevicePath[PATH_MAX]; + + bool found = false; + for (int bp = 0; !found && BasePath[bp]; ++bp) { + for (int np = 0; !found && NVVMPath[np]; ++np) { + size_t ps = snprintf(LibDevicePath, PATH_MAX-1, LibDeviceFormat, + BasePath[bp], NVVMPath[np], LibDeviceSM); + LibDevicePath[ps] = '\0'; + POCL_MSG_PRINT2(__func__, __LINE__ , "looking for libdevice at '%s'\n", LibDevicePath); + found = llvm::sys::fs::exists(LibDevicePath); + } + } + + // if (!found), this will fail. It might also fail due to other errors loading + // the bytecode file, which is fine for us anyway + auto Buffer = llvm::MemoryBuffer::getFile(LibDevicePath); + if (!Buffer) - POCL_ABORT("[CUDA] failed to open libdevice library file\n"); + POCL_ABORT("[CUDA] failed to find libdevice library file\n"); + + POCL_MSG_PRINT_INFO("loading libdevice from '%s'\n", LibDevicePath); // Load libdevice bitcode library. llvm::Expected<std::unique_ptr<llvm::Module>> LibDeviceModule =
minor byt cleanup
=+ n-take=(sub wid.b n) [n-take (end [bloq n-take] dat.b)] -- -++ byt - =/ bl ~(. blop 3) - |% - ++ cat cat:bl:byt - ++ flip flip:bl:byt - ++ take take:bl:byt - ++ drop drop:bl:byt - -- +++ byt ~(. blop 3) :: ++ bit =/ bl ~(. blop 0)
docs - removed limitation of singleton inserts into randomly distributed tables.
@@ -69,15 +69,6 @@ FROM (SELECT count(*) c, gp_segment_id FROM facts GROUP BY 2) AS a;</codeblock> of 0.1 indicates 10% skew, a value of 0.5 indicates 50% skew, and so on. Tables that have more than10% skew should have their distribution policies evaluated.</li> </ul></p> - <section> - <title>Considerations for Randomly Distributed Tables</title> - <p>When you create a table with random distribution (<codeph>DISTRIBUTED RANDOMLY</codeph>), - Greenplum Database distributes the data you insert or copy into the table in a - round-robin fashion. Greenplum Database starts a new instance of a round-robin - cycle for each insert or copy operation. As such, single tuple inserts into a - randomly distributed table are assigned to the first segment and will result - in data skew. Greenplum Database more evenly distributes data from bulk inserts.</p> - </section> <section id="section_unk_dpf_kgb"> <title>Considerations for Replicated Tables</title> <p>When you create a replicated table (with the <codeph>CREATE TABLE</codeph> clause
Change coder test to only export functions
@@ -25,17 +25,20 @@ describe("Titan coder", function() run_coder("", "") end) - it("compiles a program with constant globals", function() + it("Can export functions that return constants", function() run_coder([[ - x1: integer = 42 - x2: float = 10.5 - x3: boolean = true - local x4: integer = 13 + function f(): integer + return 10 + end + + local function g(): integer + return 11 + end ]], [[ - assert.equals(42, test.x1) - assert.equals(10.5, test.x2) - assert.equals(true, test.x3) - assert.equals(nil, test.x4) + assert.is_function(test.f) + assert.equal(10, test.f()) + assert.is_nil(test.g) ]]) end) + end)
eyre: use font-display:swap; in login page
font-family: "Source Code Pro"; src: url("https://storage.googleapis.com/media.urbit.org/fonts/scp-regular.woff"); font-weight: 400; + font-display: swap; } :root { --red05: rgba(255,65,54,0.05);
Tools: repack does not apply to BUFR
/* * C Implementation: bufr_set - * */ #include "grib_tools.h" @@ -104,43 +103,12 @@ int grib_tool_new_file_action(grib_runtime_options* options, grib_tools_file* fi int grib_tool_new_handle_action(grib_runtime_options* options, grib_handle* h) { - int i = 0; int err = 0; if (!options->skip) { - double* v = NULL; - size_t size = 0; - if (options->repack) { - GRIB_CHECK_NOLINE(grib_get_size(h, "values", &size), 0); - - v = (double*)calloc(size, sizeof(double)); - if (!v) { - fprintf(stderr, "failed to allocate %d bytes\n", (int)(size * sizeof(double))); - exit(1); - } - - GRIB_CHECK_NOLINE(grib_get_double_array(h, "values", v, &size), 0); - } - if (options->set_values_count != 0) err = grib_set_values(h, options->set_values, options->set_values_count); - if (options->repack) { - if (grib_options_on("d:")) { - for (i = 0; i < size; i++) - v[i] = options->constant; - } -#if 0 - if (grib_options_on("n:")) { - for(i = 0; i< size; i++) - v[i] = options->constant; - } -#endif - - GRIB_CHECK_NOLINE(grib_set_double_array(h, "values", v, size), 0); - free(v); - } - if (err != GRIB_SUCCESS && options->fail) exit(err); }
doc - update link to PL/Java git repo to 1.5.0
@@ -1026,8 +1026,9 @@ select java_substring(a, 1, 5) from temp;</codeblock> <body> <p>The PL/Java Github wiki page - <xref href="https://github.com/tada/pljava/wiki" format="html" scope="external">https://github.com/tada/pljava/wiki</xref>.</p> - <p> PL/Java 1.4.0 release - <xref href="https://github.com/tada/pljava/tree/B1_4" - format="html" scope="external">https://github.com/tada/pljava/tree/B1_4</xref>.</p> + <p> PL/Java 1.5.0 release - <xref href="https://github.com/tada/pljava/tree/REL1_5_STABLE" + format="html" scope="external" + >https://github.com/tada/pljava/tree/REL1_5_STABLE</xref>.</p> </body> </topic> </topic>
Add Device id, Vendor id checking. Add Error buffer
@@ -98,6 +98,8 @@ struct dnut_data { struct wed *wed; struct dnut_action *action; /* software simulation mode */ + size_t errinfo_size; + void *errinfo; /* Err info Buffer */ }; /* To be used for software simulation, use funcs provided by action */ @@ -114,19 +116,54 @@ static void *hw_dnut_card_alloc_dev(const char *path, uint16_t vendor_id, struct cxl_afu_h *afu_h = NULL; struct wed *wed = NULL; int rc; + long id = 0; dn = calloc(1, sizeof(*dn)); if (NULL == dn) goto __dnut_alloc_err; dn->priv = NULL; - dn->vendor_id = vendor_id; - dn->device_id = device_id; afu_h = cxl_afu_open_dev((char*)path); if (NULL == afu_h) goto __dnut_alloc_err; + dn->device_id = 0; + /* Read and check Device id if it was given by caller */ + if (0 != device_id) { + rc = cxl_get_cr_device(afu_h, 0, &id); + if ((0 != rc) || ((uint16_t)id != device_id)) { + dnut_trace(" %s: ERR 0x%ux Invalid Device ID\n", __func__, (int)id); + goto __dnut_alloc_err; + } + dn->device_id = (uint16_t)id; + } + + dn->vendor_id = 0; + /* Read and check Vendor id if it was given by caller */ + if (0 != vendor_id) { + rc = cxl_get_cr_vendor(afu_h, 0, &id); + if ((0 != rc) || ((uint16_t)id != vendor_id)) { + dnut_trace(" %s: ERR 0x%x Invalid Vendor ID\n", __func__, (int)id); + goto __dnut_alloc_err; + } + dn->vendor_id = (uint16_t)id; + } + + /* Create Err Buffer, If we cannot get it, continue with warning ... */ + dn->errinfo_size = 0; + dn->errinfo = NULL; + rc = cxl_errinfo_size(afu_h, &dn->errinfo_size); + if (0 == rc) { + dn->errinfo = malloc(dn->errinfo_size); + if (NULL == dn->errinfo) { + dnut_trace(" %s: ERR Alloc buffer\n", __func__); + goto __dnut_alloc_err; + } + } else + dnut_trace(" %s: WARN Can not detect Err buffer\n", __func__); + + /* FIXME Why is wed not part of dn and dn not allocated with alignment in that case? Can we have wed to be NULL to save that step? */ @@ -149,6 +186,8 @@ static void *hw_dnut_card_alloc_dev(const char *path, uint16_t vendor_id, return (struct dnut_card *)dn; __dnut_alloc_err: + if (dn->errinfo) + free(dn->errinfo); if (afu_h) cxl_afu_free(afu_h); if (wed) @@ -218,6 +257,8 @@ static void hw_dnut_card_free(void *_card) struct dnut_data *card = (struct dnut_data *)_card; if (card) { + if (card->errinfo) + free(card->errinfo); cxl_afu_free(card->afu_h); free(card->wed); free(card);
decisions: rationale for rejecting key_name
## Problem -Often a Key _ argument is used when you just need a key name. -This is because with a Key _ we know the name is valid and we get an unescaped name. -Using a Key \* here makes the API a bit confusing. +Often a `Key` argument is used when you just need a key name. +This is because with a `Key` we know the name is valid and we get an unescaped name. +Using a `Key` here makes the API a bit confusing. There could be a richer API for manipulating key names without relying on the escaped name (e.g. concatenating two full key names). With the current situation, all these functions would need to be part of the API for a key. Adding such functions to the key API is certainly not minimal. @@ -21,10 +21,12 @@ With the current situation, all these functions would need to be part of the API ## Decision -A minimal `Key` only consists of a key name (value and meta data are null pointers). +Continue keeping 3 classes: `Key`, `KeySet` and `KDB`. ## Rationale +- A minimal `Key` ideally only consists of a key name and the goal is to keep `Key` small, so introducing `KeyName` would go the wrong direction. + ## Implications Thus operations working on key names, directly use `Key` as argument.
Badger2040: Fix bugs in Launcher
import gc import os -import sys import time import math import machine @@ -19,14 +18,14 @@ inverted = False icons = bytearray(launchericons.data()) examples = [ - ("_clock.py", 0), - ("_fonts.py", 1), - ("_ebook.py", 2), - ("_image.py", 3), - ("_list.py", 4), - ("_badge.py", 5), - ("_info.py", 6), - ("_help.py", 7) + ("_clock", 0), + ("_fonts", 1), + ("_ebook", 2), + ("_image", 3), + ("_list", 4), + ("_badge", 5), + ("_info", 6), + ("_help", 7) ] font_sizes = (0.5, 0.7, 0.9) @@ -140,7 +139,7 @@ def render(): for i in range(max_icons): x = centers[i] label, icon = examples[i + (page * 3)] - label = label[1:-3] + label = label[1:] display.pen(0) display.icon(icons, icon, 512, 64, x - 32, 24) w = display.measure_text(label, font_sizes[font_size]) @@ -168,14 +167,14 @@ def render(): def launch(file): for k in locals().keys(): - if k not in ("gc", "file"): + if k not in ("gc", "file", "machine"): del locals()[k] gc.collect() try: __import__(file[1:]) # Try to import _[file] (drop underscore prefix) except ImportError: __import__(file) # Failover to importing [_file] - sys.exit(0) + machine.reset() # Exit back to launcher def launch_example(index):
window_covering expose bri or sat conditionally based on covering type lift/tilt
@@ -526,8 +526,41 @@ void LightNode::setHaEndpoint(const deCONZ::SimpleDescriptor &endpoint) } else if (i->id() == WINDOW_COVERING_CLUSTER_ID /*FIXME ubisys J1*/) { - addItem(DataTypeUInt8, RStateBri); - addItem(DataTypeUInt8, RStateSat); + QList<deCONZ::ZclCluster>::const_iterator ic = haEndpoint().inClusters().constBegin(); + std::vector<deCONZ::ZclAttribute>::const_iterator ia = ic->attributes().begin(); + std::vector<deCONZ::ZclAttribute>::const_iterator enda = ic->attributes().end(); + bool hasLift = true; // set default to lift + bool hasTilt = false; + for (;ia != enda; ++ia) + { + if (ia->id() == 0x0000) // WindowCoveringType + { + /* + * Value Type Capabilities + * 0 Roller Shade = Lift only + * 1 Roller Shade two motors = Lift only + * 2 Roller Shade exterior = Lift only + * 3 Roller Shade two motors ext = Lift only + * 4 Drapery = Lift only + * 5 Awning = Lift only + * 6 Shutter = Tilt only + * 7 Tilt Blind Lift only = Tilt only + * 8 Tilt Blind lift & tilt = Lift & Tilt + * 9 Projector Screen = Lift only + */ + uint8_t coveringType = ia->numericValue().u8; + if (coveringType == 8 ) { + hasTilt = true; + } + else if (coveringType == 6 || coveringType == 7) + { + hasTilt = true; + hasLift = false; + } + } + } + if (hasLift) { addItem(DataTypeUInt8, RStateBri);} + if (hasTilt) { addItem(DataTypeUInt8, RStateSat);} } } }
Tighten the ast.TypeExpr IsNumType methods
@@ -678,11 +678,11 @@ func (n *TypeExpr) IsIdeal() bool { } func (n *TypeExpr) IsNumType() bool { - return n.id0 == 0 && n.id2.IsNumType() + return n.id0 == 0 && n.id1 == t.IDBase && n.id2.IsNumType() } func (n *TypeExpr) IsNumTypeOrIdeal() bool { - return n.id0 == 0 && (n.id2.IsNumType() || n.id2 == t.IDDoubleZ) + return n.id0 == 0 && n.id1 == t.IDBase && (n.id2.IsNumType() || n.id2 == t.IDDoubleZ) } func (n *TypeExpr) IsRefined() bool {
output_thread: fixed multiple initialization of local_thread_instance in emulated TLS
#include <fluent-bit/flb_output_thread.h> #include <fluent-bit/flb_thread_pool.h> +static pthread_once_t local_thread_instance_init = PTHREAD_ONCE_INIT; FLB_TLS_DEFINE(struct flb_out_thread_instance, local_thread_instance); void flb_output_thread_instance_init() @@ -409,7 +410,7 @@ int flb_output_thread_pool_create(struct flb_config *config, * Initialize thread-local-storage, every worker thread has it owns * context with relevant info populated inside the thread. */ - flb_output_thread_instance_init(); + pthread_once(&local_thread_instance_init, flb_output_thread_instance_init); /* Create workers */ for (i = 0; i < ins->tp_workers; i++) {
lgtm REFACTOR use workspace for dependencies
@@ -3,15 +3,16 @@ extraction: prepare: packages: libpcre2-dev after_prepare: + - cd $LGTM_WORKSPACE - git clone -b devel https://github.com/CESNET/libyang.git - cd libyang; mkdir build; cd build - - cmake -DCMAKE_INSTALL_PREFIX=$LGTM_SRC/usr -DENABLE_BUILD_TESTS=OFF .. + - cmake -DCMAKE_INSTALL_PREFIX=$LGTM_WORKSPACE -DENABLE_BUILD_TESTS=OFF .. - make -j2 - make install configure: command: - mkdir build; cd build - - cmake -DCMAKE_INCLUDE_PATH=$LGTM_SRC/usr/include -DCMAKE_LIBRARY_PATH=$LGTM_SRC/usr/lib .. + - cmake -DCMAKE_INCLUDE_PATH=$LGTM_WORKSPACE/include -DCMAKE_LIBRARY_PATH=$LGTM_WORKSPACE/lib .. index: build_command: - cd build
Add type null in node loader.
@@ -396,13 +396,10 @@ value node_loader_impl_napi_to_value(loader_impl_node node_impl, napi_env env, n node_loader_impl_exception(env, status); - if (valuetype == napi_undefined) + if (valuetype == napi_undefined || valuetype == napi_null) { - /* TODO */ - } - else if (valuetype == napi_null) - { - /* TODO */ + /* TODO: Review this, type null will be lost due to mapping of two N-API types into one metacall type */ + ret = value_create_null(); } else if (valuetype == napi_boolean) {
fix nsd-control-setup is not idempotent
@@ -117,10 +117,15 @@ commonName=$SERVERNAME EOF test -f request.cfg || error "could not create request.cfg" +if test -f $SVR_BASE.pem; then + echo "$SVR_BASE.pem exists" +else echo "create $SVR_BASE.pem (self signed certificate)" openssl req -key $SVR_BASE.key -config request.cfg -new -x509 -days $DAYS -out $SVR_BASE.pem || error "could not create $SVR_BASE.pem" + # create trusted usage pem openssl x509 -in $SVR_BASE.pem -addtrust serverAuth -out $SVR_BASE"_trust.pem" +fi # create client request and sign it, piped cat >request.cfg <<EOF @@ -135,8 +140,13 @@ commonName=$CLIENTNAME EOF test -f request.cfg || error "could not create request.cfg" +if test -f $CTL_BASE.pem; then + echo "$CTL_BASE.pem exists" +else echo "create $CTL_BASE.pem (signed client certificate)" openssl req -key $CTL_BASE.key -config request.cfg -new | openssl x509 -req -days $DAYS -CA $SVR_BASE"_trust.pem" -CAkey $SVR_BASE.key -CAcreateserial -$HASH -out $CTL_BASE.pem +fi + test -f $CTL_BASE.pem || error "could not create $CTL_BASE.pem" # create trusted usage pem # openssl x509 -in $CTL_BASE.pem -addtrust clientAuth -out $CTL_BASE"_trust.pem" @@ -156,5 +166,3 @@ rm -f request.cfg rm -f $CTL_BASE"_trust.pem" $SVR_BASE"_trust.pem" $SVR_BASE"_trust.srl" echo "Setup success. Certificates created. Enable in nsd.conf file to use" - -exit 0
in_tail: file: fix comparisson (CID 304408)
@@ -995,7 +995,7 @@ int flb_tail_file_is_rotated(struct flb_tail_config *ctx, ret = lstat(file->name, &st); if (ret == -1) { /* Broken link or missing file */ - if (errno = ENOENT) { + if (errno == ENOENT) { flb_plg_info(ctx->ins, "inode=%lu link_rotated: %s", file->link_inode, file->name); return FLB_TRUE;
[CI] Remove redundant code with YAML templates
@@ -90,12 +90,13 @@ hardware: needs: [] dependencies: [] -apps-llvm: +# Software tests +.apps: &apps-compiler stage: test script: - git apply .gitlab-ci.d/patches/0001-hardware-Set-number-of-cores-to-32-in-simulation.patch - cd apps - - make bin/${APP} + - make COMPILER=${COMPILER} bin/${APP} - cd ../hardware - app=${APP} make run - make trace @@ -103,29 +104,23 @@ apps-llvm: paths: - hardware/build/transcript - hardware/build/trace_hart_*.trace + +apps-llvm: + <<: *apps-compiler variables: GIT_SUBMODULE_STRATEGY: none - needs: ["tc-gcc","tc-llvm","tc-isa-sim"] + COMPILER: "llvm" + needs: ["tc-gcc","tc-isa-sim","tc-llvm"] dependencies: - tc-gcc - - tc-llvm - tc-isa-sim + - tc-llvm apps-gcc: - stage: test - script: - - git apply .gitlab-ci.d/patches/0001-hardware-Set-number-of-cores-to-32-in-simulation.patch - - cd apps - - make COMPILER=gcc bin/${APP} - - cd ../hardware - - app=${APP} make run - - make trace - artifacts: - paths: - - hardware/build/transcript - - hardware/build/trace_hart_*.trace + <<: *apps-compiler variables: GIT_SUBMODULE_STRATEGY: none + COMPILER: "gcc" needs: ["tc-gcc","tc-isa-sim"] dependencies: - tc-gcc
NimBLE/host: Remove duplicate parameter description
@@ -331,10 +331,6 @@ ble_l2cap_get_mtu(struct ble_l2cap_chan *chan) * pointer to the appropriate handler gets * written here. The caller should pass the * receive buffer to this callback. - * @param out_rx_buf If a full L2CAP packet has been received, this - * will point to the entire L2CAP packet. To - * process the packet, pass this buffer to the - * receive handler (out_rx_cb). * @param out_reject_cid Indicates whether an L2CAP Command Reject * command should be sent. If this equals -1, * no reject should get sent. Otherwise, the
funnel: set init p_msg
@@ -158,17 +158,15 @@ static void funnel_msg_set(t_funnel_proxy *x, t_symbol *s, int argc, t_atom * ar static void funnel_proxy_anything(t_funnel_proxy *x, t_symbol *s, int argc, t_atom *argv){ - //new and redone! - Derek Kwan - //first set the message + funnel_msg_set(x, s, argc, argv); - //now output! outlet_list(x->p_out, &s_list, x->p_outsz, x->p_msg); } static void funnel_proxy_set(t_funnel_proxy *x, t_symbol* s, int argc, t_atom* argv) { - //new method - Derek Kwan 2016 + funnel_msg_set(x,s,argc,argv); } @@ -183,7 +181,7 @@ static void funnel_proxy_float(t_funnel_proxy *x, t_float f) static void funnel_proxy_symbol(t_funnel_proxy *x, t_symbol *s) { - //new symbol method - Derek Kwan 2016 + funnel_proxy_anything(x,s, 0, 0); } @@ -199,7 +197,7 @@ static void funnel_symbol(t_funnel *x, t_symbol *s) static void funnel_set(t_funnel *x, t_symbol* s, int argc, t_atom* argv) { - //new method - Derek Kwan 2016 + funnel_proxy_set((t_funnel_proxy *)x->x_proxies[0], s, argc, argv); } @@ -211,7 +209,7 @@ static void funnel_anything(t_funnel *x, t_symbol *s, int ac, t_atom *av) static void funnel_proxy_bang(t_funnel_proxy *x) { - //redone - Derek Kwan 2016 + outlet_list(x->p_out, &s_list, x->p_outsz, x->p_msg); } @@ -265,6 +263,10 @@ static void *funnel_new(t_floatarg f1, t_floatarg f2) int offset = (int)f2; t_outlet *out; t_pd **proxies; + t_atom * p_msg_def = getbytes(sizeof(*p_msg_def)); //default value for p_msg for inlets + + SETFLOAT(p_msg_def, 0); + if (numprox < 1) // can create single inlet funnel, but default to 2 numprox = FUNNEL_MINSLOTS; if (!(proxies = (t_pd **)getbytes(numprox * sizeof(*proxies)))) @@ -293,8 +295,11 @@ static void *funnel_new(t_floatarg f1, t_floatarg f2) y->p_msg = y->p_mstack; //initially point pointer to heaped t_atom //don't make new inlet for proxy[0], make for others y->p_owner = x; + funnel_proxy_set(y,0,1,p_msg_def); //set default p_msg to 0 if (i) inlet_new((t_object *)x, (t_pd *)y, 0, 0); - } + }; + + freebytes(p_msg_def, sizeof(*p_msg_def)); return (x); }
Use ADDRESS_LENGTH
@@ -368,7 +368,7 @@ tokenDefinition_t *getKnownToken(uint8_t *contractAddress) { currentToken = (tokenDefinition_t *) PIC(&TOKENS_THETA[i]); break; } - if (memcmp(currentToken->address, tmpContent.txContent.destination, 20) == 0) { + if (memcmp(currentToken->address, tmpContent.txContent.destination, ADDRESS_LENGTH) == 0) { return currentToken; } } @@ -376,7 +376,7 @@ tokenDefinition_t *getKnownToken(uint8_t *contractAddress) { for (size_t i = 0; i < MAX_TOKEN; i++) { currentToken = &tmpCtx.transactionContext.tokens[i]; if (tmpCtx.transactionContext.tokenSet[i] && - (memcmp(currentToken->address, contractAddress, 20) == 0)) { + (memcmp(currentToken->address, contractAddress, ADDRESS_LENGTH) == 0)) { PRINTF("Token found at index %d\n", i); return currentToken; }
fix(ci): Lint detected changes to drivers dir.
@@ -6,11 +6,15 @@ on: - "app/boards/**/*.c" - "app/include/**/*.h" - "app/src/**" + - "app/drivers/**/*.c" + - "app/drivers/**/*.h" pull_request: paths: - "app/boards/**/*.c" - "app/include/**/*.h" - "app/src/**" + - "app/drivers/**/*.c" + - "app/drivers/**/*.h" jobs: build:
data tree DOC mention lyd_owner_module works with opaque nodes
@@ -765,6 +765,8 @@ struct lyd_node *lyd_child_no_keys(const struct lyd_node *node); * @brief Get the owner module of the data node. It is the module of the top-level schema node. Generally, * in case of augments it is the target module, recursively, otherwise it is the module where the data node is defined. * + * Also works for opaque nodes, if it is possible to resolve the module. + * * @param[in] node Data node to examine. * @return Module owner of the node. */
Fix assertion error when Winograd convolution is used
@@ -253,8 +253,7 @@ LIBXSMM_API_DEFINITION libxsmm_dnn_layer* libxsmm_dnn_create_conv_layer( *status = libxsmm_dnn_internal_create_conv_handle_winograd_check( handle ); if ( *status == LIBXSMM_DNN_WARN_FALLBACK ) handle->algo = LIBXSMM_DNN_CONV_ALGO_DIRECT; } - - if ( handle->algo == LIBXSMM_DNN_CONV_ALGO_DIRECT ) { + else if ( handle->algo == LIBXSMM_DNN_CONV_ALGO_DIRECT ) { *status = libxsmm_dnn_internal_create_conv_handle_direct( handle ); } else { assert(0/*should not happen*/);
Prepare debian changelog for v0.6.1 tag
+bcc (0.6.1-1) unstable; urgency=low + + * Build support for Fedora 28 and Ubuntu 18.04 + * Add option to change license + * Optimizations for some uses of bpf_probe_reads + + -- Brenden Blanco <[email protected]> Mon, 23 Jul 2018 17:00:00 +0000 + bcc (0.6.0-1) unstable; urgency=low * Support for kernel up to 4.17
Get the socket reference right in the newly added syscall for the UNIX/Edge case.
@@ -1358,7 +1358,7 @@ transportSend(transport_t *trans, const char *msg, size_t len) #endif int rc; if (g_ismusl == TRUE) { - rc = g_fn.syscall(SYS_sendto, trans->net.sock, msg, len, flags, NULL, 0); + rc = g_fn.syscall(SYS_sendto, trans->local.sock, msg, len, flags, NULL, 0); } else { rc = g_fn.send(trans->local.sock, msg, len, flags); }
Update windows config-site with conduit v0.7.1
@@ -160,7 +160,7 @@ VISIT_OPTION_DEFAULT(VISIT_HDF5_LIBDEP ## ## CONDUIT ## -VISIT_OPTION_DEFAULT(VISIT_CONDUIT_DIR ${VISITHOME}/conduit/0.4.0) +VISIT_OPTION_DEFAULT(VISIT_CONDUIT_DIR ${VISITHOME}/conduit/0.7.1) VISIT_OPTION_DEFAULT(VISIT_CONDUIT_LIBDEP HDF5_LIBRARY_DIR HDF5_LIB ${VISIT_HDF5_LIBDEP} TYPE STRING)
tests: Rename recv_stream0_data_error to recv_stream0_handshake_error
@@ -181,7 +181,7 @@ static int recv_stream0_data(ngtcp2_conn *conn, const uint8_t *data, return 0; } -static int recv_stream0_data_error(ngtcp2_conn *conn, const uint8_t *data, +static int recv_stream0_handshake_error(ngtcp2_conn *conn, const uint8_t *data, size_t datalen, void *user_data) { (void)conn; (void)data; @@ -1549,7 +1549,7 @@ void test_ngtcp2_conn_handshake_error(void) { /* client side */ setup_handshake_client(&conn); - conn->callbacks.recv_stream0_data = recv_stream0_data_error; + conn->callbacks.recv_stream0_data = recv_stream0_handshake_error; conn->callbacks.send_client_handshake = send_client_handshake_zero; spktlen = ngtcp2_conn_write_pkt(conn, buf, sizeof(buf), ++t); @@ -1609,7 +1609,7 @@ void test_ngtcp2_conn_handshake_error(void) { NGTCP2_PKT_HANDSHAKE, conn->conn_id, ++pkt_num, conn->version, &fr); - conn->callbacks.recv_stream0_data = recv_stream0_data_error; + conn->callbacks.recv_stream0_data = recv_stream0_handshake_error; rv = ngtcp2_conn_recv(conn, buf, pktlen, ++t); CU_ASSERT(0 == rv);
vagrant: remove jn516x toolchain
@@ -62,20 +62,6 @@ tar xjf mspgcc*.tar.bz2 -C /tmp/ sudo cp -f -r /tmp/msp430/* /usr/local/ rm -rf /tmp/msp430 mspgcc*.tar.bz2 -# Install NXP toolchain (partial, with binaries excluded. Download from nxp.com) -wget http://simonduq.github.io/resources/ba-elf-gcc-4.7.4-part1.tar.bz2 -wget http://simonduq.github.io/resources/ba-elf-gcc-4.7.4-part2.tar.bz2 -wget http://simonduq.github.io/resources/jn516x-sdk-4163-1416.tar.bz2 -mkdir -p /tmp/jn516x-sdk /tmp/ba-elf-gcc -tar xjf jn516x-sdk-*.tar.bz2 -C /tmp/jn516x-sdk -tar xjf ba-elf-gcc-*part1.tar.bz2 -C /tmp/ba-elf-gcc -tar xjf ba-elf-gcc-*part2.tar.bz2 -C /tmp/ba-elf-gcc -sudo cp -f -r /tmp/jn516x-sdk /usr/ -sudo cp -f -r /tmp/ba-elf-gcc /usr/ -rm -rf jn516x*.bz2 ba-elf-gcc*.bz2 /tmp/ba-elf-gcc* /tmp/jn516x-sdk* - -echo 'export PATH="/usr/ba-elf-gcc/bin:${PATH}"' >> ${HOME}/.bashrc - ## Install nRF52 SDK wget https://developer.nordicsemi.com/nRF5_IoT_SDK/nRF5_IoT_SDK_v0.9.x/nrf5_iot_sdk_3288530.zip sudo mkdir -p /usr/nrf52-sdk
Add FIXME to the code where we are missing some formatting Removed old comment Removed block context that was not needed
@@ -1557,6 +1557,10 @@ cdbexplain_showExecStats(struct PlanState *planstate, ExplainState *es) Motion *pMotion = (Motion *) planstate->plan; int curSliceId = pMotion->motionID; + /* + * FIXME: Only displayed in text format + * [#159442827] + */ for (int iWorker = 0; iWorker < ctx->slices[curSliceId].nworker; iWorker++) { appendStringInfoSpaces(es->str, es->indent * 2); @@ -1658,6 +1662,7 @@ cdbexplain_showExecStats(struct PlanState *planstate, ExplainState *es) /* * What value of work_mem would suffice to eliminate workfile I/O? + * [#159443489] */ if (es->analyze && es->verbose && ns->workmemwanted.vcnt > 0) { @@ -1690,7 +1695,10 @@ cdbexplain_showExecStats(struct PlanState *planstate, ExplainState *es) || T_DynamicTableScanState == planstate->type || T_DynamicIndexScanState == planstate->type)) { - + /* + * FIXME: Only displayed in TEXT format + * [#159443692] + */ if (es->format == EXPLAIN_FORMAT_TEXT) { double nPartTableScanned_avg = cdbexplain_agg_avg(&ns->totalPartTableScanned); @@ -1785,7 +1793,6 @@ cdbexplain_showExecStats(struct PlanState *planstate, ExplainState *es) } } - { bool haveExtraText = false; StringInfo extraData = makeStringInfo(); for (i = 0; i < ns->ninst; i++) @@ -1817,7 +1824,6 @@ cdbexplain_showExecStats(struct PlanState *planstate, ExplainState *es) ExplainCloseGroup("Segment", NULL, true, es); } pfree(extraData); - } /* * Dump stats for all workers. @@ -1825,6 +1831,10 @@ cdbexplain_showExecStats(struct PlanState *planstate, ExplainState *es) if (gp_enable_explain_allstat && ns->segindex0 >= 0 && ns->ninst > 0) { + /* + * FIXME: Only displyed on TEXT format + * [#159443819] + */ if (es->format == EXPLAIN_FORMAT_TEXT) { /* @@ -1833,14 +1843,7 @@ cdbexplain_showExecStats(struct PlanState *planstate, ExplainState *es) */ appendStringInfoSpaces(es->str, es->indent * 2); appendStringInfoString(es->str, - "allstat: " - - /* - * - * "seg_starttime_firststart_counter_firsttuple_startup_total_ntuples_n - * loops" - */ - "seg_firststart_total_ntuples"); + "allstat: seg_firststart_total_ntuples"); for (i = 0; i < ns->ninst; i++) {
[Numerics] [CSparseMatrix_print_in_Matlab_file] Increase the precision of printing. If not, a risk of wrong computation for extremely small values.
@@ -982,7 +982,7 @@ int CSparseMatrix_print_in_Matlab_file(const CSparseMatrix *A, int brief, FILE* fprintf(file," col %lld : locations %lld to %lld\n", (long long int)j, (long long int)Ap [j], (long long int)Ap [j+1]-1); for(p = Ap [j] ; p < Ap [j+1] ; p++) { - fprintf(file," %lld : %g\n", (long long int)Ai [p], Ax ? Ax [p] : 1) ; + fprintf(file," %lld : %10.50g\n", (long long int)Ai [p], Ax ? Ax [p] : 1) ; if(brief && p > 20) { fprintf(file," ...\n") ; @@ -995,7 +995,7 @@ int CSparseMatrix_print_in_Matlab_file(const CSparseMatrix *A, int brief, FILE* { for(p = 0 ; p < nz ; p++) { - fprintf(file," %lld %lld %g\n", (long long int)Ai [p] + 1, (long long int)Ap [p] + 1, Ax ? Ax [p] : 1) ; + fprintf(file," %lld %lld %10.50g\n", (long long int)Ai [p] + 1, (long long int)Ap [p] + 1, Ax ? Ax [p] : 1) ; if(brief && p > 20) { fprintf(file," ...\n") ;
lyb printer BUGFIX generating hashes for output nodes
@@ -123,15 +123,21 @@ lyb_hash_siblings(struct lysc_node *sibling, struct hash_table **ht_p) const struct lysc_node *parent; const struct lys_module *mod; LYB_HASH i; + uint32_t getnext_opts; ht = lyht_new(1, sizeof(struct lysc_node *), lyb_hash_equal_cb, NULL, 1); LY_CHECK_ERR_RET(!ht, LOGMEM(sibling->module->ctx), LY_EMEM); + getnext_opts = 0; + if (sibling->flags & LYS_CONFIG_R) { + getnext_opts = LYS_GETNEXT_OUTPUT; + } + parent = lysc_data_parent(sibling); mod = sibling->module; sibling = NULL; - while ((sibling = (struct lysc_node *)lys_getnext(sibling, parent, mod->compiled, 0))) { + while ((sibling = (struct lysc_node *)lys_getnext(sibling, parent, mod->compiled, getnext_opts))) { /* find the first non-colliding hash (or specifically non-colliding hash sequence) */ for (i = 0; i < LYB_HASH_BITS; ++i) { /* check that we are not colliding with nodes inserted with a lower collision ID than ours */ @@ -841,8 +847,9 @@ lyb_print_schema_hash(struct ly_out *out, struct lysc_node *schema, struct hash_ /* create whole sibling HT if not already created and saved */ if (!*sibling_ht) { - /* get first schema data sibling (or input/output) */ - first_sibling = (struct lysc_node *)lys_getnext(NULL, lysc_data_parent(schema), schema->module->compiled, 0); + /* get first schema data sibling */ + first_sibling = (struct lysc_node *)lys_getnext(NULL, lysc_data_parent(schema), schema->module->compiled, + (schema->flags & LYS_CONFIG_R) ? LYS_GETNEXT_OUTPUT : 0); LY_ARRAY_FOR(lybctx->sib_hts, u) { if (lybctx->sib_hts[u].first_sibling == first_sibling) { /* we have already created a hash table for these siblings */
Removed colon after preposition in man page.
@@ -19,7 +19,7 @@ GoAccess parses the specified web log file and outputs the data to the X terminal. Features include: .IP "General Statistics:" -This panel gives a summary of several metrics, such as: number of valid and +This panel gives a summary of several metrics, such as the number of valid and invalid requests, time taken to analyze the dataset, unique visitors, requested files, static files (CSS, ICO, JPG, etc) HTTP referrers, 404s, size of the parsed log file and bandwidth consumption.
Don't use yatest.common here
-import yatest.common - import sys import hashlib import math import re - +import subprocess import pytest import tempfile import time @@ -2416,7 +2414,7 @@ def test_overfit_detector_with_resume_from_snapshot_and_metric_period(boosting_t if with_resume_from_snapshot: model.set_params( save_snapshot=True, - snapshot_file=yatest.common.test_output_path( + snapshot_file=test_output_path( 'snapshot_with_metric_period={}_od_type={}'.format( metric_period, overfitting_detector_type ) @@ -2468,16 +2466,16 @@ def test_overfit_detector_with_resume_from_snapshot_and_metric_period(boosting_t models.append(model) - canon_model_output = yatest.common.test_output_path('model.bin') + canon_model_output = test_output_path('model.bin') models[0].save_model(canon_model_output) # overfitting detector stopped learning assert models[0].tree_count_ < FINAL_ITERATIONS for model2 in models[1:]: - model_output = yatest.common.test_output_path('model2.bin') + model_output = test_output_path('model2.bin') model2.save_model(model_output) - yatest.common.execute((model_diff_tool, canon_model_output, model_output)) + subprocess.check_call((model_diff_tool, canon_model_output, model_output)) def test_use_loss_if_no_eval_metric(): @@ -2953,3 +2951,7 @@ def test_deprecated_behavoir(): with pytest.raises(CatboostError): model.is_fitted_ + + +def test_no_yatest_common(): + assert "yatest" not in globals()
ci(cross) use python3 instead of python
@@ -80,4 +80,4 @@ jobs: # Produce a binary artifact and place it in the mounted volume run: | - python tests/main.py --report test + python3 tests/main.py --report test
disable sigpipe for android in server
@@ -593,6 +593,10 @@ bool CHttpServer::init() return false; } +#if defined(OS_ANDROID) + signal(SIGPIPE, SIG_IGN); +#endif + struct sockaddr_in sa; memset(&sa, 0, sizeof(sa)); sa.sin_family = AF_INET;
output: rename coro context
@@ -550,7 +550,6 @@ static inline void flb_output_return(int ret, struct flb_coro *co) { struct flb_output_instance *o_ins; struct flb_out_thread_instance *th_ins; - out_coro = (struct flb_output_coro *) co->data; o_ins = out_coro->o_ins; task = out_coro->task; @@ -616,15 +615,15 @@ static inline int flb_output_coros_size(struct flb_output_instance *ins) static inline void flb_output_return_do(int x) { - struct flb_coro *co; + struct flb_coro *coro; - co = (struct flb_coro *) pthread_getspecific(flb_coro_key); - flb_output_return(x, co); + coro = flb_coro_get(); + flb_output_return(x, coro); /* * Each co-routine handler have different ways to handle a return, * just use the wrapper. */ - flb_coro_yield(co, FLB_TRUE); + flb_coro_yield(coro, FLB_TRUE); } #define FLB_OUTPUT_RETURN(x) \
CLEANUP: remove useless sm_retry resetting.
@@ -1844,7 +1844,6 @@ static void *sm_state_thread(void *arg) "Failed to scrub stale data.\n"); } sm_info.node_added_time = 0; - sm_retry = false; } else { sm_retry = true; }
fix actionmanager
@@ -21,12 +21,6 @@ namespace FFXIVClientStructs.FFXIV.Client.Game { [MemberFunction("E8 ?? ?? ?? ?? 8B F8 3B DF")] public partial uint GetAdjustedActionId(uint actionID); - [MemberFunction("E8 ?? ?? ?? ?? 8B D6 41 8B CF")] - public partial float GetAdjustedRecastTime(ActionType actionType, uint actionID, byte a3 = 1); - - [MemberFunction("E8 ?? ?? ?? ?? 33 D2 49 8B CE 66 44 0F 6E C0")] - public partial float GetAdjustedCastTime(ActionType actionType, uint actionID, byte a3 = 1, byte a4 = 0); - [MemberFunction("E8 ?? ?? ?? ?? 0F 2F C7 0F 28 7C 24")] public partial float GetRecastTime(ActionType actionType, uint actionID); @@ -42,6 +36,9 @@ namespace FFXIVClientStructs.FFXIV.Client.Game { [MemberFunction("E8 ?? ?? ?? ?? 0F 57 FF 48 85 C0")] public partial RecastDetail* GetRecastGroupDetail(int recastGroup); + [MemberFunction("E8 ?? ?? ?? ?? 85 C0 75 75 83 FF 03")] + public partial uint CheckActionResources(ActionType actionType, uint actionId, void* actionData = null); + [MemberFunction("E8 ?? ?? ?? ?? F3 0F 11 43 ?? 80 3B 00", IsStatic = true)] public static partial float GetActionRange(uint actionId); @@ -51,8 +48,11 @@ namespace FFXIVClientStructs.FFXIV.Client.Game { [MemberFunction("E8 ?? ?? ?? ?? 48 8B 5C 24 ?? 48 83 C4 30 5F C3 33 D2", IsStatic = true)] public static partial int GetActionCost(ActionType actionType, uint actionId, byte a3, byte a4, byte a5, byte a6); - [MemberFunction("E8 ?? ?? ?? ?? 85 C0 75 75 83 FF 03")] - public partial uint CheckActionResources(ActionType actionType, uint actionId, void* actionData = null); + [MemberFunction("E8 ?? ?? ?? ?? 8B D6 41 8B CF", IsStatic = true)] + public static partial float GetAdjustedRecastTime(ActionType actionType, uint actionID, byte a3 = 1); + + [MemberFunction("E8 ?? ?? ?? ?? 33 D2 49 8B CE 66 44 0F 6E C0", IsStatic = true)] + public static partial float GetAdjustedCastTime(ActionType actionType, uint actionID, byte a3 = 1, byte* a4 = null); [MemberFunction("E8 ?? ?? ?? ?? 33 DB 8B C8", IsStatic = true)] public static partial ushort GetMaxCharges(uint actionId, uint level); // 0 for current level
Add missing buffer bounds check
@@ -1409,6 +1409,7 @@ void dotnet_parse_tilde( continue; #define ROW_CHECK(name) \ + if (fits_in_pe(pe, row_offset, (matched_bits + 1) * sizeof(uint32_t))) \ rows.name = *(row_offset + matched_bits); #define ROW_CHECK_WITH_INDEX(name) \
common BUGFIX set correct permissions when umask is set
@@ -4420,8 +4420,8 @@ sr_open(const char *path, int flags, mode_t mode) return -1; } - /* check permissions only if file was not created and group if there is any to set */ - if ((flags & O_CREAT) && (!(flags & O_EXCL) || strlen(SR_GROUP))) { + /* check permissions if the file could have been created */ + if (flags & O_CREAT) { /* stat the file */ if (fstat(fd, &st)) { close(fd);
Delete superfluous "// --------" comment
// See the License for the specific language governing permissions and // limitations under the License. -// -------- - pub struct decoder? implements base.image_decoder( width : base.u32, height : base.u32,
input processing order fix
@@ -1122,8 +1122,6 @@ void tic_sys_poll() processTouchInput(); #endif - processGamepad(); - SCOPE(processKeyboard()) { #if defined(__LINUX__) @@ -1131,6 +1129,8 @@ void tic_sys_poll() return; #endif } + + processGamepad(); } bool tic_sys_keyboard_text(char* text)
one more try, getting close
@@ -43,7 +43,7 @@ jobs: awsCredentials: 'azure-pipeline-aws' regionName: 'us-west-2' bucketName: 'cdn.cribl.io' - sourceFolder: 'out/' + sourceFolder: 'lib/' globExpressions: '**' targetFolder: 'dl/scope/latest/' filesAcl: 'public-read'
Build system: Make missing DejaVuSans.ttf non-fatal DejaVuSans.ttf is only needed for test programs, not for actually using cups-filters. Therefore we make its absence non-fatal.
@@ -815,7 +815,7 @@ AC_ARG_WITH([test-font-path], ) AS_IF([test "x$cross_compiling" != "xyes" && ! test -f "$with_test_font_path"], - [AC_MSG_ERROR(DejaVuSans.ttf font file is missing. Please install a package providing it.)] + [AC_MSG_WARN(DejaVuSans.ttf font file is missing. Please install a package providing it.) && [with_test_font_path=no]] ) AC_DEFINE_UNQUOTED([TESTFONT], ["$with_test_font_path"], [Path to font used in tests])
[bsp][stm32]fix bug with dma setting
@@ -334,8 +334,8 @@ static const struct rt_uart_ops stm32_uart_ops = struct stm32_uart uart1 = { USART1, -#ifdef RT_SERIAL_USING_DMA USART1_IRQn, +#ifdef RT_SERIAL_USING_DMA { DMA2_Stream5, DMA_Channel_4, @@ -377,8 +377,8 @@ void DMA2_Stream5_IRQHandler(void) { struct stm32_uart uart2 = { USART2, -#ifdef RT_SERIAL_USING_DMA USART2_IRQn, +#ifdef RT_SERIAL_USING_DMA { DMA1_Stream5, DMA_Channel_4, @@ -421,8 +421,8 @@ void DMA1_Stream5_IRQHandler(void) { struct stm32_uart uart3 = { USART3, -#ifdef RT_SERIAL_USING_DMA USART3_IRQn, +#ifdef RT_SERIAL_USING_DMA { DMA1_Stream1, DMA_Channel_4, @@ -465,8 +465,8 @@ void DMA1_Stream1_IRQHandler(void) { struct stm32_uart uart4 = { UART4, -#ifdef RT_SERIAL_USING_DMA UART4_IRQn, +#ifdef RT_SERIAL_USING_DMA { DMA1_Stream2, DMA_Channel_4, @@ -509,8 +509,8 @@ void DMA1_Stream2_IRQHandler(void) { struct stm32_uart uart5 = { UART5, -#ifdef RT_SERIAL_USING_DMA UART5_IRQn, +#ifdef RT_SERIAL_USING_DMA { DMA1_Stream0, DMA_Channel_4,
tests: internal: utils: set default http/https port
@@ -18,8 +18,10 @@ struct url_check { struct url_check url_checks[] = { {0, "https://fluentbit.io/something", - "https", "fluentbit.io", NULL, "/something"}, - {0, "https://fluentbit.io", "https", "fluentbit.io", NULL, "/"}, + "https", "fluentbit.io", "443", "/something"}, + {0, "http://fluentbit.io/something", + "http", "fluentbit.io", "80", "/something"}, + {0, "https://fluentbit.io", "https", "fluentbit.io", "443", "/"}, {0, "https://fluentbit.io:1234/something", "https", "fluentbit.io", "1234", "/something"}, {0, "https://fluentbit.io:1234", "https", "fluentbit.io", "1234", "/"},
Don't query some Windows types for lxss processes
* process tree list * * Copyright (C) 2010-2016 wj32 - * Copyright (C) 2016-2017 dmex + * Copyright (C) 2016-2019 dmex * * This file is part of Process Hacker. * @@ -930,15 +930,25 @@ static VOID PhpUpdateProcessNodeWindow( { if (!(ProcessNode->ValidMask & PHPN_WINDOW)) { - ProcessNode->WindowHandle = PhGetProcessMainWindow(ProcessNode->ProcessId, ProcessNode->ProcessItem->QueryHandle); - PhClearReference(&ProcessNode->WindowText); + if (ProcessNode->ProcessItem->IsSubsystemProcess) + { + NOTHING; + } + else + { + ProcessNode->WindowHandle = PhGetProcessMainWindow( + ProcessNode->ProcessId, + ProcessNode->ProcessItem->QueryHandle + ); + if (ProcessNode->WindowHandle) { PhGetWindowTextEx(ProcessNode->WindowHandle, PH_GET_WINDOW_TEXT_INTERNAL, &ProcessNode->WindowText); ProcessNode->WindowHung = !!IsHungAppWindow(ProcessNode->WindowHandle); } + } ProcessNode->ValidMask |= PHPN_WINDOW; } @@ -1027,7 +1037,11 @@ static VOID PhpUpdateProcessOsContext( { HANDLE processHandle; - if (NT_SUCCESS(PhOpenProcess(&processHandle, PROCESS_QUERY_LIMITED_INFORMATION | PROCESS_VM_READ, ProcessNode->ProcessId))) + if (ProcessNode->ProcessItem->IsSubsystemProcess) + { + NOTHING; + } + else if (NT_SUCCESS(PhOpenProcess(&processHandle, PROCESS_QUERY_LIMITED_INFORMATION | PROCESS_VM_READ, ProcessNode->ProcessId))) { if (NT_SUCCESS(PhGetProcessSwitchContext(processHandle, &ProcessNode->OsContextGuid))) { @@ -1147,7 +1161,11 @@ static VOID PhpUpdateProcessNodeAppId( PhClearReference(&ProcessNode->AppIdText); - if (PhAppResolverGetAppIdForProcess(ProcessNode->ProcessItem->ProcessId, &applicationUserModelId)) + if (ProcessNode->ProcessItem->IsSubsystemProcess) + { + NOTHING; + } + else if (PhAppResolverGetAppIdForProcess(ProcessNode->ProcessItem->ProcessId, &applicationUserModelId)) { ProcessNode->AppIdText = applicationUserModelId; }
driver/battery/bq27541.c: Format with clang-format BRANCH=none TEST=none
@@ -273,10 +273,9 @@ enum battery_present battery_is_present(void) void battery_get_params(struct batt_params *batt) { int v; - const uint32_t flags_to_check = BATT_FLAG_BAD_TEMPERATURE | - BATT_FLAG_BAD_STATE_OF_CHARGE | - BATT_FLAG_BAD_VOLTAGE | - BATT_FLAG_BAD_CURRENT; + const uint32_t flags_to_check = + BATT_FLAG_BAD_TEMPERATURE | BATT_FLAG_BAD_STATE_OF_CHARGE | + BATT_FLAG_BAD_VOLTAGE | BATT_FLAG_BAD_CURRENT; /* Reset flags */ batt->flags = 0; @@ -287,8 +286,8 @@ void battery_get_params(struct batt_params *batt) if (bq27541_read8(REG_STATE_OF_CHARGE, &v) && fake_state_of_charge < 0) batt->flags |= BATT_FLAG_BAD_STATE_OF_CHARGE; - batt->state_of_charge = fake_state_of_charge >= 0 ? - fake_state_of_charge : v; + batt->state_of_charge = + fake_state_of_charge >= 0 ? fake_state_of_charge : v; if (bq27541_read(REG_VOLTAGE, &batt->voltage)) batt->flags |= BATT_FLAG_BAD_VOLTAGE; @@ -312,7 +311,6 @@ void battery_get_params(struct batt_params *batt) batt->flags |= BATT_FLAG_RESPONSIVE; batt->is_present = BP_YES; } else { - /* If all of those reads error, the battery is not present */ batt->is_present = BP_NO; } @@ -405,8 +403,7 @@ static int command_battfake(int argc, char **argv) } if (fake_state_of_charge >= 0) - ccprintf("Fake batt %d%%\n", - fake_state_of_charge); + ccprintf("Fake batt %d%%\n", fake_state_of_charge); return EC_SUCCESS; }
Test rejection of unbound prefix, improve coverage of attribute handling
@@ -3376,6 +3376,25 @@ START_TEST(test_ns_prefix_with_empty_uri_4) } END_TEST +/* Test with non-xmlns prefix */ +START_TEST(test_ns_unbound_prefix) +{ + const char *text = + "<!DOCTYPE doc [\n" + " <!ELEMENT prefix:doc EMPTY>\n" + " <!ATTLIST prefix:doc\n" + " notxmlns:prefix CDATA 'http://example.com/'>\n" + "]>\n" + "<prefix:doc/>"; + + if (_XML_Parse_SINGLE_BYTES(parser, text, strlen(text), + XML_TRUE) != XML_STATUS_ERROR) + fail("Unbound prefix incorrectly passed"); + if (XML_GetErrorCode(parser) != XML_ERROR_UNBOUND_PREFIX) + xml_failure(parser); +} +END_TEST + START_TEST(test_ns_default_with_empty_uri) { const char *text = @@ -4595,6 +4614,7 @@ make_suite(void) tcase_add_test(tc_namespace, test_ns_prefix_with_empty_uri_2); tcase_add_test(tc_namespace, test_ns_prefix_with_empty_uri_3); tcase_add_test(tc_namespace, test_ns_prefix_with_empty_uri_4); + tcase_add_test(tc_namespace, test_ns_unbound_prefix); tcase_add_test(tc_namespace, test_ns_default_with_empty_uri); tcase_add_test(tc_namespace, test_ns_duplicate_attrs_diff_prefixes); tcase_add_test(tc_namespace, test_ns_unbound_prefix_on_attribute);