message
stringlengths 6
474
| diff
stringlengths 8
5.22k
|
---|---|
Fix non-thread-safe methods | #if defined(_android_)
#include <util/system/dynlib.h>
+#include <util/system/guard.h>
+#include <util/system/mutex.h>
#include <android/log.h>
#endif
@@ -189,17 +191,22 @@ namespace {
private:
virtual void DoWrite(const void* buf, size_t len) override {
+ with_lock (BufferMutex) {
Buffer.Write(buf, len);
}
+ }
virtual void DoFlush() override {
+ with_lock (BufferMutex) {
LogFuncPtr(ANDROID_LOG_DEBUG, GetTag(), Buffer.Data());
Buffer.Clear();
}
+ }
virtual const char* GetTag() const = 0;
private:
+ TMutex BufferMutex;
TStringStream Buffer;
TLogFuncPtr LogFuncPtr;
};
|
Updated change log with latest v1.6.3 changes. | +Changes to GoAccess 1.6.3 - Thursday, August 31, 2022
+
+ - Enabled DNS thread when resolving a host and outputting real-time HTML.
+ This helps avoid stalling the WS server on busy connections.
+ - Fixed issue where it would not properly parse an XFF if the '%h' specifier
+ was already set.
+ - Fixed possible XSS issues when using '--html-custom-css' and
+ '--html-custom-js' by allowing valid filenames.
+
Changes to GoAccess 1.6.2 - Thursday, July 14, 2022
- Added `Android 12` to the list of OSs.
|
components/button: set dimensions after updating label | @@ -87,7 +87,6 @@ static const component_functions_t _component_functions = {
};
/********************************** Create Instance **********************************/
-
static component_t* _button_create(
const char* text,
const slider_location_t location,
@@ -100,10 +99,8 @@ static component_t* _button_create(
Abort("Error: malloc button data");
}
memset(data, 0, sizeof(button_data_t));
- data->text = text;
data->location = location;
data->upside_down = upside_down;
- data->callback = callback;
data->span_over_slider = false;
component_t* button = malloc(sizeof(component_t));
@@ -115,13 +112,7 @@ static component_t* _button_create(
button->parent = parent;
button->f = &_component_functions;
- UG_FontSelect(&font_font_a_9X9);
- UG_FontSetHSpace(0);
- UG_MeasureString(&(button->dimension.width), &(button->dimension.height), text);
- if (button->dimension.width < MIN_BUTTON_WIDTH) {
- button->dimension.width = MIN_BUTTON_WIDTH;
- }
- UG_FontSetHSpace(1);
+ button_update(button, text, callback);
return button;
}
@@ -214,4 +205,11 @@ void button_update(component_t* button, const char* text, void (*callback)(compo
button_data_t* data = (button_data_t*)button->data;
data->callback = callback;
data->text = text;
+ UG_FontSelect(&font_font_a_9X9);
+ UG_FontSetHSpace(0);
+ UG_MeasureString(&(button->dimension.width), &(button->dimension.height), text);
+ if (button->dimension.width < MIN_BUTTON_WIDTH) {
+ button->dimension.width = MIN_BUTTON_WIDTH;
+ }
+ UG_FontSetHSpace(1);
}
|
[core] __attribute__((format ...)) | #endif
#endif
+#ifndef __attribute_fallthrough__
#if __has_attribute(fallthrough) \
|| __GNUC_PREREQ(7,0)
#define __attribute_fallthrough__ __attribute__((__fallthrough__));
#else
-#define __attribute_fallthrough__
+#define __attribute_fallthrough__ /* fall through */
+#endif
+#endif
+
+#ifndef __attribute_format__
+#if __has_attribute(format) \
+ || __GNUC_PREREQ(2,95) /*(maybe earlier gcc, too)*/
+#define __attribute_format__(x) __attribute__((__format__ x))
+#else
+#define __attribute_format__(x)
+#endif
#endif
|
Correct Discord URL and add Discord badge | +[](https://discord.gg/gCyBu8T)
+
+

-----
@@ -81,7 +84,7 @@ The above firmware builds include support for the class libraries and features m
For documentation, providing feedback, issues and finding out how to contribute please refer to the [Home repo](https://github.com/nanoframework/Home).
-Join our Discord community [here](https://discord.gg/XYpqcYW).
+Join our Discord community [here](https://discord.gg/gCyBu8T).
## Credits
|
neon/rndn: Add scalar function implementation | @@ -33,6 +33,20 @@ HEDLEY_DIAGNOSTIC_PUSH
SIMDE_DISABLE_UNWANTED_DIAGNOSTICS
SIMDE_BEGIN_DECLS_
+SIMDE_FUNCTION_ATTRIBUTES
+simde_float32_t
+simde_vrndns_f32(simde_float32_t a) {
+ #if defined(SIMDE_ARM_NEON_A32V8_NATIVE) && (!defined(__clang__) || SIMDE_DETECT_CLANG_VERSION_CHECK(7,0,0))
+ return vrndns_f32(a);
+ #else
+ return simde_math_roundevenf(a);
+ #endif
+}
+#if defined(SIMDE_ARM_NEON_A64V8_ENABLE_NATIVE_ALIASES)
+ #undef vrndns_f32
+ #define vrndns_f32(a) simde_vrndns_f32(a)
+#endif
+
SIMDE_FUNCTION_ATTRIBUTES
simde_float32x2_t
simde_vrndn_f32(simde_float32x2_t a) {
@@ -45,7 +59,7 @@ simde_vrndn_f32(simde_float32x2_t a) {
SIMDE_VECTORIZE
for (size_t i = 0 ; i < (sizeof(r_.values) / sizeof(r_.values[0])) ; i++) {
- r_.values[i] = simde_math_roundevenf(a_.values[i]);
+ r_.values[i] = simde_vrndns_f32(a_.values[i]);
}
return simde_float32x2_from_private(r_);
@@ -94,7 +108,7 @@ simde_vrndnq_f32(simde_float32x4_t a) {
#else
SIMDE_VECTORIZE
for (size_t i = 0 ; i < (sizeof(r_.values) / sizeof(r_.values[0])) ; i++) {
- r_.values[i] = simde_math_roundevenf(a_.values[i]);
+ r_.values[i] = simde_vrndns_f32(a_.values[i]);
}
#endif
|
Increment number messages for Python Tests table | @@ -44,7 +44,7 @@ def test_table_count():
Test number of available messages to deserialize.
"""
- number_of_messages = 186
+ number_of_messages = 187
assert len(_SBP_TABLE) == number_of_messages
def test_table_unqiue_count():
|
dummy_afu: add explicit reset after run
After a dummy_afu test runs, call handle_->reset again. | @@ -209,6 +209,7 @@ public:
logger_->error(ex.what());
res = exit_codes::exception;
}
+ handle_->reset();
auto pass = res == exit_codes::success ? "PASS" : "FAIL";
logger_->info("Test {}({}): {}", test->name(), count, pass);
spdlog::drop_all();
|
Output an error message when shmat() fails
Observed in with SELinux as the likely culprit. Without the message, the user saw a segfault with no apparent reason | @@ -78,6 +78,8 @@ USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#include <sys/sysinfo.h>
#include <sys/syscall.h>
+#include <sys/types.h>
+#include <errno.h>
#include <sys/shm.h>
#include <fcntl.h>
#include <sched.h>
@@ -659,8 +661,9 @@ static void open_shmem(void) {
exit(1);
}
- if (shmid != -1) common = (shm_t *)shmat(shmid, NULL, 0);
-
+ if (shmid != -1) {
+ if ( (common = shmat(shmid, NULL, 0)) == (void*)-1) perror ("Attaching shared memory segment");
+ }
#ifdef DEBUG
fprintf(stderr, "Shared Memory id = %x Address = %p\n", shmid, common);
#endif
|
Fixed typo in atmesc.c. | @@ -164,7 +164,7 @@ Read the Jeans time, the time at which the flow transitions from hydrodynamic to
@param system A pointer to the SYSTEM instance
@param iFile The current file number
*/
-void (BODY *body,CONTROL *control,FILES *files,OPTIONS *options,SYSTEM *system,int iFile) {
+void ReadJeansTime(BODY *body,CONTROL *control,FILES *files,OPTIONS *options,SYSTEM *system,int iFile) {
/* This parameter cannot exist in primary file */
int lTmp=-1;
double dTmp;
|
hv: seed: fix potential NULL pointer dereferencing
The 'boot_params' and 'entry' might be dereferenced after they were
positively checked for NULL. Refine checking logic to fix the issue.
Acked-by: Zhu Bing | @@ -62,21 +62,21 @@ bool parse_seed_sbl(uint64_t addr, struct physical_seed *phy_seed)
{
uint8_t i;
uint8_t dseed_index = 0U;
- struct image_boot_params *boot_params;
+ struct image_boot_params *boot_params = NULL;
struct seed_list_hob *seed_hob = NULL;
- struct seed_entry *entry;
- struct seed_info *seed_list;
+ struct seed_entry *entry = NULL;
+ struct seed_info *seed_list = NULL;
bool status = false;
stac();
boot_params = (struct image_boot_params *)hpa2hva(addr);
- if ((boot_params != NULL) || (phy_seed != NULL)) {
+ if (boot_params != NULL) {
seed_hob = (struct seed_list_hob *)hpa2hva(boot_params->p_seed_list);
}
- if (seed_hob != NULL) {
+ if ((seed_hob != NULL) && (phy_seed != NULL)) {
status = true;
seed_list = phy_seed->seed_list;
@@ -106,10 +106,10 @@ bool parse_seed_sbl(uint64_t addr, struct physical_seed *phy_seed)
/* erase original seed in seed entry */
(void)memset((void *)&entry->seed[0U], 0U, sizeof(struct seed_info));
}
- }
entry = (struct seed_entry *)((uint8_t *)entry + entry->seed_entry_size);
}
+ }
if (status) {
phy_seed->num_seeds = dseed_index;
|
fpgaotsu: add entry_point for fpgaotsu | @@ -34,7 +34,8 @@ setup(
'fpgasupdate = opae.admin.tools.fpgasupdate:main',
'rsu = opae.admin.tools.rsu:main',
'super-rsu = opae.admin.tools.super_rsu:main',
- 'fpgaflash = opae.admin.tools.fpgaflash:main'
+ 'fpgaflash = opae.admin.tools.fpgaflash:main',
+ 'fpgaotsu = opae.admin.tools.fpgaotsu:main'
]
},
install_requires=[],
|
tools/memleak: fix print_outstanding_combined func, exception has occurred: TypeError in python | @@ -538,7 +538,7 @@ def print_outstanding_combined():
show_module=True,
show_offset=True)
trace.append(sym)
- trace = "\n\t\t".join(trace)
+ trace = "\n\t\t".join(trace.decode())
except KeyError:
trace = "stack information lost"
|
Remove conn_write_server_handshake | @@ -2144,25 +2144,6 @@ static ngtcp2_ssize conn_write_handshake_pkts(ngtcp2_conn *conn, uint8_t *dest,
return res;
}
-static ngtcp2_ssize conn_write_server_handshake(ngtcp2_conn *conn,
- uint8_t *dest, size_t destlen,
- ngtcp2_tstamp ts) {
- ngtcp2_ssize nwrite;
- ngtcp2_ssize res = 0;
-
- nwrite = conn_write_handshake_pkts(conn, dest, destlen, 0, ts);
- if (nwrite < 0) {
- assert(nwrite != NGTCP2_ERR_NOBUF);
- return nwrite;
- }
-
- res += nwrite;
- dest += nwrite;
- destlen -= (size_t)nwrite;
-
- return res;
-}
-
/*
* conn_initial_stream_rx_offset returns the initial maximum offset of
* data for a stream denoted by |stream_id|.
@@ -7646,7 +7627,8 @@ static ngtcp2_ssize conn_write_handshake(ngtcp2_conn *conn, uint8_t *dest,
return res;
case NGTCP2_CS_SERVER_INITIAL:
- nwrite = conn_write_server_handshake(conn, dest, destlen, ts);
+ nwrite = conn_write_handshake_pkts(conn, dest, destlen,
+ /* early_datalen = */ 0, ts);
if (nwrite < 0) {
return nwrite;
}
@@ -7671,7 +7653,8 @@ static ngtcp2_ssize conn_write_handshake(ngtcp2_conn *conn, uint8_t *dest,
}
if (conn_handshake_probe_left(conn) || !conn_cwnd_is_zero(conn)) {
- nwrite = conn_write_server_handshake(conn, dest, destlen, ts);
+ nwrite = conn_write_handshake_pkts(conn, dest, destlen,
+ /* early_datalen = */ 0, ts);
if (nwrite < 0) {
return nwrite;
}
|
Mandelbrot benchmark: make N into a parameter
Make the size of the benchmark be configurable at the command-line, as we do
with the other benchmarks | local Complex = require(arg[1])
+local N = tonumber(arg[2]) or 256
local function level(x, y)
local c = Complex.new(x, y)
@@ -15,13 +16,11 @@ local xmin = -2.0
local xmax = 2.0
local ymin = -2.0
local ymax = 2.0
-local N = 256
local dx = (xmax - xmin) / N
local dy = (ymax - ymin) / N
print("P2")
---print("# mandelbrot set", xmin, xmax, ymin, ymax, N)
print(N, N, 255)
for i = 1, N do
|
hal/ia32/_init.S: removed assembler warnings | @@ -309,7 +309,7 @@ _init_core_prot:
/* Switch to virtual addresses */
lea _init_virt, %eax
- jmp %eax
+ jmp *%eax
_init_virt:
/* Reload relocated GDT and IDT */
@@ -337,7 +337,7 @@ _init_core_wait:
movl $0x7c00, %esp
addl $VADDR_KERNEL, %esp
lea _cpu_initCore, %eax
- call %eax
+ call *%eax
/* Signal spinlock */
xorl %eax, %eax
|
chip/ish/ish_persistent_data.c: Format with clang-format
BRANCH=none
TEST=none | @@ -40,8 +40,7 @@ void ish_persistent_data_init(void)
{
if (ish_persistent_data_aon.magic == PERSISTENT_DATA_MAGIC) {
/* Stored data is valid, load a copy */
- memcpy(&ish_persistent_data,
- &ish_persistent_data_aon,
+ memcpy(&ish_persistent_data, &ish_persistent_data_aon,
sizeof(struct ish_persistent_data));
/* Invalidate stored data, in case commit fails to happen */
@@ -54,7 +53,6 @@ void ish_persistent_data_init(void)
void ish_persistent_data_commit(void)
{
- memcpy(&ish_persistent_data_aon,
- &ish_persistent_data,
+ memcpy(&ish_persistent_data_aon, &ish_persistent_data,
sizeof(struct ish_persistent_data));
}
|
config_tools: fix delete vm failed issue
fix delete vm failed issue | @@ -257,7 +257,7 @@ export default {
msg = "Post-launched VMs require the Service VM. If you proceed, all post-launched VMs and their settings will also be deleted. Are you sure you want to proceed?"
isserivevm = true
} else {
- let vmName = this.scenario.vm[this.activeVMID].name
+ let vmName = vmConfigcurrent.name
msg = `Delete this virtual machine? ${vmName}\n\nThe associated launch script will also be deleted if it exists.`
}
confirm(msg).then((r) => {
|
replace deprecated call: isl_basic_set_fast_is_empty -> isl_basic_set_plain_is_empty | @@ -748,7 +748,7 @@ PlutoConstraints **get_stmt_ortho_constraints(Stmt *stmt, const PlutoProg *prog,
if (!options->flic) {
orthcst_i = isl_basic_set_intersect(orthcst_i,
isl_basic_set_copy(isl_currcst));
- if (isl_basic_set_fast_is_empty(orthcst_i)
+ if (isl_basic_set_plain_is_empty(orthcst_i)
|| isl_basic_set_is_empty(orthcst_i)) {
pluto_constraints_negate_row(orthcst[p], 0);
}
|
Process Short packet if it has 1RTT key without buffering
It is better to process data if client has 1RTT key without buffering
them. This is primarily for response against 0RTT request, but it
also handles the .5RTT CRYPTO data which might include
NewSessionTicket. | @@ -4080,6 +4080,10 @@ static ssize_t conn_recv_pkt(ngtcp2_conn *conn, const ngtcp2_path *path,
const uint8_t *pkt, size_t pktlen,
ngtcp2_tstamp ts);
+static int conn_process_buffered_protected_pkt(ngtcp2_conn *conn,
+ ngtcp2_pktns *pktns,
+ ngtcp2_tstamp ts);
+
/*
* conn_recv_handshake_pkt processes received packet |pkt| whose
* length is |pktlen| during handshake period. The buffer pointed by
@@ -4146,11 +4150,17 @@ static ssize_t conn_recv_handshake_pkt(ngtcp2_conn *conn,
return (ssize_t)pktlen;
}
+ if (!conn->server && conn->pktns.crypto.rx.ckm) {
+ rv = conn_process_buffered_protected_pkt(conn, &conn->pktns, ts);
+ if (rv != 0) {
+ return rv;
+ }
+ return conn_recv_pkt(conn, &conn->dcid.current.ps.path, pkt, pktlen, ts);
+ }
+
ngtcp2_log_info(&conn->log, NGTCP2_LOG_EVENT_CON,
"buffering Short packet len=%zu", pktlen);
- /* TODO It would be nicer not to buffer Short packet if we have
- 1RTT key. */
rv = conn_buffer_pkt(conn, &conn->hs_pktns, path, pkt, pktlen, ts);
if (rv != 0) {
assert(ngtcp2_err_is_fatal(rv));
|
board/genesis/board.c: Format with clang-format
BRANCH=none
TEST=none | @@ -112,8 +112,7 @@ static void port_ocp_interrupt(enum gpio_signal signal)
/******************************************************************************/
/* SPI devices */
-const struct spi_device_t spi_devices[] = {
-};
+const struct spi_device_t spi_devices[] = {};
const unsigned int spi_devices_used = ARRAY_SIZE(spi_devices);
/******************************************************************************/
@@ -133,48 +132,36 @@ const struct pwm_t pwm_channels[] = {
/******************************************************************************/
/* I2C port map configuration */
const struct i2c_port_t i2c_ports[] = {
- {
- .name = "ina",
+ { .name = "ina",
.port = I2C_PORT_INA,
.kbps = 400,
.scl = GPIO_I2C0_SCL,
- .sda = GPIO_I2C0_SDA
- },
- {
- .name = "ppc0",
+ .sda = GPIO_I2C0_SDA },
+ { .name = "ppc0",
.port = I2C_PORT_PPC0,
.kbps = 400,
.scl = GPIO_I2C1_SCL,
- .sda = GPIO_I2C1_SDA
- },
- {
- .name = "tcpc0",
+ .sda = GPIO_I2C1_SDA },
+ { .name = "tcpc0",
.port = I2C_PORT_TCPC0,
.kbps = 400,
.scl = GPIO_I2C3_SCL,
- .sda = GPIO_I2C3_SDA
- },
- {
- .name = "pse",
+ .sda = GPIO_I2C3_SDA },
+ { .name = "pse",
.port = I2C_PORT_PSE,
.kbps = 400,
.scl = GPIO_I2C4_SCL,
- .sda = GPIO_I2C4_SDA
- },
- {
- .name = "power",
+ .sda = GPIO_I2C4_SDA },
+ { .name = "power",
.port = I2C_PORT_POWER,
.kbps = 400,
.scl = GPIO_I2C5_SCL,
- .sda = GPIO_I2C5_SDA
- },
- {
- .name = "eeprom",
+ .sda = GPIO_I2C5_SDA },
+ { .name = "eeprom",
.port = I2C_PORT_EEPROM,
.kbps = 400,
.scl = GPIO_I2C7_SCL,
- .sda = GPIO_I2C7_SDA
- },
+ .sda = GPIO_I2C7_SDA },
};
const unsigned int i2c_ports_used = ARRAY_SIZE(i2c_ports);
@@ -230,8 +217,7 @@ BUILD_ASSERT(ARRAY_SIZE(temp_sensors) == TEMP_SENSOR_COUNT);
/******************************************************************************/
/* Wake up pins */
-const enum gpio_signal hibernate_wake_pins[] = {
-};
+const enum gpio_signal hibernate_wake_pins[] = {};
const int hibernate_wake_pins_used = ARRAY_SIZE(hibernate_wake_pins);
/******************************************************************************/
@@ -449,8 +435,7 @@ static void power_monitor(void)
* If CPU is off or suspended, no need to throttle
* or restrict power.
*/
- if (chipset_in_state(CHIPSET_STATE_ANY_OFF |
- CHIPSET_STATE_SUSPEND)) {
+ if (chipset_in_state(CHIPSET_STATE_ANY_OFF | CHIPSET_STATE_SUSPEND)) {
/*
* Slow down monitoring, assume no throttling required.
*/
|
DES_set_key(): return values as DES_set_key_checked() but always set
This avoids using accidentally uninitialized key schedule in
applications that use DES_set_key() not expecting it to check the key
which is the default on OpenSSL <= 1.1.1
Fixes | @@ -279,9 +279,17 @@ static const DES_LONG des_skb[8][64] = {
}
};
+/* Return values as DES_set_key_checked() but always set the key */
int DES_set_key(const_DES_cblock *key, DES_key_schedule *schedule)
{
- return DES_set_key_checked(key, schedule);
+ int ret = 0;
+
+ if (!DES_check_key_parity(key))
+ ret = -1;
+ if (DES_is_weak_key(key))
+ ret = -2;
+ DES_set_key_unchecked(key, schedule);
+ return ret;
}
/*-
|
update release info
Note: mandatory check (NEED_CHECK) was skipped | - R language: `get_features_importance` with `ShapValues` for `MultiClass`, #868
- NormalizedGini was not calculated, #962
- Bug in leaf calculation which could result in slightly worse quality if you use weights in binary classification mode
+- Fixed `__builtins__` import in Python3 in PR #957, thanks to @AbhinavanT
# Release 0.16.4
|
Fixes for large messages | @@ -35,7 +35,7 @@ uint16_t data_count = 0;
uint16_t data_size = 0;
uint16_t crc_val = 0;
static uint64_t ll_rx_timestamp = 0;
-uint8_t large_data_num = 0;
+uint16_t large_data_num = 0;
/*******************************************************************************
* Function
@@ -629,6 +629,7 @@ static inline uint16_t Recep_CtxIndexFromID(uint16_t id)
******************************************************************************/
void Recep_ComputeMsgNumber(void)
{
+ LUOS_ASSERT(current_msg->header.size > MAX_DATA_MSG_SIZE);
// check if it is the first msg of large data received
if (large_data_num == 0)
{
|
the CMAKE for comgr no longer hardcodes /opt/rocm so we do not need that part of the patch | -diff --git a/lib/comgr/CMakeLists.txt b/lib/comgr/CMakeLists.txt
-index 412bd2e..32f1734 100644
---- a/lib/comgr/CMakeLists.txt
-+++ b/lib/comgr/CMakeLists.txt
-@@ -17,7 +17,10 @@ if (ROCM_CCACHE_BUILD)
- endif() # if (CCACHE_PROGRAM)
- endif() # if (ROCM_CCACHE_BUILD)
-
-+if(NOT AMD_COMGR_BUILD_NO_ROCM)
- find_package(ROCM PATHS "/opt/rocm")
-+endif()
-+
- if (ROCM_FOUND)
- include(ROCMSetupVersion)
- rocm_setup_version(VERSION "${amd_comgr_VERSION}")
diff --git a/lib/comgr/cmake/DeviceLibs.cmake b/lib/comgr/cmake/DeviceLibs.cmake
index 27e9546..29cc2b9 100644
--- a/lib/comgr/cmake/DeviceLibs.cmake
|
fix(config): add LV_GPU_SDL_LRU_SIZE | @@ -265,6 +265,12 @@ menu "LVGL configuration"
string "include path of SDL header"
depends on LV_USE_GPU_SDL
default "SDL2/SDL.h"
+ config LV_GPU_SDL_LRU_SIZE
+ int "Maximum buffer size to allocate for rotation"
+ depends on LV_USE_GPU_SDL
+ default 8388608
+ help
+ Texture cache size, 8MB by default.
endmenu
menu "Logging"
|
bugfix: make ahb freq consistent with cpu freq | @@ -149,6 +149,7 @@ static void rtc_clk_bbpll_configure(rtc_xtal_freq_t xtal_freq, int pll_freq)
*/
static void rtc_clk_cpu_freq_to_xtal(int freq, int div)
{
+ clk_ll_ahb_set_ls_divider(div);
clk_ll_cpu_set_ls_divider(div);
clk_ll_cpu_set_src(SOC_CPU_CLK_SRC_XTAL);
ets_update_cpu_frequency(freq);
@@ -156,6 +157,7 @@ static void rtc_clk_cpu_freq_to_xtal(int freq, int div)
static void rtc_clk_cpu_freq_to_8m(void)
{
+ clk_ll_ahb_set_ls_divider(1);
clk_ll_cpu_set_ls_divider(1);
clk_ll_cpu_set_src(SOC_CPU_CLK_SRC_RC_FAST);
ets_update_cpu_frequency(20);
|
Resolve conflicts from (missing header file) | @@ -34,14 +34,17 @@ typedef enum {
// provided, or values are invalid
WK_WALLET_CONNECTOR_STATUS_INVALID_TRANSACTION_ARGUMENTS,
- // A general error to describe the digest creation has failed
+ // The digest creation has failed or the digest is of an expected length
WK_WALLET_CONNECTOR_STATUS_INVALID_DIGEST,
- // A general error indicating the signature has failed
+ // Signature creation has failed or the signature is an invalid length
WK_WALLET_CONNECTOR_STATUS_INVALID_SIGNATURE,
// A general error specifying a failure to produce serialization
- WK_WALLET_CONNECTOR_STATUS_INVALID_SERIALIZATION
+ WK_WALLET_CONNECTOR_STATUS_INVALID_SERIALIZATION,
+
+ // The public key cannot be recovered from the digest + signature
+ WK_WALLET_CONNECTOR_STATUS_KEY_RECOVERY_FAILED
// ...
@@ -120,6 +123,26 @@ wkWalletConnectorSignData (
size_t *signatureLength,
WKWalletConnectorStatus *status );
+/** Returns the public key from the provide digest and signature.
+ *
+ * @param connector The wallet connector object.
+ * @param digest The digest
+ * @param digestLength The number of bytes of digest
+ * @param signature The signature
+ * @param signatureLength The number of bytes of signature
+ * @param status A status of the operation
+ * @return When successful, the recovered public key. Otherwise an error is set in status
+ * and the returned key is NULL.
+ */
+extern WKKey
+wkWalletConnectorRecoverKey (
+ WKWalletConnector connector,
+ const uint8_t *digest,
+ size_t digestLength,
+ const uint8_t *signature,
+ size_t signatureLength,
+ WKWalletConnectorStatus *status );
+
/** Uses the wallet connector provided to organize the key-value pairs
* into a suitable serialized transaction.
*
|
CHANGELOG: add antiklepto to 9.4.0 and finalize 9.4.0 | # Changelog
-## 9.4.0 [version may change, pending release]
+## [Unreleased]
+-
+
+## 9.4.0 [released 2021-01-20]
- ETHPubRequest api call now fails if a an invalid contract address is provided also if `display` is
false.
- Fix a memory leak (freeing a malloc'd string - no a functional or security issue)
- Verifiable seed generation: when restoring from 24 recovery words, for the 24th word, show all 8 candidate words which result in a valid checksum.
- Better error reporting on secure chip setup failures.
- Fix a rare touch issue resulting from failed calibration.
+- Protection against the nonce covert channel attack when singing Bitcoin/Litecoin transactions (antiklepto protocol).
## 9.3.1 [tagged 2020-12-01]
- Fix a bug where the device could freeze and become unresponsive.
|
cirrus: bump Fedora to 34 | -FROM fedora:33
+FROM fedora:34
RUN dnf upgrade --refresh -y && dnf install -y \
augeas-devel \
@@ -60,7 +60,7 @@ RUN mkdir -p ${GTEST_ROOT} \
&& rm gtest.tar.gz
# download and install gradle
-RUN cd /tmp && wget https://services.gradle.org/distributions/gradle-6.8.3-bin.zip && unzip gradle-6.8.3-bin.zip && rm gradle-6.8.3-bin.zip && mv gradle-6.8.3 /opt/gradle
+RUN cd /tmp && wget https://services.gradle.org/distributions/gradle-7.0-bin.zip && unzip gradle-7.0-bin.zip && rm gradle-7.0-bin.zip && mv gradle-7.0 /opt/gradle
ENV PATH "${PATH}:/opt/gradle/bin"
ENV JAVA_HOME=/etc/alternatives/jre
RUN alternatives --auto java && alternatives --auto javac
|
Adjust PicoSynth volume when setting it in the Galactic Unicorn API | @@ -517,6 +517,7 @@ namespace pimoroni {
value = value < 0.0f ? 0.0f : value;
value = value > 1.0f ? 1.0f : value;
this->volume = floor(value * 255.0f);
+ this->synth.volume = this->volume * 255.0f;
}
float GalacticUnicorn::get_volume() {
|
envydis/gm107: Make xmad's immediate 16 bits
20 bits doesn't make much sense: it would overlap with other atoms.
Seems it's 16 bits without a sign flag. | @@ -2123,7 +2123,7 @@ static struct insn tabroot[] = {
{ 0x3660000000000000ull, 0xfef0000000000000ull, OP8B, T(pred), N( "isetp"), T(5b60_0), T(5c30_0), ON(43, x), T(5bb0_1), PRED03, PRED00, REG_08, S20_20, T(pred39) },
{ 0x3650000000000000ull, 0xfef0000000000000ull, OP8B, T(pred), N( "iset"), ON(44, bf), T(5b60_0), T(5c30_0), ON(43, x), T(5bb0_1), ON(47, cc), REG_00, REG_08, S20_20, T(pred39) },
{ 0x3640000000000000ull, 0xfef0000000000000ull, OP8B, T(pred), N( "icmp"), T(5b60_0), T(5c30_0), REG_00, REG_08, S20_20, REG_39 },
- { 0x3600000000000000ull, 0xfec0000000000000ull, OP8B, T(pred), N( "xmad"), T(5b00_0), ON(36, psl), ON(37, mrg), T(5b00_1), ON(38, x), ON(47, cc), REG_00, ON(53, h1), REG_08, S20_20, REG_39 },
+ { 0x3600000000000000ull, 0xfec0000000000000ull, OP8B, T(pred), N( "xmad"), T(5b00_0), ON(36, psl), ON(37, mrg), T(5b00_1), ON(38, x), ON(47, cc), REG_00, ON(53, h1), REG_08, U16_20, REG_39 },
{ 0x3480000000000000ull, 0xfe80000000000000ull, OP8B, T(pred), N( "imadsp"), T(5a80_0), T(5a80_1), T(5a80_2), ON(47, cc), REG_00, REG_08, S20_20, REG_39 },
{ 0x3400000000000000ull, 0xfe80000000000000ull, OP8B, T(pred), N( "imad"), T(5a00_0), T(5a00_1), ON(54, hi), ON(50, sat), ON(49, x), ON(47, c), REG_00, REG_08, S20_20, REG_39 },
{ 0x3280000000000000ull, 0xfe80000000000000ull, OP8B, T(pred), N( "ffma"), T(5980_0), T(5980_1), ON(50, sat), ON(47, cc), REG_00, REG_08, ON(48, neg), F20_20, ON(49, neg), REG_39 },
|
the hipamd required cmake version is satified by build_supp.sh which builds a specific cmake version as a supplemental component. Be sure not to set AOMP_CMAKE in .bashrc | diff --git a/CMakeLists.txt b/CMakeLists.txt
-index b1ab39e7..2c54f6d1 100755
+index 3ce1fc10..c5b03fd1 100755
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
-@@ -17,7 +17,7 @@
- # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
- # THE SOFTWARE.
-
--cmake_minimum_required(VERSION 3.16.8)
-+cmake_minimum_required(VERSION 3.13.4)
- project(hip)
-
- # sample command for hip-rocclr runtime, you'll need to have rocclr built
-@@ -329,10 +329,6 @@ if(NOT ${INSTALL_SOURCE} EQUAL 0)
+@@ -353,10 +353,6 @@ if(NOT ${INSTALL_SOURCE} EQUAL 0)
PATTERN *.bat EXCLUDE)
endif()
|
[numerics] disable hdf5 logger if not available | * limitations under the License.
*/
+#include "SiconosConfig.h"
+
#include "Newton_methods.h"
#include <stdio.h>
@@ -209,7 +211,12 @@ void newton_LSA(unsigned n, double *z, double *F, int *info, void* data, SolverO
functions->compute_error(data, z, F, JacThetaF_merit, tol, &err);
- unsigned log_hdf5 = SN_LOGLEVEL_ALL;
+#ifdef WITH_HDF5
+// unsigned log_hdf5 = SN_LOGLEVEL_ALL;
+ unsigned log_hdf5 = SN_LOGLEVEL_NO;
+#else
+ unsigned log_hdf5 = SN_LOGLEVEL_NO;
+#endif
char* hdf5_filename = getenv("SICONOS_HDF5_NAME");
if (!hdf5_filename) hdf5_filename = "test.hdf5";
|
acme: comment clarification re: ports | ~| [%no-next-domain idx=idx]
(head (skim pending |=([turf idx=@ud ?] =(idx ^idx))))
:: XX should confirm that :turf points to us
- :: confirms that domain exists
+ :: confirms that domain exists (and an urbit is on the standard port)
::
=/ sec=? p:.^(hart:eyre %e /(scot %p our.bow)/host/(scot %da now.bow))
=/ =purl
|
reclaims memory on kernel resets, and every 1k events | @@ -362,7 +362,7 @@ _serf_sure(u3_noun ovo, u3_noun vir, u3_noun cor)
u3_noun sac = u3_nul;
- // intercept |mass
+ // intercept |mass, observe |reset
//
{
u3_noun riv = vir;
@@ -389,6 +389,12 @@ _serf_sure(u3_noun ovo, u3_noun vir, u3_noun cor)
break;
}
+ // reclaim memory from persistent caches on |reset
+ //
+ if ( c3__vega == u3h(fec) ) {
+ u3m_reclaim();
+ }
+
riv = u3t(riv);
i_w++;
}
@@ -484,6 +490,12 @@ _serf_poke_live(c3_d evt_d, // event number
u3z(gon); u3z(job);
_serf_sure(ovo, vir, cor);
+
+ // reclaim memory from persistent caches on |reset
+ //
+ if ( 0 == (u3A->ent_d % 1000ULL) ) {
+ u3m_reclaim();
+ }
}
}
|
OcAppleEventLib: Reduce pointer poll frequency for compatibility
At least QEMU cannot poll faster than 10 ms. | @@ -38,12 +38,16 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
#include <Library/BaseLib.h>
-// POINTER_POLL_FREQUENCY
-#define POINTER_POLL_FREQUENCY EFI_TIMER_PERIOD_MILLISECONDS (2)
+//
+// CHANGE: Apple polls with a frequency of 2 ms, however this is infeasible on
+// most machines. Poll with 10 ms, which matches the keyboard behaviour,
+// and also is the minimum for QEMU.
+//
+#define POINTER_POLL_FREQUENCY EFI_TIMER_PERIOD_MILLISECONDS (10)
#define MAX_POINTER_POLL_FREQUENCY EFI_TIMER_PERIOD_MILLISECONDS (80)
-STATIC UINT16 mMaximumDoubleClickSpeed = 374;
-STATIC UINT16 mMaximumClickDuration = 74;
+STATIC UINT16 mMaximumDoubleClickSpeed = 38; // 374 for 2 ms
+STATIC UINT16 mMaximumClickDuration = 8; // 74 for 2 ms
// MINIMAL_MOVEMENT
#define MINIMAL_MOVEMENT 5
|
in_tail: fs: inotify: fix 'file' might be unreferenced (CID 304400) | @@ -213,13 +213,6 @@ static int tail_fs_event(struct flb_input_instance *ins,
* read(2) operation, that might kill performance. Just let's
* wait a second and do a good job.
*/
- if (file->offset < st.st_size) {
- file->pending_bytes = (st.st_size - file->offset);
- //tail_signal_pending(ctx);
- }
- else {
- file->pending_bytes = 0;
- }
tail_signal_pending(ctx);
}
else {
|
Remove unused variable. Thanks | @@ -339,14 +339,14 @@ static int test_bf_ecb(int n)
static int test_bf_set_key(int n)
{
- int i, ret = 1;
+ int ret = 1;
BF_KEY key;
unsigned char out[8];
BF_set_key(&key, n+1, key_test);
BF_ecb_encrypt(key_data, out, &key, BF_ENCRYPT);
/* mips-sgi-irix6.5-gcc vv -mabi=64 bug workaround */
- if (!TEST_mem_eq(out, 8, &(key_out[i = n][0]), 8))
+ if (!TEST_mem_eq(out, 8, &(key_out[n][0]), 8))
ret = 0;
return ret;
|
kernel/os: Add helper macros to compare os_timeval | @@ -110,6 +110,19 @@ void os_time_delay(os_time_t osticks);
#define OS_TIME_TICK_GT(__t1, __t2) ((os_stime_t) ((__t1) - (__t2)) > 0)
#define OS_TIME_TICK_GEQ(__t1, __t2) ((os_stime_t) ((__t1) - (__t2)) >= 0)
+#define OS_TIMEVAL_LT(__t1, __t2) \
+ (((__t1).tv_sec < (__t2).tv_sec) || \
+ (((__t1).tv_sec == (__t2).tv_sec) && ((__t1).tv_usec < (__t2).tv_usec)))
+#define OS_TIMEVAL_LEQ(__t1, __t2) \
+ (((__t1).tv_sec < (__t2).tv_sec) || \
+ (((__t1).tv_sec == (__t2).tv_sec) && ((__t1).tv_usec <= (__t2).tv_usec)))
+#define OS_TIMEVAL_GT(__t1, __t2) \
+ (((__t1).tv_sec > (__t2).tv_sec) || \
+ (((__t1).tv_sec == (__t2).tv_sec) && ((__t1).tv_usec > (__t2).tv_usec)))
+#define OS_TIMEVAL_GEQ(__t1, __t2) \
+ (((__t1).tv_sec > (__t2).tv_sec) || \
+ (((__t1).tv_sec == (__t2).tv_sec) && ((__t1).tv_usec >= (__t2).tv_usec)))
+
/**
* Structure representing time since Jan 1 1970 with microsecond
* granularity
|
Try small tweak to nat rebinding stress. | @@ -5530,10 +5530,10 @@ int rebinding_stress_test()
uint64_t server_arrival = test_ctx->c_to_s_link->last_packet->arrival_time;
if (server_arrival > last_inject_time) {
- /* 10% chance of packet injection, 5% chances of reusing test address */
+ /* 9% chance of packet injection, 5% chances of reusing test address */
uint64_t rand100 = picoquic_test_uniform_random(&random_context, 100);
last_inject_time = server_arrival;
- if (rand100 < 10) {
+ if (rand100 < 9) {
struct sockaddr * bad_address;
if (rand100 < 5) {
bad_address = (struct sockaddr *)&hack_address;
|
bufr_new_from_file crash | @@ -54,15 +54,17 @@ typedef struct reader {
static int read_the_rest(reader* r,size_t message_length,unsigned char* tmp, int already_read, int check7777)
{
- int err = 0;
+ int err = GRIB_SUCCESS;
size_t buffer_size;
size_t rest;
unsigned char* buffer;
+ if (message_length==0)
+ return GRIB_BUFFER_TOO_SMALL;
+
buffer_size = message_length;
rest=message_length-already_read;
r->message_size=message_length;
-
buffer = (unsigned char*)r->alloc(r->alloc_data,&buffer_size,&err);
if(err) return err;
|
libhfcommon: simplify long->uint32_t types in util_PinThreadToCPUs() | @@ -91,24 +91,25 @@ bool util_PinThreadToCPUs(uint32_t threadno, uint32_t cpucnt) {
return true;
}
- long num_cpus = sysconf(_SC_NPROCESSORS_ONLN);
- if (num_cpus == -1) {
+ long r = sysconf(_SC_NPROCESSORS_ONLN);
+ if (r == -1) {
PLOG_W("sysconf(_SC_NPROCESSORS_ONLN) failed");
return false;
}
+ uint32_t num_cpus = (uint32_t)r;
- uint32_t start_cpu = (threadno * cpucnt) % (uint32_t)num_cpus;
- uint32_t end_cpu = (start_cpu + cpucnt - 1U) % (uint32_t)num_cpus;
-
- LOG_D("Setting CPU affinity for the current thread #%" PRIu32 " to %" PRId32
- " consecutive CPUs, (start:%" PRIu32 "-end:%" PRIu32 ") total_cpus:%ld",
- threadno, cpucnt, start_cpu, end_cpu, num_cpus);
-
- if (cpucnt > (uint32_t)num_cpus) {
- LOG_W("Requested CPUs (%" PRId32 ") > available CPUs (%ld)", cpucnt, num_cpus);
+ if (cpucnt > num_cpus) {
+ LOG_W("Requested CPUs (%" PRIu32 ") > available CPUs (%" PRIu32 ") for thread #%" PRIu32,
+ cpucnt, num_cpus, threadno);
return false;
}
+ uint32_t start_cpu = (threadno * cpucnt) % num_cpus;
+ uint32_t end_cpu = (start_cpu + cpucnt - 1U) % num_cpus;
+ LOG_D("Setting CPU affinity for the current thread #%" PRIu32 " to %" PRIu32
+ " consecutive CPUs, (start:%" PRIu32 "-end:%" PRIu32 ") total_cpus:%" PRIu32,
+ threadno, cpucnt, start_cpu, end_cpu, num_cpus);
+
#if defined(_HF_ARCH_LINUX) || defined(__FreeBSD__) || defined(_HF_ARCH_NETBSD) || \
defined(__DragonFly__)
#if defined(_HF_ARCH_LINUX) || defined(__DragonFly__)
|
Fix warnings in gppc for incompatible pointer type. | @@ -518,7 +518,7 @@ GppcDatumGetTimestampTz(GppcDatum x)
GppcAnyTable
GppcDatumGetAnyTable(GppcDatum x)
{
- return DatumGetPointer(x);
+ return (GppcAnyTable) DatumGetPointer(x);
}
/*
@@ -527,7 +527,7 @@ GppcDatumGetAnyTable(GppcDatum x)
GppcTupleDesc
GppcDatumGetTupleDesc(GppcDatum x)
{
- return DatumGetPointer(x);
+ return (GppcTupleDesc) DatumGetPointer(x);
}
/*
@@ -536,7 +536,7 @@ GppcDatumGetTupleDesc(GppcDatum x)
GppcHeapTuple
GppcDatumGetHeapTuple(GppcDatum x)
{
- return DatumGetPointer(x);
+ return (GppcHeapTuple) DatumGetPointer(x);
}
/*
@@ -1488,7 +1488,7 @@ GppcTupleDescInitEntry(GppcTupleDesc desc,
GppcHeapTuple
GppcHeapFormTuple(GppcTupleDesc tupdesc, GppcDatum *values, bool *nulls)
{
- return (GppcHeapTuple) heap_form_tuple((TupleDesc) tupdesc, values, nulls);
+ return (GppcHeapTuple) heap_form_tuple((TupleDesc) tupdesc, (Datum *) values, nulls);
}
/*
@@ -1499,7 +1499,7 @@ GppcBuildHeapTupleDatum(GppcTupleDesc tupdesc, GppcDatum *values, bool *nulls)
{
HeapTuple tuple;
- tuple = heap_form_tuple((TupleDesc) tupdesc, values, nulls);
+ tuple = heap_form_tuple((TupleDesc) tupdesc, (Datum *) values, nulls);
return (GppcDatum) HeapTupleGetDatum(tuple);
}
|
Reorder metadata updating patter in WB mode
In WB mode metadata should be updated only if the actuall data had been saved
on disk. Otherwise metadata might be flushed too early and consequently data
corruption might occur. | @@ -74,6 +74,8 @@ static int ocf_write_wb_do_flush_metadata(struct ocf_request *req)
env_atomic_set(&req->req_remaining, 1); /* One core IO */
+ _ocf_write_wb_update_bits(req);
+
if (req->info.flush_metadata) {
OCF_DEBUG_RQ(req, "Flush metadata");
ocf_metadata_flush_do_asynch(cache, req,
@@ -152,9 +154,6 @@ int ocf_write_wb_do(struct ocf_request *req)
/* Get OCF request - increase reference counter */
ocf_req_get(req);
- /* Update status bits */
- _ocf_write_wb_update_bits(req);
-
/* Submit IO */
_ocf_write_wb_submit(req);
|
Fix a bug in computing the fragmentation point.
When using AF_CONN sockets, the fragmentation point was still
accounting for an IPv4 header. This is fixed by this patch.
This is related to | @@ -6747,7 +6747,15 @@ sctp_get_frag_point(struct sctp_tcb *stcb,
if (stcb->sctp_ep->sctp_flags & SCTP_PCB_FLAGS_BOUND_V6) {
ovh = SCTP_MIN_OVERHEAD;
} else {
+#if defined(__Userspace__)
+ if (stcb->sctp_ep->sctp_flags & SCTP_PCB_FLAGS_BOUND_CONN) {
+ ovh = sizeof(struct sctphdr);
+ } else {
+ ovh = SCTP_MIN_V4_OVERHEAD;
+ }
+#else
ovh = SCTP_MIN_V4_OVERHEAD;
+#endif
}
ovh += SCTP_DATA_CHUNK_OVERHEAD(stcb);
if (stcb->asoc.sctp_frag_point > asoc->smallest_mtu)
|
tools: update esp32c2_data_info_yaml | # Data_type:
-# copy from ESP32-C3
# primary_address: value
# length: value or equation
# secondary_address: value if exist
DRAM:
- primary_address: 0x3FC80000
- length: 0x60000
+ primary_address: 0x3FCA0000
+ length: 0x40000
secondary_address: 0x40380000
IRAM:
primary_address: 0x4037C000
length: 0x4000
CACHE_I:
primary_address: 0x42000000
- length: 0x800000
+ length: 0x400000
CACHE_D:
primary_address: 0x3C000000
- length: 0x800000
-RTC_SLOW_D:
- primary_address: 0x50000000
- length: 0x2000
+ length: 0x400000
|
test/recipes/90-test_store.t: Rename some functions
to_rel_file_uri really treated all files appropriately, absolute and
relative alike, and really just constructs a URI, so gets renamed to
to_file_uri
to_file_uri, on the other hand, forces the path into an absolute one,
so gets renamed to to_abs_file_uri | @@ -71,31 +71,31 @@ indir "store_$$" => sub {
foreach (@noexist_files) {
my $file = srctop_file($_);
ok(!run(app(["openssl", "storeutl", $file])));
- ok(!run(app(["openssl", "storeutl", to_file_uri($file)])));
+ ok(!run(app(["openssl", "storeutl", to_abs_file_uri($file)])));
}
foreach (@src_files) {
my $file = srctop_file($_);
ok(run(app(["openssl", "storeutl", $file])));
- ok(run(app(["openssl", "storeutl", to_file_uri($file)])));
- ok(run(app(["openssl", "storeutl", to_file_uri($file, 0,
+ ok(run(app(["openssl", "storeutl", to_abs_file_uri($file)])));
+ ok(run(app(["openssl", "storeutl", to_abs_file_uri($file, 0,
"")])));
- ok(run(app(["openssl", "storeutl", to_file_uri($file, 0,
+ ok(run(app(["openssl", "storeutl", to_abs_file_uri($file, 0,
"localhost")])));
- ok(!run(app(["openssl", "storeutl", to_file_uri($file, 0,
+ ok(!run(app(["openssl", "storeutl", to_abs_file_uri($file, 0,
"dummy")])));
}
foreach (@generated_files) {
ok(run(app(["openssl", "storeutl", "-passin", "pass:password",
$_])));
ok(run(app(["openssl", "storeutl", "-passin", "pass:password",
- to_file_uri($_)])));
+ to_abs_file_uri($_)])));
ok(!run(app(["openssl", "storeutl", "-passin", "pass:password",
- to_rel_file_uri($_)])));
+ to_file_uri($_)])));
}
{
my $dir = srctop_dir("test", "certs");
ok(run(app(["openssl", "storeutl", $dir])));
- ok(run(app(["openssl", "storeutl", to_file_uri($dir, 1)])));
+ ok(run(app(["openssl", "storeutl", to_abs_file_uri($dir, 1)])));
}
}
}, create => 1, cleanup => 1;
@@ -296,12 +296,12 @@ sub runall {
# According to RFC8089, a relative file: path is invalid. We still produce
# them for testing purposes.
-sub to_rel_file_uri {
+sub to_file_uri {
my ($file, $isdir, $authority) = @_;
my $vol;
my $dir;
- die "to_rel_file_uri: No file given\n" if !defined($file) || $file eq '';
+ die "to_file_uri: No file given\n" if !defined($file) || $file eq '';
($vol, $dir, $file) = File::Spec->splitpath($file, $isdir // 0);
@@ -341,9 +341,9 @@ sub to_rel_file_uri {
return "file:$file";
}
-sub to_file_uri {
+sub to_abs_file_uri {
my ($file, $isdir, $authority) = @_;
- die "to_file_uri: No file given\n" if !defined($file) || $file eq '';
- return to_rel_file_uri(File::Spec->rel2abs($file), $isdir, $authority);
+ die "to_abs_file_uri: No file given\n" if !defined($file) || $file eq '';
+ return to_file_uri(to_abs_file($file), $isdir, $authority);
}
|
Fix the example SSH KDF code.
A salt was being set instead of a session ID.
Fixes | @@ -121,7 +121,7 @@ This example derives an 8 byte IV using SHA-256 with a 1K "key" and appropriate
key, (size_t)1024);
*p++ = OSSL_PARAM_construct_octet_string(OSSL_KDF_PARAM_SSHKDF_XCGHASH,
xcghash, (size_t)32);
- *p++ = OSSL_PARAM_construct_octet_string(OSSL_KDF_PARAM_SALT,
+ *p++ = OSSL_PARAM_construct_octet_string(OSSL_KDF_PARAM_SSHKDF_SESSION_ID,
session_id, (size_t)32);
*p++ = OSSL_PARAM_construct_utf8_string(OSSL_KDF_PARAM_SSHKDF_TYPE,
&type, sizeof(type));
|
More verbose output and ignore failure for now | @@ -61,15 +61,14 @@ jobs:
sudo apt install ccache ninja-build
for i in ${{ runner.temp }}/arm-gcc/bin/* ; do sudo ln -s /usr/bin/ccache /usr/lib/ccache/$(basename $i); done
ccache -M 1Ti
-
- - name: Compile
- run: |
export PATH=/usr/lib/ccache:${{ runner.temp }}/arm-gcc/bin/:/home/runner/.local/bin:$PATH
- python tools/progen_compile.py --release --parallel
+ arm-none-eabi-gcc -v
- - name: Display results
+ - name: Compile
run: |
- - (ls -lR firmware_*; ccache -s) | tee log.txt
+ export PATH="/usr/lib/ccache:${{ runner.temp }}/arm-gcc/bin/:/home/runner/.local/bin:$PATH"
+ python tools/progen_compile.py --release --parallel -v -v --ignore-failures
+ (ls -lR firmware_*; ccache -s; arm-none-eabi-gcc -v) | tee log.txt
- name: Upload test artifacts
uses: actions/upload-artifact@v2
|
test is_missing for string key | @@ -485,8 +485,10 @@ cat > $fRules <<EOF
set unpack=1;
transient m1 = missing(heightOfBarometerAboveMeanSeaLevel);
transient m2 = missing(blockNumber);
+ transient m3 = missing(stationOrSiteName);
assert ( m1 == 1 );
assert ( m2 == 1 );
+ assert ( m3 == 1 );
EOF
f="$ECCODES_SAMPLES_PATH/BUFR4.tmpl"
${tools_dir}/codes_bufr_filter $fRules $f
|
use goto to streamline failure handling | @@ -81,37 +81,38 @@ int net_socket( const char name[], const char ifname[], const int protocol, cons
if( sock < 0 ) {
log_err( "%s: Failed to create socket: %s", name, strerror( errno ) );
- return -1;
+ goto fail;
}
if( net_set_nonblocking( sock ) < 0 ) {
- close( sock );
log_err( "%s: Failed to make socket nonblocking: %s", name, strerror( errno ) );
- return -1;
+ goto fail;
}
#if defined(__APPLE__) || defined(__CYGWIN__) || defined(__FreeBSD__)
if( ifname ) {
- close( sock );
log_err( "%s: Bind to device not supported on Windows and MacOSX.", name );
- return -1;
+ goto fail;
}
#else
if( ifname && setsockopt( sock, SOL_SOCKET, SO_BINDTODEVICE, ifname, strlen( ifname ) ) ) {
- close( sock );
log_err( "%s: Unable to bind to device %s: %s", name, ifname, strerror( errno ) );
- return -1;
+ goto fail;
}
#endif
const int optval = 1;
if( setsockopt( sock, SOL_SOCKET, SO_REUSEADDR, &optval, sizeof(optval) ) < 0 ) {
- close( sock );
log_err( "%s: Unable to set SO_REUSEADDR for %s: %s", name, ifname, strerror( errno ) );
- return -1;
+ goto fail;
}
return sock;
+
+fail:
+ close( sock );
+
+ return -1;
}
int net_bind(
@@ -124,48 +125,45 @@ int net_bind(
const int opt_on = 1;
socklen_t addrlen;
IP sockaddr;
- int sock;
+ int sock = -1;;
if( addr_parse( &sockaddr, addr, port, AF_UNSPEC ) != 0 ) {
log_err( "%s: Failed to parse IP address '%s' and port '%s'.",
name, addr, port
);
- return -1;
+ goto fail;
}
// Disable IPv6 or IPv4
if( gconf->af != AF_UNSPEC && gconf->af != sockaddr.ss_family ) {
- return -1;
+ goto fail;
}
if( (sock = net_socket( name, ifname, protocol, sockaddr.ss_family )) < 0 ) {
- return -1;
+ goto fail;
}
if( sockaddr.ss_family == AF_INET6 ) {
if( setsockopt( sock, IPPROTO_IPV6, IPV6_V6ONLY, &opt_on, sizeof(opt_on) ) < 0 ) {
- close( sock );
log_err( "%s: Failed to set IPV6_V6ONLY for %s: %s",
name, str_addr( &sockaddr ), strerror( errno ) );
- return -1;
+ goto fail;
}
}
addrlen = addr_len( &sockaddr );
if( bind( sock, (struct sockaddr*) &sockaddr, addrlen ) < 0 ) {
- close( sock );
log_err( "%s: Failed to bind socket to %s: %s",
name, str_addr( &sockaddr ), strerror( errno )
);
- return -1;
+ goto fail;
}
if( protocol == IPPROTO_TCP && listen( sock, 5 ) < 0 ) {
- close( sock );
log_err( "%s: Failed to listen on %s: %s (%s)",
name, str_addr( &sockaddr ), strerror( errno )
);
- return -1;
+ goto fail;
}
log_info( ifname ? "%s: Bind to %s, interface %s" : "%s: Bind to %s",
@@ -173,6 +171,10 @@ int net_bind(
);
return sock;
+
+fail:
+ close( sock );
+ return -1;
}
void net_loop( void ) {
|
Implement one-shot cipher
Implement one-shot cipher APIs, psa_cipher_encrypt and psa_cipher_decrypt, introduced in PSA Crypto API 1.0. | @@ -3483,6 +3483,107 @@ psa_status_t psa_cipher_abort( psa_cipher_operation_t *operation )
return( PSA_SUCCESS );
}
+psa_status_t psa_cipher_encrypt( mbedtls_svc_key_id_t key,
+ psa_algorithm_t alg,
+ const uint8_t *input,
+ size_t input_length,
+ uint8_t *output,
+ size_t output_size,
+ size_t *output_length )
+{
+ psa_status_t status = PSA_ERROR_CORRUPTION_DETECTED;
+ psa_cipher_operation_t operation = PSA_CIPHER_OPERATION_INIT;
+ size_t iv_length = 0;;
+ size_t olength;
+
+ status = psa_cipher_encrypt_setup( &operation, key, alg );
+ if( status != PSA_SUCCESS )
+ goto exit;
+
+ *output_length = 0;
+ if( operation.iv_required )
+ {
+ status = psa_cipher_generate_iv( &operation, output,
+ operation.default_iv_length,
+ &iv_length );
+ *output_length += iv_length;
+ if( status != PSA_SUCCESS )
+ goto exit;
+ }
+
+ olength = 0;
+ status = psa_cipher_update( &operation, input, input_length,
+ output + iv_length, output_size - iv_length,
+ &olength );
+ *output_length += olength;
+ if( status != PSA_SUCCESS )
+ goto exit;
+
+ olength = 0;
+ status = psa_cipher_finish( &operation, output + *output_length,
+ output_size - *output_length, &olength );
+ *output_length += olength;
+ if( status != PSA_SUCCESS )
+ goto exit;
+
+exit:
+ if ( status == PSA_SUCCESS )
+ status = psa_cipher_abort( &operation );
+ else
+ psa_cipher_abort( &operation );
+
+ return ( status );
+}
+
+psa_status_t psa_cipher_decrypt( mbedtls_svc_key_id_t key,
+ psa_algorithm_t alg,
+ const uint8_t *input,
+ size_t input_length,
+ uint8_t *output,
+ size_t output_size,
+ size_t *output_length )
+{
+ psa_status_t status = PSA_ERROR_CORRUPTION_DETECTED;
+ psa_cipher_operation_t operation = PSA_CIPHER_OPERATION_INIT;
+ size_t olength;
+
+ status = psa_cipher_decrypt_setup( &operation, key, alg );
+ if( status != PSA_SUCCESS )
+ goto exit;
+
+ if( operation.iv_required )
+ {
+ status = psa_cipher_set_iv( &operation, input,
+ operation.default_iv_length );
+ if( status != PSA_SUCCESS )
+ goto exit;
+ }
+
+ olength = 0;
+ status = psa_cipher_update( &operation, input + operation.default_iv_length,
+ input_length - operation.default_iv_length,
+ output, output_size, &olength );
+ *output_length = olength;
+ if( status != PSA_SUCCESS )
+ goto exit;
+
+ olength = 0;
+ status = psa_cipher_finish( &operation, output + *output_length,
+ output_size - *output_length, &olength );
+ *output_length += olength;
+ if( status != PSA_SUCCESS )
+ goto exit;
+
+exit:
+ if ( status == PSA_SUCCESS )
+ status = psa_cipher_abort( &operation );
+ else
+ psa_cipher_abort( &operation );
+
+ return ( status );
+}
+
+
/****************************************************************/
/* AEAD */
/****************************************************************/
|
nvbios/info: Add support for GM108 (nv118) | @@ -263,6 +263,11 @@ int envy_bios_parse_bit_i (struct envy_bios *bios, struct envy_bios_bit_entry *b
bios->chipset = 0x117;
bios->chipset_name = "GM117";
break;
+ /* GM108 */
+ case 0x8208:
+ bios->chipset = 0x118;
+ bios->chipset_name = "GM108";
+ break;
/* GM200 */
case 0x8400:
bios->chipset = 0x120;
|
sdl/hints: fix a couple of backward-compatibility hints defined for SDL2 version | @@ -16,6 +16,8 @@ package sdl
#define SDL_HINT_JOYSTICK_RAWINPUT_CORRELATE_XINPUT ""
#define SDL_HINT_AUDIO_INCLUDE_MONITORS ""
#define SDL_HINT_AUDIO_DEVICE_STREAM_ROLE ""
+#define SDL_HINT_JOYSTICK_HIDAPI_JOY_CONS ""
+#define SDL_HINT_JOYSTICK_HIDAPI_SWITCH_HOME_LED ""
#endif
#if !(SDL_VERSION_ATLEAST(2,0,14))
@@ -168,9 +170,7 @@ static inline SDL_bool SDL_ResetHint(const char *name)
#define SDL_HINT_MOUSE_RELATIVE_WARP_MOTION ""
#define SDL_HINT_TRACKPAD_IS_TOUCH_ONLY ""
-#define SDL_HINT_JOYSTICK_HIDAPI_JOY_CONS ""
#define SDL_HINT_JOYSTICK_HIDAPI_COMBINE_JOY_CONS ""
-#define SDL_HINT_JOYSTICK_HIDAPI_SWITCH_HOME_LED ""
#define SDL_HINT_JOYSTICK_HIDAPI_JOYCON_HOME_LED ""
#define SDL_HINT_JOYSTICK_HIDAPI_SWITCH_PLAYER_LED ""
#define SDL_HINT_JOYSTICK_HIDAPI_NINTENDO_CLASSIC ""
|
Adding last test | @@ -249,7 +249,7 @@ BOOST_AUTO_TEST_CASE(test_net_builder)
BOOST_REQUIRE(h_orig == h_build_loaded);
// compare the original to the build without saving
- //BOOST_REQUIRE(h_orig == h_build); // this seems to fail :(
+ BOOST_REQUIRE(h_orig == h_build); // this seems to fail :(
}
|
sse2: fix rounding of simde_mm_cvtps_epi32 on POWER on clang
Fixes | @@ -2615,14 +2615,14 @@ simde_mm_cvtps_epi32 (simde__m128 a) {
r_.neon_i32 = vcvtnq_s32_f32(a_.neon_f32);
#elif defined(SIMDE_ARM_NEON_A32V7_NATIVE) && defined(SIMDE_FAST_ROUND_TIES)
r_.neon_i32 = vcvtnq_s32_f32(a_.neon_f32);
- #elif defined(SIMDE_POWER_ALTIVEC_P6_NATIVE)
+ #elif defined(SIMDE_POWER_ALTIVEC_P6_NATIVE) && defined(SIMDE_FAST_ROUND_TIES)
HEDLEY_DIAGNOSTIC_PUSH
SIMDE_DIAGNOSTIC_DISABLE_C11_EXTENSIONS_
SIMDE_DIAGNOSTIC_DISABLE_VECTOR_CONVERSION_
- r_.altivec_i32 = vec_cts(vec_round(a_.altivec_f32), 0);
+ r_.altivec_i32 = vec_cts(a_.altivec_f32, 1);
HEDLEY_DIAGNOSTIC_POP
#else
- a_ = simde__m128_to_private(simde_mm_round_ps(simde__m128_from_private(a_), SIMDE_MM_FROUND_TO_NEAREST_INT));
+ a_ = simde__m128_to_private(simde_x_mm_round_ps(simde__m128_from_private(a_), SIMDE_MM_FROUND_TO_NEAREST_INT, 1));
SIMDE_VECTORIZE
for (size_t i = 0 ; i < (sizeof(r_.i32) / sizeof(r_.i32[0])) ; i++) {
r_.i32[i] = HEDLEY_STATIC_CAST(int32_t, a_.f32[i]);
|
Update tasks.c
An optimization for prvResetNextTaskUnblockTime(). | @@ -3964,8 +3964,7 @@ TCB_t *pxTCB;
the item at the head of the delayed list. This is the time at
which the task at the head of the delayed list should be removed
from the Blocked state. */
- ( pxTCB ) = listGET_OWNER_OF_HEAD_ENTRY( pxDelayedTaskList ); /*lint !e9079 void * is used as this macro is used with timers and co-routines too. Alignment is known to be fine as the type of the pointer stored and retrieved is the same. */
- xNextTaskUnblockTime = listGET_LIST_ITEM_VALUE( &( ( pxTCB )->xStateListItem ) );
+ xNextTaskUnblockTime = listGET_ITEM_VALUE_OF_HEAD_ENTRY( pxDelayedTaskList );
}
}
/*-----------------------------------------------------------*/
|
publish: step up font size in titles | @@ -61,9 +61,9 @@ export function NotePreview(props: NotePreviewProps) {
overflow='hidden'
p='2'
>
- <WrappedBox mb={2}><Text bold fontSize='0'>{title}</Text></WrappedBox>
+ <WrappedBox mb={2}><Text bold>{title}</Text></WrappedBox>
<WrappedBox>
- <Text fontSize='14px'>
+ <Text fontSize='14px' lineHeight='tall'>
<ReactMarkdown
unwrapDisallowed
allowedTypes={['text', 'root', 'break', 'paragraph', 'image']}
|
Fix Error: usbhost/usbhost_storage.c:1471:24: error: unused function 'usbhost_getle32' [-Werror,-Wunused-function] | @@ -197,7 +197,9 @@ static inline uint16_t usbhost_getle16(const uint8_t *val);
static inline uint16_t usbhost_getbe16(const uint8_t *val);
static inline void usbhost_putle16(uint8_t *dest, uint16_t val);
static inline void usbhost_putbe16(uint8_t *dest, uint16_t val);
+#if defined(CONFIG_DEBUG_USB) && defined(CONFIG_DEBUG_INFO)
static inline uint32_t usbhost_getle32(const uint8_t *val);
+#endif
static inline uint32_t usbhost_getbe32(const uint8_t *val);
static void usbhost_putle32(uint8_t *dest, uint32_t val);
static void usbhost_putbe32(uint8_t *dest, uint32_t val);
@@ -1468,6 +1470,7 @@ static void usbhost_putbe16(uint8_t *dest, uint16_t val)
*
****************************************************************************/
+#if defined(CONFIG_DEBUG_USB) && defined(CONFIG_DEBUG_INFO)
static inline uint32_t usbhost_getle32(const uint8_t *val)
{
/* Little endian means LS halfword first in byte stream */
@@ -1475,6 +1478,7 @@ static inline uint32_t usbhost_getle32(const uint8_t *val)
return (uint32_t)usbhost_getle16(&val[2]) << 16 |
(uint32_t)usbhost_getle16(val);
}
+#endif
/****************************************************************************
* Name: usbhost_getbe32
|
enclave-tls/dist: add SGX SDK compile check in the rpm spec | @@ -34,6 +34,17 @@ enclave-tls is a protocol to establish secure and trusted channel by integrating
%setup -q -n %{PROJECT}-%{version}
%build
+# If the SGX SDK is not prepared well in build environment, stop the build
+if [ -z "$SGX_SDK" ]; then
+ echo 'Error: Please install SGX SDK firstly'
+ exit 1
+fi
+
+if [ "$SGX_SDK" != "/opt/intel/sgxsdk" ]; then
+ echo 'Error: The SGX_SDK environment variable value is not correct'
+ exit 1
+fi
+
pushd %{name}
make SGX=1
popd
|
Trivial: Fix Makefile typo | @@ -496,7 +496,7 @@ pkg-srpm: dist
make -C extras/rpm srpm
dpdk-install-dev:
- $(call banner,"This command is deprecated. Please use 'make install-ext-libs'")
+ $(call banner,"This command is deprecated. Please use 'make install-ext-deps'")
make -C build/external install-$(PKG)
install-ext-deps:
|
<br/> from trailing \ | ::
(stag %text ;~(pfix bas (cook trip ;~(less ace prn))))
::
+ :: trailing \ to add <br>
+ ::
+ (stag %expr (cold [[%br ~] ~] ;~(plug bas (just '\0a'))))
+ ::
:: *bold literal*
::
(stag %bold (ifix [tar tar] (cool (cash tar) work)))
|
Do free the http1client buffers | @@ -85,6 +85,10 @@ static void close_client(struct st_h2o_http1client_private_t *client)
}
if (h2o_timeout_is_linked(&client->_timeout))
h2o_timeout_unlink(&client->_timeout);
+ if (client->_body_buf)
+ h2o_buffer_dispose(&client->_body_buf);
+ if (client->_body_buf_in_flight)
+ h2o_buffer_dispose(&client->_body_buf_in_flight);
free(client);
}
|
mmiocc: fix bug when overwriting files | @@ -76,6 +76,11 @@ namespace internal_ {
std::fill(dims_, dims_+DIMS_MAX, 1);
}
+ Node(const Node&) = delete;
+ Node(Node&&) = delete;
+ Node& operator=(const Node&) = delete;
+ Node& operator=(Node&&) = delete;
+
virtual ~Node() {}
virtual std::string name() const { return name_; }
@@ -254,6 +259,8 @@ namespace internal_ {
const auto it(std::find_if(list_.begin(),
list_.end(),
NameEqual(name)));
+
+ bool is_dirty(false);
if (it != list_.end()) {
debug_printf(DP_DEBUG2, " found \"%s\" already in the database!\n", name.c_str());
@@ -270,6 +277,8 @@ namespace internal_ {
if ((*it)->data_dir() == INPUT) {
BART_OUT("MEMCFL: marking first occurrence of %s as DIRTY!\n", (*it)->name().c_str());
(*it)->dirty() = true;
+ is_dirty = true;
+ std::iter_swap(it, list_.end()-1); // move it to the end
}
else {
BART_OUT("MEMCFL: deleting first occurrence of %s\n", (*it)->name().c_str());
@@ -279,8 +288,17 @@ namespace internal_ {
debug_printf(DP_DEBUG2, " allocating PointerNode<T>\n");
list_.emplace_back(std::make_unique<PointerNode<T>>(name, D, dims));
+ auto* data = reinterpret_cast<T*>(list_.back()->data());
+ if (is_dirty) {
+ /*
+ * Make sure the dirty node is after the one we just added
+ * NB: cannot use 'it' here as a re-allocation might have
+ * happened...
+ */
+ std::iter_swap(list_.end()-2, list_.end()-1);
+ }
debug_printf(DP_DEBUG2, " returning from MemoryHandler::allocate_mem_cfl<T>\n");
- return reinterpret_cast<T*>(list_.back()->data());
+ return data;
}
template <typename T>
T* allocate_mem_cfl(unsigned int D, long dims[])
|
Improved detection of local ipv4 address | @@ -244,7 +244,7 @@ int DeRestPluginPrivate::createUser(const ApiRequest &req, ApiResponse &rsp)
*/
void DeRestPluginPrivate::configToMap(const ApiRequest &req, QVariantMap &map)
{
- bool ok;
+ bool ok = false;
QVariantMap whitelist;
QVariantMap swupdate;
QVariantMap devicetypes;
@@ -254,50 +254,65 @@ void DeRestPluginPrivate::configToMap(const ApiRequest &req, QVariantMap &map)
QDateTime datetime = QDateTime::currentDateTimeUtc();
QDateTime localtime = QDateTime::currentDateTime();
- QNetworkInterface eth;
-
{
QList<QNetworkInterface> ifaces = QNetworkInterface::allInterfaces();
QList<QNetworkInterface>::Iterator i = ifaces.begin();
QList<QNetworkInterface>::Iterator end = ifaces.end();
// optimistic approach chose the first available ethernet interface
- for (;i != end; ++i)
+ for (; !ok && i != end; ++i)
{
+ if (i->name() == QLatin1String("tun0"))
+ {
+ continue;
+ }
+
if ((i->flags() & QNetworkInterface::IsUp) &&
(i->flags() & QNetworkInterface::IsRunning) &&
!(i->flags() & QNetworkInterface::IsLoopBack))
{
+ DBG_Printf(DBG_INFO, "%s (%s)\n", qPrintable(i->name()), qPrintable(i->humanReadableName()));
+
QList<QNetworkAddressEntry> addresses = i->addressEntries();
- if (!addresses.isEmpty())
+ if (ok || addresses.isEmpty())
{
- eth = *i;
- break;
- }
- }
- }
+ continue;
}
- ok = false;
- if (eth.isValid() && !eth.addressEntries().isEmpty())
+ QList<QNetworkAddressEntry>::Iterator a = addresses.begin();
+ QList<QNetworkAddressEntry>::Iterator aend = addresses.end();
+
+ for (; a != aend; ++a)
{
- QList<QNetworkAddressEntry> addresses = eth.addressEntries();
- QList<QNetworkAddressEntry>::Iterator i = addresses.begin();
- QList<QNetworkAddressEntry>::Iterator end = addresses.end();
+ if (a->ip().protocol() != QAbstractSocket::IPv4Protocol)
+ {
+ continue;
+ }
- for (; i != end; ++i)
+ quint32 ipv4 = a->ip().toIPv4Address();
+ if ((ipv4 & 0xff000000UL) == 0x7f000000UL)
{
- if (i->ip().protocol() == QAbstractSocket::IPv4Protocol)
+ // 127.x.x.x
+ continue;
+ }
+
+ if ((ipv4 & 0xa0000000UL) != 0xa0000000UL &&
+ (ipv4 & 0xb0000000UL) != 0xb0000000UL &&
+ (ipv4 & 0xc0000000UL) != 0xc0000000UL)
{
- map["ipaddress"] = i->ip().toString();
- map["netmask"] = i->netmask().toString();
+ // class A, B or C network
+ continue;
+ }
+
+ map["ipaddress"] = a->ip().toString();
+ map["netmask"] = a->netmask().toString();
+ map["mac"] = i->hardwareAddress().toLower();
ok = true;
break;
}
}
-
- map["mac"] = eth.hardwareAddress().toLower();
+ }
}
if (!ok)
|
Fix too many packets in flight | @@ -999,12 +999,12 @@ int Handler::on_write() {
}
int Handler::on_write_stream(Stream &stream) {
+ if (stream.streambuf_idx == stream.streambuf.size()) {
+ if (stream.should_send_fin) {
if (ngtcp2_conn_bytes_in_flight(conn_) >= MAX_BYTES_IN_FLIGHT) {
return 0;
}
- if (stream.streambuf_idx == stream.streambuf.size()) {
- if (stream.should_send_fin) {
stream.should_send_fin = false;
auto v = Buffer{};
if (write_stream_data(stream, 1, v) != 0) {
@@ -1016,10 +1016,6 @@ int Handler::on_write_stream(Stream &stream) {
for (auto it = std::begin(stream.streambuf) + stream.streambuf_idx;
it != std::end(stream.streambuf); ++it) {
- if (ngtcp2_conn_bytes_in_flight(conn_) >= MAX_BYTES_IN_FLIGHT) {
- break;
- }
-
auto &v = *it;
auto fin = stream.should_send_fin &&
stream.streambuf_idx == stream.streambuf.size() - 1;
@@ -1043,6 +1039,10 @@ int Handler::write_stream_data(Stream &stream, int fin, Buffer &data) {
size_t ndatalen;
for (;;) {
+ if (ngtcp2_conn_bytes_in_flight(conn_) >= MAX_BYTES_IN_FLIGHT) {
+ break;
+ }
+
auto n = ngtcp2_conn_write_stream(
conn_, sendbuf_.wpos(), max_pktlen_, &ndatalen, stream.stream_id, fin,
data.rpos(), data.size(), util::timestamp());
|
Fixed error and return code. | @@ -1288,21 +1288,17 @@ static int ciphersuite_cb(const char *elem, int len, void *arg)
/* Arbitrary sized temp buffer for the cipher name. Should be big enough */
char name[80];
- if (len > (int)(sizeof(name) - 1)) {
- ERR_raise(ERR_LIB_SSL, SSL_R_NO_CIPHER_MATCH);
- return 0;
- }
+ if (len > (int)(sizeof(name) - 1))
+ /* Anyway return 1 so we can parse rest of the list */
+ return 1;
memcpy(name, elem, len);
name[len] = '\0';
cipher = ssl3_get_cipher_by_std_name(name);
- if (cipher == NULL) {
- ERR_raise(ERR_LIB_SSL, SSL_R_NO_CIPHER_MATCH);
- return 0;
+ if (cipher == NULL)
/* Ciphersuite not found but return 1 to parse rest of the list */
return 1;
- }
if (!sk_SSL_CIPHER_push(ciphersuites, cipher)) {
ERR_raise(ERR_LIB_SSL, ERR_R_INTERNAL_ERROR);
@@ -1323,6 +1319,7 @@ static __owur int set_ciphersuites(STACK_OF(SSL_CIPHER) **currciphers, const cha
if (*str != '\0'
&& (CONF_parse_list(str, ':', 1, ciphersuite_cb, newciphers) <= 0
|| sk_SSL_CIPHER_num(newciphers) == 0 )) {
+ ERR_raise(ERR_LIB_SSL, SSL_R_NO_CIPHER_MATCH);
sk_SSL_CIPHER_free(newciphers);
return 0;
}
|
server: build: on Solaris link to socket and nsl | @@ -42,3 +42,7 @@ message(STATUS "LINKING ${STATIC_PLUGINS_LIBS}")
if(MK_HAVE_LINUX_KQUEUE)
target_link_libraries(monkey-core-static kqueue)
endif()
+
+if (CMAKE_SYSTEM_NAME MATCHES "SunOS")
+ target_link_libraries(monkey-core-static socket nsl)
+endif()
|
nix: enables debug symbols in release builds | @@ -20,7 +20,7 @@ let
in
env.make_derivation {
- CFLAGS = if debug then "-O0 -g" else "-O3";
+ CFLAGS = if debug then "-O0 -g" else "-O3 -g";
LDFLAGS = if debug then "" else "-s";
MEMORY_DEBUG = debug;
CPU_DEBUG = debug;
|
build: fix build flags for LuaJIT | @@ -429,8 +429,8 @@ if(FLB_LUAJIT)
set(LUA_PATH ${CMAKE_CURRENT_SOURCE_DIR}/lib/luajit-2.0.5)
ExternalProject_Add(luajit
SOURCE_DIR ${LUA_PATH}
- CONFIGURE_COMMAND export "CFLAGS=-g -fPIC" #${LUA_PATH}/configure
- BUILD_COMMAND make -C ${LUA_PATH}
+ CONFIGURE_COMMAND ${LUA_PATH}/configure
+ BUILD_COMMAND make BUILD_MODE=static XCFLAGS="-fPIC" -C ${LUA_PATH}
INSTALL_COMMAND cp ${LUA_PATH}/src/libluajit.a "${CMAKE_CURRENT_BINARY_DIR}/lib/libluajit.a")
add_library(libluajit STATIC IMPORTED GLOBAL)
set_target_properties(libluajit PROPERTIES IMPORTED_LOCATION "${CMAKE_CURRENT_BINARY_DIR}/lib/libluajit.a")
|
llcstat: print a nicer error message when hardware events are missing
Hardware events such as CACHE_MISSES and CACHE_REFERENCES are usually
not available on virtual machine. Print a more useful message when
this happen. | @@ -78,12 +78,16 @@ if args.ebpf:
exit()
b = BPF(text=bpf_text)
+try:
b.attach_perf_event(
ev_type=PerfType.HARDWARE, ev_config=PerfHWConfig.CACHE_MISSES,
fn_name="on_cache_miss", sample_period=args.sample_period)
b.attach_perf_event(
ev_type=PerfType.HARDWARE, ev_config=PerfHWConfig.CACHE_REFERENCES,
fn_name="on_cache_ref", sample_period=args.sample_period)
+except:
+ print("Failed to attach to a hardware event. Is this a virtual machine?")
+ exit()
print("Running for {} seconds or hit Ctrl-C to end.".format(args.duration))
|
commander/btc: helper function to translate between results enums | #include <wally_bip32.h> // for BIP32_INITIAL_HARDENED_CHILD
+static commander_error_t _result(app_btc_result_t result)
+{
+ switch (result) {
+ case APP_BTC_OK:
+ return COMMANDER_OK;
+ case APP_BTC_ERR_USER_ABORT:
+ return COMMANDER_ERR_USER_ABORT;
+ case APP_BTC_ERR_INVALID_INPUT:
+ return COMMANDER_ERR_INVALID_INPUT;
+ default:
+ return COMMANDER_ERR_GENERIC;
+ }
+}
+
static commander_error_t _btc_pub_xpub(const BTCPubRequest* request, PubResponse* response)
{
if (!app_btc_xpub(
@@ -109,17 +123,7 @@ static commander_error_t _btc_pub_address_multisig(
response->pub,
sizeof(response->pub),
request->display);
-
- switch (result) {
- case APP_BTC_OK:
- return COMMANDER_OK;
- case APP_BTC_ERR_USER_ABORT:
- return COMMANDER_ERR_USER_ABORT;
- case APP_BTC_ERR_INVALID_INPUT:
- return COMMANDER_ERR_INVALID_INPUT;
- default:
- return COMMANDER_ERR_GENERIC;
- }
+ return _result(result);
}
commander_error_t commander_btc_pub(const BTCPubRequest* request, PubResponse* response)
@@ -210,16 +214,7 @@ static commander_error_t _api_register_script_config(const BTCRegisterScriptConf
request->registration.keypath,
request->registration.keypath_count,
request->name);
- switch (result) {
- case APP_BTC_OK:
- return COMMANDER_OK;
- case APP_BTC_ERR_USER_ABORT:
- return COMMANDER_ERR_USER_ABORT;
- case APP_BTC_ERR_INVALID_INPUT:
- return COMMANDER_ERR_INVALID_INPUT;
- default:
- return COMMANDER_ERR_GENERIC;
- }
+ return _result(result);
}
commander_error_t commander_btc(const BTCRequest* request, BTCResponse* response)
|
codeowners: fix issue with non-existent user and error | /src/flb_signv4.c @pettitwesley
/src/flb_lib.c @edsiper @niedbalski
-@ Core: AWS Auth & Utils
+# Core: AWS Auth & Utils
# ------------
/src/aws @pettitwesley
# Output Plugins
# --------------
-/plugins/out_datadog @clamoriniere
+/plugins/out_datadog @nokute78 @edsiper
/plugins/out_es @pettitwesley @edsiper
/plugins/out_pgsql @sxd
# AWS Plugins
|
tests CHANGE test forvard reference via base in identity definition | @@ -372,12 +372,12 @@ test_identity(void **state)
struct ly_ctx *ctx;
struct lys_module *mod1, *mod2;
- const char *mod1_str = "module a {namespace urn:a;prefix a; identity a1;}";
- const char *mod2_str = "module b {yang-version 1.1;namespace urn:b;prefix b; import a {prefix a;}identity b1; identity b2; identity b3 {base b1; base b:b2; base a:a1;} identity b4 {base b:b1; base b3;}}";
assert_int_equal(LY_SUCCESS, ly_ctx_new(NULL, LY_CTX_DISABLE_SEARCHDIRS, &ctx));
- assert_non_null(mod1 = lys_parse_mem(ctx, mod1_str, LYS_IN_YANG));
- assert_non_null(mod2 = lys_parse_mem(ctx, mod2_str, LYS_IN_YANG));
+ assert_non_null(mod1 = lys_parse_mem(ctx, "module a {namespace urn:a;prefix a; identity a1;}", LYS_IN_YANG));
+ assert_non_null(mod2 = lys_parse_mem(ctx, "module b {yang-version 1.1;namespace urn:b;prefix b; import a {prefix a;}"
+ "identity b1; identity b2; identity b3 {base b1; base b:b2; base a:a1;}"
+ "identity b4 {base b:b1; base b3;}}", LYS_IN_YANG));
assert_non_null(mod1->compiled);
assert_non_null(mod1->compiled->identities);
@@ -398,11 +398,16 @@ test_identity(void **state)
assert_int_equal(1, LY_ARRAY_SIZE(mod2->compiled->identities[2].derived));
assert_ptr_equal(mod2->compiled->identities[2].derived[0], &mod2->compiled->identities[3]);
- assert_null(lys_parse_mem(ctx, "module c{namespace urn:c; prefix c; identity i1;identity i1;}", LYS_IN_YANG));
+ assert_non_null(mod2 = lys_parse_mem(ctx, "module c {yang-version 1.1;namespace urn:c;prefix c;"
+ "identity c2 {base c1;} identity c1;}", LYS_IN_YANG));
+ assert_int_equal(1, LY_ARRAY_SIZE(mod2->compiled->identities[1].derived));
+ assert_ptr_equal(mod2->compiled->identities[1].derived[0], &mod2->compiled->identities[0]);
+
+ assert_null(lys_parse_mem(ctx, "module aa{namespace urn:aa; prefix aa; identity i1;identity i1;}", LYS_IN_YANG));
logbuf_assert("Duplicate identifier \"i1\" of identity statement.");
- ly_ctx_set_module_imp_clb(ctx, test_imp_clb, "submodule sd {belongs-to d {prefix d;} identity i1;}");
- assert_null(lys_parse_mem(ctx, "module d{namespace urn:d; prefix d; include sd;identity i1;}", LYS_IN_YANG));
+ ly_ctx_set_module_imp_clb(ctx, test_imp_clb, "submodule sbb {belongs-to bb {prefix bb;} identity i1;}");
+ assert_null(lys_parse_mem(ctx, "module bb{namespace urn:bb; prefix bb; include sbb;identity i1;}", LYS_IN_YANG));
logbuf_assert("Duplicate identifier \"i1\" of identity statement.");
*state = NULL;
|
fix: MAX_MESSAGE_LEN for bots is 2000 | @@ -44,7 +44,7 @@ typedef uint64_t u64_snowflake_t; ///< snowflake datatype
#define MAX_EMAIL_LEN 254 + 1
#define MAX_REGION_LEN 16 + 1
#define MAX_REASON_LEN 512 + 1
-#define MAX_MESSAGE_LEN 4000 + 1
+#define MAX_MESSAGE_LEN 2000 + 1
#define MAX_PAYLOAD_LEN 4096 + 1
/* EMBED LIMITS
|
Print effective NO_CHECK_IMPORTS.
Note: mandatory check (NEED_CHECK) was skipped | @@ -24,6 +24,8 @@ def check_imports(no_check=(), extra=(), skip_func=None):
exceptions = list(no_check)
for key, _ in __res.iter_keys(b'py/no_check_imports/'):
exceptions += str_(__res.find(key)).split()
+ exceptions.sort()
+ print('NO_CHECK_IMPORTS', ' '.join(exceptions))
patterns = [re.escape(s).replace(r'\*', r'.*') for s in exceptions]
rx = re.compile('^({})$'.format('|'.join(patterns)))
@@ -33,26 +35,26 @@ def check_imports(no_check=(), extra=(), skip_func=None):
norm = lambda s: s[:-9] if s.endswith('.__init__') else s
for module in sorted(sys.extra_modules | set(extra), key=norm):
if module not in extra and (rx.search(module) or skip_func and skip_func(module)):
- print('SKIP:', module)
+ print('SKIP', module)
continue
name = module.rsplit('.', 1)[-1]
if name == '__main__' and 'if __name__ ==' not in importer.get_source(module):
- print('SKIP:', module, '''without "if __name__ == '__main__'" check''')
+ print('SKIP', module, '''without "if __name__ == '__main__'" check''')
continue
try:
- print('TRY:', module)
+ print('TRY', module)
if module == '__main__':
importer.load_module('__main__', '__main__py')
elif module.endswith('.__init__'):
__import__(module[:-len('.__init__')])
else:
__import__(module)
- print('OK:', module)
+ print('OK ', module)
except Exception as e:
- print('FAIL:', module, e, file=sys.stderr)
+ print('FAIL', module, e, file=sys.stderr)
traceback.print_exception(*sys.exc_info())
failed.append('{}: {}'.format(module, e))
@@ -65,7 +67,6 @@ test_imports = check_imports
def main():
skip_names = sys.argv[1:]
- print("Skip patterns:", skip_names)
os.environ['Y_PYTHON_IMPORT_TEST'] = ''
try:
|
Fixing ReadLine() for multi characters | @@ -129,6 +129,7 @@ bool Library_sys_io_ser_native_System_IO_Ports_SerialPort::GetLineFromRxBuffer(
if (newLineIndex == 0)
{
// found and nothing else to compare
+ index++;
break;
}
else
@@ -168,16 +169,16 @@ bool Library_sys_io_ser_native_System_IO_Ports_SerialPort::GetLineFromRxBuffer(
{
// allocate memory for the string, including the new line char(s)
// the new line char allow enough room in the buffer for for the terminator
- line = (uint8_t *)platform_malloc(index + newLineLength);
+ line = (uint8_t *)platform_malloc(index);
if (line != NULL)
{
// pop string AND new line from buffer
- ringBuffer->Pop(line, index + newLineLength);
+ ringBuffer->Pop(line, index);
// the returned string DOES NOT include the new line char(s)
// put a terminator at index 0 where the new line char(s) are, so the real string ends there
- line[index] = 0;
+ line[index - newLineLength] = 0;
}
}
}
|
Free string after usage | @@ -205,7 +205,6 @@ static bool joinListItem(VM *vm, int argCount) {
if (!IS_STRING(list->values.values[list->values.count - 1])) {
free(output);
}
- free(fullString);
pop(vm);
if (argCount == 2) {
@@ -214,6 +213,8 @@ static bool joinListItem(VM *vm, int argCount) {
push(vm, OBJ_VAL(copyString(vm, fullString, index)));
+ free(fullString);
+
return true;
}
|
GPload: change metadata query SQL to improvement performance
GPload: change metadata query SQL to improvement performance
Old query SQL may take long time if catalog is large. | @@ -1928,8 +1928,8 @@ class gpload:
WHERE d.adrelid = a.attrelid AND d.adnum = a.attnum AND a.atthasdef) as has_sequence
from pg_catalog.pg_class c join pg_catalog.pg_namespace nt on (c.relnamespace = nt.oid)
join pg_attribute a on (a.attrelid = c.oid)
- where c.relname = '%s' and nt.nspname = '%s'
- and a.attnum > 0 and a.attisdropped = 'f'
+ where a.attnum > 0 and a.attisdropped = 'f'
+ and a.attrelid = (select c.oid from pg_catalog.pg_class c join pg_catalog.pg_namespace nt on (c.relnamespace = nt.oid) where c.relname = '%s' and nt.nspname = '%s')
order by a.attnum """ % (quote_unident(self.table), quote_unident(self.schema))
count = 0
|
Enable alerts when KPH blocked by third parties | @@ -45,7 +45,7 @@ VOID PhAddDefaultSettings(
PhpAddIntegerSetting(L"EnableCycleCpuUsage", L"1");
PhpAddIntegerSetting(L"EnableInstantTooltips", L"0");
PhpAddIntegerSetting(L"EnableKph", L"0");
- PhpAddIntegerSetting(L"EnableKphWarnings", L"0");
+ PhpAddIntegerSetting(L"EnableKphWarnings", L"1");
PhpAddIntegerSetting(L"EnableLinuxSubsystemSupport", L"0");
PhpAddIntegerSetting(L"EnableHandleSnapshot", L"1");
PhpAddIntegerSetting(L"EnableNetworkResolve", L"1");
|
Increase timeout for qmcpack build in run_test_suite.sh. | #!/bin/bash
#--------------------------------------
+# WARNING: Intended for developers to use with AOMP standalone Git Hub releases.
+#
# run_test_suite.sh
# Available Options:
# --Groups--
@@ -296,7 +298,7 @@ function qmcpack(){
header QMCPACK
cd $AOMP_SRC/bin
echo "Log file at: $log_dir/qmcpack.log"
- timeout --foreground -k 20m 20m ./build_qmcpack.sh >> $log_dir/qmcpack.log 2>&1
+ timeout --foreground -k 35m 35m ./build_qmcpack.sh >> $log_dir/qmcpack.log 2>&1
build_dir=$AOMP_REPOS_TEST/qmcpack/build_AOMP_offload_real_MP_$AOMP_GPU
set +e
if [ $? -eq 0 ]; then
|
spwaterfall/example: trivial edits to example (typos, re-org) | @@ -15,10 +15,6 @@ int main()
unsigned int time = 250; // minimum time buffer
unsigned int num_samples = 20e6; // number of samples
- // create time-varying multi-path channel object
- unsigned int buf_len = 64;
- float complex buf[buf_len];
-
// create spectral waterfall object
spwaterfallcf periodogram = spwaterfallcf_create_default(nfft,time);
spwaterfallcf_print(periodogram);
@@ -41,6 +37,11 @@ int main()
msourcecf_set_frequency(gen, id_modem, -0.1*2*M_PI);
msourcecf_set_gain (gen, id_modem, 0.0f);
+ // create buffers
+ unsigned int buf_len = 64;
+ float complex buf[buf_len];
+
+ // generate signals and push through spwaterfall object
unsigned int total_samples = 0;
int state = 1;
while (total_samples < num_samples) {
|
MSR: Use `sh` compatible code to check last char | @@ -95,12 +95,14 @@ translate()
then
[ -n "$COMMAND" ] && writeBlock "$TMPFILE"
COMMAND=$(printf '%s' "$line" | grep -Eo '[^ \t].*')
- [ "${line: -1}" == '\' ] && COMMAND=$(printf '%s' "$COMMAND" | sed 's/.$//')
- while [ "${line: -1}" == '\' ];
+ printf '%s' "$line" | egrep -q '\\$' && COMMAND=$(printf '%s' "$COMMAND" | sed 's/.$//')
+ while printf '%s' "$line" | egrep -q '\\$';
do
read -r line
- if [ "${line: -1}" == '\' ]; then COMMAND=$(printf '%s\n%s' "$COMMAND" `printf '%s' "$line" | sed 's/.$//'`)
- else COMMAND=$(printf '%s\n%s\n' "$COMMAND" "$line")
+ if printf '%s' "$line" | egrep -q '\\$'; then
+ COMMAND=$(printf '%s\n%s' "$COMMAND" `printf '%s' "$line" | sed 's/.$//'`)
+ else
+ COMMAND=$(printf '%s\n%s\n' "$COMMAND" "$line")
fi
done
continue
|
lib/pty.c: remove reference to stropts.h
very obscure header file generally unsupported
closes | @@ -60,10 +60,6 @@ _gftp_ptys_open (int fdm, int fds, char *pts_name)
#elif HAVE_GRANTPT
-#if !(defined(__FreeBSD__) || defined(__NetBSD__) || defined(__APPLE__) || defined(__linux__) || defined(__GNU__))
-#include <stropts.h>
-#endif
-
char *
gftp_get_pty_impl (void)
{
|
balloon: Fix INF verification errors
The INF verification test in Win10 HLK 1703 started treating some
of the verification warnings as errors:
Section [destinationdirs] is defined multiple times
Section [sourcedisksfiles] is defined multiple times.
This commit fixes it by merging the sections into one. | @@ -27,12 +27,14 @@ PnpLockdown = 1
[DestinationDirs]
DefaultDestDir = 12
+BALLOON_Device_CoInstaller_CopyFiles = 11
[SourceDisksNames]
1 = %DiskId1%,,,""
[SourceDisksFiles]
balloon.sys = 1,,
+WdfCoInstaller$KMDFCOINSTALLERVERSION$.dll=1 ; make sure the number matches with SourceDisksNames
;*****************************************
; BALLOON Install Section
@@ -75,9 +77,6 @@ HKR,,TypesSupported,0x00010001,7
;--- BALLOON_Device Coinstaller installation ------
;
-[DestinationDirs]
-BALLOON_Device_CoInstaller_CopyFiles = 11
-
[BALLOON_Device.NT.CoInstallers]
AddReg=BALLOON_Device_CoInstaller_AddReg
CopyFiles=BALLOON_Device_CoInstaller_CopyFiles
@@ -88,9 +87,6 @@ HKR,,CoInstallers32,0x00010000, "WdfCoInstaller$KMDFCOINSTALLERVERSION$.dll,WdfC
[BALLOON_Device_CoInstaller_CopyFiles]
WdfCoInstaller$KMDFCOINSTALLERVERSION$.dll
-[SourceDisksFiles]
-WdfCoInstaller$KMDFCOINSTALLERVERSION$.dll=1 ; make sure the number matches with SourceDisksNames
-
[BALLOON_Device.NT.Wdf]
KmdfService = BALLOON, BALLOON_wdfsect
[BALLOON_wdfsect]
|
Fix alignment of custom event editor header | @@ -65,7 +65,6 @@ class CustomEventEditor extends Component {
return (
<Sidebar onMouseDown={selectSidebar}>
<SidebarColumn>
- <div>
<SidebarHeading
title={l10n("CUSTOM_EVENT")}
buttons={
@@ -81,6 +80,7 @@ class CustomEventEditor extends Component {
</DropdownButton>
}
/>
+ <div>
<FormField>
<label htmlFor="customEventName">
{l10n("FIELD_NAME")}
|
add TravisCI badge although it is not valid yet | # mruby/c
+[](https://travis-ci.com/mrubyc/mrubyc)
+
[](https://gitter.im/mrubyc/mrubyc?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
mruby/c is an another implementation of mruby.
|
Explicit dependency linking allows users to hardcode dependencies when required, rather than using host dependencies | @@ -71,3 +71,11 @@ endif ()
set(CELIX_BUNDLES_DIR ${REL_INSTALL_DIR}/share/celix/bundles)
set(CELIX_SHELL_BUNDLE ${CELIX_BUNDLES_DIR}/shell.zip)
set(CELIX_SHELL_TUI_BUNDLE ${CELIX_BUNDLES_DIR}/shell_tui.zip)
+
+include(CMakeFindDependencyMacro)
+find_dependency(ZLIB)
+find_dependency(UUID)
+find_dependency(OpenSSL)
+find_dependency(CURL)
+find_dependency(FFI)
+find_dependency(Jansson)
\ No newline at end of file
|
Add Xiaomi vibration sensor sensitivy attributes on creation | @@ -4170,6 +4170,16 @@ void DeRestPluginPrivate::addSensorNode(const deCONZ::Node *node, const SensorFi
sensorNode.addItem(DataTypeInt16, RConfigTemperature);
//sensorNode.addItem(DataTypeInt16, RConfigOffset);
}
+
+ if (sensorNode.modelId() == QLatin1String("lumi.vibration.aq1"))
+ {
+ // low: 0x15, medium: 0x0B, high: 0x01
+ ResourceItem *item = nullptr;
+ item = sensorNode.addItem(DataTypeUInt8, RConfigSensitivity);
+ item = sensorNode.addItem(DataTypeUInt8, RConfigSensitivityMax);
+ item->setValue(0x15); // low
+ item = sensorNode.addItem(DataTypeUInt8, RConfigPending);
+ }
}
else if (node->nodeDescriptor().manufacturerCode() == VENDOR_EMBER ||
node->nodeDescriptor().manufacturerCode() == VENDOR_120B)
|
sm2: fix error raise to not fail make update | @@ -313,7 +313,7 @@ int ossl_sm2_decrypt(const EC_KEY *key,
C3 = sm2_ctext->C3->data;
msg_len = sm2_ctext->C2->length;
if (*ptext_len < (size_t)msg_len) {
- SM2err(SM2_F_SM2_DECRYPT, SM2_R_BUFFER_TOO_SMALL);
+ ERR_raise(ERR_LIB_SM2, SM2_R_BUFFER_TOO_SMALL);
goto done;
}
|
artik053/nettest: enable netdb dns client
This commit is to enable netdb dns client configuration
- to fully support netdb library, dns client is needed | @@ -957,7 +957,14 @@ CONFIG_MEMCPY_INDEXED_COPY=y
# CONFIG_ARCH_BZERO is not set
CONFIG_LIBC_NETDB=y
# CONFIG_NETDB_HOSTFILE is not set
-# CONFIG_NETDB_DNSCLIENT is not set
+CONFIG_NETDB_DNSCLIENT=y
+CONFIG_NETDB_DNSCLIENT_ENTRIES=8
+CONFIG_NETDB_DNSCLIENT_NAMESIZE=32
+CONFIG_NETDB_DNSCLIENT_LIFESEC=3600
+CONFIG_NETDB_DNSCLIENT_MAXRESPONSE=512
+# CONFIG_NETDB_RESOLVCONF is not set
+CONFIG_NETDB_DNSSERVER_BY_DHCP=y
+# CONFIG_NETDB_DNSSERVER_IPv4 is not set
#
# Non-standard Library Support
|
Have "wuffs gen" skip duplicate packages | @@ -69,9 +69,17 @@ type genHelper struct {
wuffsRoot string
langs []string
affected []string
+ seen map[string]struct{}
}
func (h *genHelper) gen(dirname string, recursive bool) error {
+ if h.seen == nil {
+ h.seen = map[string]struct{}{}
+ } else if _, ok := h.seen[dirname]; ok {
+ return nil
+ }
+ h.seen[dirname] = struct{}{}
+
filenames, dirnames, err := listDir(h.wuffsRoot, dirname, recursive)
if err != nil {
return err
|
porting/riot: add MYNEWT_VAL_BLE_L2CAP_COC_MTU | #define MYNEWT_VAL_BLE_L2CAP_COC_MAX_NUM (0)
#endif
+#ifndef MYNEWT_VAL_BLE_L2CAP_COC_MTU
+#define MYNEWT_VAL_BLE_L2CAP_COC_MTU (MYNEWT_VAL_MSYS_1_BLOCK_SIZE - 8)
+#endif
+
#ifndef MYNEWT_VAL_BLE_L2CAP_JOIN_RX_FRAGS
#define MYNEWT_VAL_BLE_L2CAP_JOIN_RX_FRAGS (1)
#endif
|
JNA: Disable binding if `BUILD_SHARED` is off | @@ -12,6 +12,12 @@ if (Java_JAVAC_EXECUTABLE)
# as 9.x.x > 1.8 and 1.8.x > 1.8 and 1.9.x > 1.8
# ~~~
if ((${Java_VERSION} VERSION_GREATER "1.8.0") OR (${Java_VERSION} VERSION_EQUAL "1.8.0"))
+ if (NOT BUILD_SHARED)
+ # See also: https://travis-ci.org/sanssecours/elektra/jobs/445840045
+ exclude_binding (jna "it can only be built if `BUILD_SHARED` is enabled")
+ return ()
+ endif (NOT BUILD_SHARED)
+
if (MAVEN_EXECUTABLE) # set by find_program
add_binding (jna)
|
simplify sidebar menu | @@ -884,12 +884,12 @@ div#block-views-diagram-of-usage-block-diagram ul {
border-left: 0;
}
/* line 45, ../scss/modules/docs/_base.scss */
-.page-documentation .docs-menu .toctree-l1 > a.reference.internal::before {
+/*.page-documentation .docs-menu .toctree-l1 > a.reference.internal::before {
position: absolute;
content: '\f105';
font-family: FontAwesome;
left: 10px;
-}
+}*/
/* line 55, ../scss/modules/docs/_base.scss */
.page-documentation .docs-menu .toctree-l1.current {
border-top: 1px solid #e0e0e0;
@@ -898,20 +898,20 @@ div#block-views-diagram-of-usage-block-diagram ul {
/* line 60, ../scss/modules/docs/_base.scss */
.page-documentation .docs-menu .toctree-l1.current > a.reference.internal {
border-bottom: 1px solid #e0e0e0;
- background: #e6e6e6;
+ /*background: #e6e6e6;*/
/*color: #7929D2;*/
font-weight: bold;
}
/* line 65, ../scss/modules/docs/_base.scss */
-.page-documentation .docs-menu .toctree-l1.current > a.reference.internal::before {
+/*.page-documentation .docs-menu .toctree-l1.current > a.reference.internal::before {
position: absolute;
content: '\f107';
font-family: FontAwesome;
left: 10px;
-}
+}*/
/* line 73, ../scss/modules/docs/_base.scss */
.page-documentation .docs-menu .toctree-l1.current > ul {
- background: #e6e6e6;
+ /*background: #e6e6e6;*/
}
/* line 78, ../scss/modules/docs/_base.scss */
.page-documentation .docs-menu .toctree-l2 > a {
@@ -921,17 +921,17 @@ div#block-views-diagram-of-usage-block-diagram ul {
/* line 85, ../scss/modules/docs/_base.scss */
.page-documentation .docs-menu .toctree-l2.current > a.reference.internal {
/*color: #7929D2;*/
- background: #F6F7F8;
- padding-left: 42px;
+ /*background: #F6F7F8;*/
+ padding-left: 34px;
font-weight: bold;
}
/* line 90, ../scss/modules/docs/_base.scss */
-.page-documentation .docs-menu .toctree-l2.current > a.reference.internal::before {
+/*.page-documentation .docs-menu .toctree-l2.current > a.reference.internal::before {
position: absolute;
content: '\f107';
font-family: FontAwesome;
left: 26px;
-}
+}*/
/* line 99, ../scss/modules/docs/_base.scss */
.page-documentation .docs-menu .toctree-l3 a {
margin-left: 29px;
@@ -941,6 +941,7 @@ div#block-views-diagram-of-usage-block-diagram ul {
/* line 107, ../scss/modules/docs/_base.scss */
.page-documentation .docs-menu .toctree-l3.current > a.current {
/*color: #7929D2;*/
+ font-weight: bold;
}
/* line 2, ../scss/modules/downloads/_base.scss */
|
Fix Linux port Valgrind errors
Fix Valgrind uninitialized variables warning. | @@ -280,10 +280,14 @@ struct sigaction sigtick;
* up running on the main thread when it is resumed. */
itimer.it_value.tv_sec = 0;
itimer.it_value.tv_usec = 0;
+
+ itimer.it_interval.tv_sec = 0;
+ itimer.it_interval.tv_usec = 0;
(void)setitimer( ITIMER_REAL, &itimer, NULL );
sigtick.sa_flags = 0;
sigtick.sa_handler = SIG_IGN;
+ sigemptyset( &sigtick.sa_mask );
sigaction( SIGALRM, &sigtick, NULL );
/* Signal the scheduler to exit its loop. */
|
Clean up Gameshell section
It's the same as RPI2, without the extra RPI definitions. ;-)
(We can use ASM flags too.) | @@ -36,7 +36,8 @@ endif()
# Gameshell
if(GAMESHELL)
- add_definitions(-mcpu=cortex-a7 -mfpu=neon-vfpv4 -mfloat-abi=hard -marm)
+ add_definitions(-marm -mcpu=cortex-a7 -mfpu=neon-vfpv4 -mfloat-abi=hard)
+ set(CMAKE_ASM_FLAGS "-marm -mcpu=cortex-a7 -mfpu=neon-vfpv4 -mfloat-abi=hard")
set(ARM_DYNAREC ON)
set(LD80BITS OFF)
set(NOALIGN OFF)
|
Give a better name for struct member | @@ -105,7 +105,7 @@ typedef struct {
uint8_t MBEDTLS_PRIVATE(iv_length);
uint8_t MBEDTLS_PRIVATE(block_length);
union {
- unsigned int MBEDTLS_PRIVATE(initialised);
+ unsigned int MBEDTLS_PRIVATE(dummy);
mbedtls_cipher_context_t MBEDTLS_PRIVATE(cipher);
} MBEDTLS_PRIVATE(ctx);
} mbedtls_psa_cipher_operation_t;
|
Clarify some comments in vacuumlazy.c
Author: Justin Pryzby
Discussion: | @@ -1507,8 +1507,8 @@ lazy_scan_heap(Relation onerel, VacuumParams *params, LVRelStats *vacrelstats,
/*
* It should never be the case that the visibility map page is set
* while the page-level bit is clear, but the reverse is allowed
- * (if checksums are not enabled). Regardless, set the both bits
- * so that we get back in sync.
+ * (if checksums are not enabled). Regardless, set both bits so
+ * that we get back in sync.
*
* NB: If the heap page is all-visible but the VM bit is not set,
* we don't need to dirty the heap page. However, if checksums
@@ -1563,9 +1563,9 @@ lazy_scan_heap(Relation onerel, VacuumParams *params, LVRelStats *vacrelstats,
}
/*
- * If the all-visible page is turned out to be all-frozen but not
- * marked, we should so mark it. Note that all_frozen is only valid
- * if all_visible is true, so we must check both.
+ * If the all-visible page is all-frozen but not marked as such yet,
+ * mark it as all-frozen. Note that all_frozen is only valid if
+ * all_visible is true, so we must check both.
*/
else if (all_visible_according_to_vm && all_visible && all_frozen &&
!VM_ALL_FROZEN(onerel, blkno, &vmbuffer))
|
Subsets and Splits