message
stringlengths 6
474
| diff
stringlengths 8
5.22k
|
---|---|
ble-hal-cc26xx: fix format specifiers | @@ -697,7 +697,7 @@ advertising_rx(ble_adv_param_t *param)
LOG_INFO("connection created: conn_int: %4u, latency: %3u, channel_map: %8llX\n",
c_param->interval, c_param->latency, c_param->channel_map);
- LOG_DBG("access address: 0x%08lX\n", c_param->access_address);
+ LOG_DBG("access address: 0x%08" PRIX32 "\n", c_param->access_address);
LOG_DBG("crc0: 0x%02X\n", c_param->crc_init_0);
LOG_DBG("crc1: 0x%02X\n", c_param->crc_init_1);
LOG_DBG("crc2: 0x%02X\n", c_param->crc_init_2);
|
[doc] Fix README.md for build | @@ -96,21 +96,9 @@ We are developing the most practical and powerful platform for blockchain busine
### Build
-#### Unix, Mac
-
-```
-$ go get -d github.com/aergoio/aergo/account
-$ cd ${GOPATH}/src/github.com/aergoio/aergo
-$ cmake .
-$ make
-```
-
-#### Windows
-
```
$ go get -d github.com/aergoio/aergo/account
$ cd ${GOPATH}/src/github.com/aergoio/aergo
-$ cmake -G "Unix Makefiles" -DCMAKE_MAKE_PROGRAM=mingw32-make.exe .
$ make
```
|
gdb-server: set target configuration after client connects | @@ -242,16 +242,12 @@ int main(int argc, char** argv) {
DLOG("Chip ID is %#010x, Core ID is %#08x.\n", sl->chip_id, sl->core_id);
- state.current_memory_map = make_memory_map(sl);
-
#if defined(_WIN32)
WSADATA wsadata;
if (WSAStartup(MAKEWORD(2, 2), &wsadata) != 0) { goto winsock_error; }
#endif
- init_cache(sl);
-
do { // don't go beserk if serve() returns with error
if (serve(sl, &state)) { usleep (1 * 1000); }
@@ -1102,12 +1098,22 @@ int serve(stlink_t *sl, st_state_t *st) {
close_socket(sock);
+ uint32_t chip_id = sl->chip_id;
+
stlink_target_connect(sl, st->connect_mode);
stlink_force_debug(sl);
+ if (sl->chip_id != chip_id) {
+ WLOG("Target has changed!\n");
+ }
+
init_code_breakpoints(sl);
init_data_watchpoints(sl);
+ init_cache(sl);
+
+ st->current_memory_map = make_memory_map(sl);
+
ILOG("GDB connected.\n");
/*
|
Switch to what should be the official signing profile | @@ -34,6 +34,6 @@ jobs:
target: linux_build_container2
inputs:
command: 'sign'
- signing_profile: 'CP-459159-pgpdetached'
+ signing_profile: 'CP-450779-Pgp'
files_to_sign: '**/*.rpm;**/*.deb'
search_root: '$(ob_outputDirectory)'
|
app/utils/netcmd_netmon: Add wifi command to extract wifi info
Add wifi command to extract status and conneciton info | #include <netutils/netlib.h>
+#ifdef CONFIG_WIFI_MANAGER
+#include <wifi_manager/wifi_manager.h>
+#endif
+
/****************************************************************************
* Preprocessor Definitions
****************************************************************************/
@@ -201,8 +205,53 @@ int cmd_netmon(int argc, char **argv)
printf("Failed to fetch socket info.\n");
}
} else if (!(strncmp(argv[1], "wifi", strlen("wifi") + 1))) {
- /* Get wifi information: SIOCGETWIFI */
- printf("wifi option will be supported\n");
+#ifdef CONFIG_WIFI_MANAGER
+ wifi_manager_stats_s stats;
+ wifi_manager_info_s info;
+
+ wifi_manager_result_e res = wifi_manager_get_stats(&stats);
+ if (res != WIFI_MANAGER_SUCCESS) {
+ printf("Get Wi-Fi Manager stats failed\n");
+ return ERROR;
+ }
+ printf("\n=======================================================================\n");
+ printf("CONN CONNFAIL DISCONN RECONN SCAN SOFTAP JOIN LEFT\n");
+ printf("%-8d%-12d%-11d%-10d", stats.connect, stats.connectfail, stats.disconnect, stats.reconnect);
+ printf("%-8d%-10d%-8d%-8d\n", stats.scan, stats.softap, stats.joined, stats.left);
+ printf("=======================================================================\n");
+
+ printf("Connection INFO.\n");
+ res = wifi_manager_get_info(&info);
+ if (res != WIFI_MANAGER_SUCCESS) {
+ printf("Get Wi-Fi Manager Connection info failed\n");
+ return ERROR;
+ }
+ if (info.mode == SOFTAP_MODE) {
+ if (info.status == CLIENT_CONNECTED) {
+ printf("MODE: softap (client connected)\n");
+ } else if (info.status == CLIENT_DISCONNECTED) {
+ printf("MODE: softap (no client)\n");
+ }
+ printf("IP: %s\n", info.ip4_address);
+ printf("SSID: %s\n", info.ssid);
+ printf("MAC %02X:%02X:%02X:%02X:%02X:%02X\n", info.mac_address[0], info.mac_address[1], info.mac_address[2], info.mac_address[3], info.mac_address[4], info.mac_address[5]);
+ } else if (info.mode == STA_MODE) {
+ if (info.status == AP_CONNECTED) {
+ printf("MODE: station (connected)\n");
+ printf("IP: %s\n", info.ip4_address);
+ printf("SSID: %s\n", info.ssid);
+ printf("rssi: %d\n", info.rssi);
+ } else if (info.status == AP_DISCONNECTED) {
+ printf("MODE: station (disconnected)\n");
+ }
+ printf("MAC %02X:%02X:%02X:%02X:%02X:%02X\n", info.mac_address[0], info.mac_address[1], info.mac_address[2], info.mac_address[3], info.mac_address[4], info.mac_address[5]);
+ } else {
+ printf("STATE: NONE\n");
+ }
+ printf("=======================================================================\n");
+#else
+ printf("Wi-Fi Manager is not enabled\n");
+#endif
} else {
#ifdef CONFIG_NET_STATS
struct netmon_netdev_stats stats = {{0,}, 0, 0, 0, 0};
@@ -215,7 +264,8 @@ int cmd_netmon(int argc, char **argv)
if (!ret) {
print_devstats(&stats);
} else {
- printf("No such an option or device interface\n");
+ printf("No device interface %s\n", intf);
+ return ERROR;
}
#else
printf("No such an option\n");
|
Fix http_status_text in http1.1 http-resp events without Reason-Phrase. | @@ -708,7 +708,9 @@ doHttp1Header(protocol_info *proto)
// point past the status code
char st[strlen(stext)];
strncpy(st, stext, strlen(stext));
- char *status_str = strtok_r(st, "\r", &savea);
+ char *status_str = strtok_r(st, "\r\n", &savea);
+ // if no Reason-Phrase is provided, st will not be equal to status_str
+ if (st != status_str) status_str = "";
H_ATTRIB(fields[hreport.ix], "http_status_text", status_str, 1);
HTTP_NEXT_FLD(hreport.ix);
|
crypto: fix init dependency | @@ -163,12 +163,13 @@ crypto_openssl_init (vlib_main_t * vm)
time_t t;
pid_t pid;
- u32 eidx = vnet_crypto_register_engine (vm, "openssl", 50, "OpenSSL");
clib_error_t *error;
if ((error = vlib_call_init_function (vm, vnet_crypto_init)))
return error;
+ u32 eidx = vnet_crypto_register_engine (vm, "openssl", 50, "OpenSSL");
+
#define _(a, b) \
vnet_crypto_register_ops_handler (vm, eidx, VNET_CRYPTO_OP_##a##_ENC, \
openssl_ops_enc_##a); \
|
More %kthx adaptation. | ['+' (rune lus %ktls expb)]
['&' (rune pad %ktpd expa)]
['~' (rune sig %ktsg expa)]
- ['=' (rune tis %ktts expg)]
+ ['=' (rune tis %kthx expj)]
['#' (rune hax %kthx expj)]
['?' (rune wut %ktwt expa)]
['%' (rune cen %ktcn expa)]
++ hank (most muck loaf) :: gapped hoons
++ hunk (most muck loan) :: gapped specs
++ lore %+ sear
- |=(=hoon ~(hind ap hoon))
+ |= =hoon
+ =+ ~(hind ap hoon)
+ ~? =(~ -) [%bad-lore hoon]
+ -
loaf
++ loaf ?:(tol tall wide) :: tall/wide hoon
++ loan ?:(tol till wyde) :: tall/wide spec
++ expg |.(;~(gunk sym loaf)) :: term and hoon
++ exph |.((butt ;~(gunk rope rick))) :: wing, [spec hoon]s
++ expi |.((butt ;~(gunk loaf hank))) :: one or more hoons
- ++ expj |.((butt ;~(gunk lore loaf))) :: rind and hoon
+ ++ expj |.(;~(gunk lore loaf)) :: rind and hoon
++ expk |.(;~(gunk loaf ;~(plug loaf (easy ~)))) :: list of two hoons
++ expl |.(;~(gunk sym loaf loaf)) :: term, two hoons
++ expm |.((butt ;~(gunk rope loaf rick))) :: several [spec hoon]s
|
move MatchStats to only SummaryAssemblyReportWriter | @@ -72,8 +72,6 @@ namespace ebi
{
}
-
- MatchStats match_stats;
};
class SummaryAssemblyReportWriter : public AssemblyReportWriter
@@ -105,6 +103,8 @@ namespace ebi
match_stats.add_match_result(false);
}
+ private:
+ MatchStats match_stats;
};
class ValidAssemblyReportWriter : public AssemblyReportWriter
|
Add AgentWeeklyPuzzle
Also known as Faux Hollows | @@ -4177,6 +4177,10 @@ classes:
vtbls:
- ea: 0x141937CF0
base: Client::UI::Agent::AgentInterface
+ Client::UI::Agent::AgentWeeklyPuzzle:
+ vtbls:
+ - ea: 0x141937D80
+ base: Client::UI::Agent::AgentInterface
Client::UI::Agent::AgentDeepDungeonMenu:
vtbls:
- ea: 0x141935D70
|
Knock down retries. | @@ -91,8 +91,8 @@ class HTTPException(Exception):
DEFAULT_CONNECT_TIMEOUT = 30
DEFAULT_READ_TIMEOUT = 120
DEFAULT_TIMEOUT = (DEFAULT_CONNECT_TIMEOUT, DEFAULT_READ_TIMEOUT)
-MAX_CONNECT_RETRIES = 10
-MAX_READ_RETRIES = 10
+MAX_CONNECT_RETRIES = 5
+MAX_READ_RETRIES = 3
DEFAULT_RETRIES = (MAX_CONNECT_RETRIES, MAX_READ_RETRIES)
MAX_REDIRECTS = 0
DEFAULT_BACKOFF_FACTOR = 0.2
|
coverity fix NULL dereference | @@ -327,10 +327,11 @@ static int test_X509_cmp_timeframe(void)
ASN1_TIME *asn1_before = ASN1_TIME_adj(NULL, now, -1, 0);
ASN1_TIME *asn1_after = ASN1_TIME_adj(NULL, now, 1, 0);
X509_VERIFY_PARAM *vpm = X509_VERIFY_PARAM_new();
- int res;
+ int res = 0;
- res = vpm != NULL
- && test_X509_cmp_timeframe_vpm(NULL, asn1_before, asn1_mid, asn1_after)
+ if (vpm == NULL)
+ goto finish;
+ res = test_X509_cmp_timeframe_vpm(NULL, asn1_before, asn1_mid, asn1_after)
&& test_X509_cmp_timeframe_vpm(vpm, asn1_before, asn1_mid, asn1_after);
X509_VERIFY_PARAM_set_time(vpm, now);
@@ -340,6 +341,7 @@ static int test_X509_cmp_timeframe(void)
&& test_X509_cmp_timeframe_vpm(vpm, asn1_before, asn1_mid, asn1_after);
X509_VERIFY_PARAM_free(vpm);
+finish:
ASN1_TIME_free(asn1_mid);
ASN1_TIME_free(asn1_before);
ASN1_TIME_free(asn1_after);
|
Rework build: Windows dependency building fix
One variable misssing
Fixes | @@ -613,6 +613,7 @@ $res: $deps
EOF
}
my $obj = platform->obj($args{obj});
+ my $dep = platform->dep($args{obj});
if ($srcs[0] =~ /\.asm$/) {
return <<"EOF";
$obj: $deps
|
Fix sign comparison warnings in uiplib.c
Push the variables around and align types
so we compare variables of the same signedness. | @@ -165,18 +165,14 @@ uiplib_ipaddr_print(const uip_ipaddr_t *addr)
int
uiplib_ipaddr_snprint(char *buf, size_t size, const uip_ipaddr_t *addr)
{
- uint16_t a;
- unsigned int i;
- int f;
- int n = 0;
+ unsigned int n = 0;
if(size == 0) {
return 0;
}
if(addr == NULL) {
- n = snprintf(buf, size, "(NULL IP addr)");
- return n;
+ return snprintf(buf, size, "(NULL IP addr)");
} else if(ip64_addr_is_ipv4_mapped_addr(addr)) {
/*
* Printing IPv4-mapped addresses is done according to RFC 4291 [1]
@@ -192,12 +188,12 @@ uiplib_ipaddr_snprint(char *buf, size_t size, const uip_ipaddr_t *addr)
*
* [1] https://tools.ietf.org/html/rfc4291#page-4
*/
- n = snprintf(buf, size, "::FFFF:%u.%u.%u.%u", addr->u8[12],
+ return snprintf(buf, size, "::FFFF:%u.%u.%u.%u", addr->u8[12],
addr->u8[13], addr->u8[14], addr->u8[15]);
- return n;
} else {
- for(i = 0, f = 0; i < sizeof(uip_ipaddr_t); i += 2) {
- a = (addr->u8[i] << 8) + addr->u8[i + 1];
+ int f = 0;
+ for(size_t i = 0; i < sizeof(uip_ipaddr_t); i += 2) {
+ uint16_t a = (addr->u8[i] << 8) + addr->u8[i + 1];
if(a == 0 && f >= 0) {
if(f++ == 0) {
n += snprintf(buf+n, size-n, "::");
|
Allow blacklist for unix too | @@ -36,6 +36,7 @@ vklayer_files = files(
'config.cpp',
'gpu.cpp',
'vulkan.cpp',
+ 'blacklist.cpp',
)
opengl_files = []
if ['windows', 'mingw'].contains(host_machine.system())
@@ -43,7 +44,6 @@ if ['windows', 'mingw'].contains(host_machine.system())
'file_utils_win32.cpp',
'cpu_win32.cpp',
'nvapi.cpp',
- 'blacklist.cpp',
'win/dxgi.cpp',
'win/main.cpp',
'win/kiero.cpp',
|
quic: support the crypto_handshake probe | @@ -118,6 +118,7 @@ struct quic_event_t {
u64 limit;
u64 off;
u32 is_unidirectional;
+ u32 ret;
};
BPF_PERF_OUTPUT(events);
@@ -230,6 +231,22 @@ int trace_crypto_decrypt(struct pt_regs *ctx) {
return 0;
}
+int trace_crypto_handshake(struct pt_regs *ctx) {
+ void *pos = NULL;
+ struct quic_event_t event = {};
+ struct st_quicly_conn_t conn = {};
+ sprintf(event.type, "crypto_handshake");
+
+ bpf_usdt_readarg(1, ctx, &pos);
+ bpf_probe_read(&conn, sizeof(conn), pos);
+ event.master_conn_id = conn.master_id;
+ bpf_usdt_readarg(2, ctx, &event.ret);
+
+ if (events.perf_submit(ctx, &event, sizeof(event)) < 0)
+ bpf_trace_printk("failed to perf_submit\\n");
+
+ return 0;
+}
int trace_packet_prepare(struct pt_regs *ctx) {
void *pos = NULL;
@@ -601,6 +618,8 @@ def handle_quic_event(cpu, data, size):
build_quic_trace_result(res, ev, ["new_version"])
elif ev.type == "crypto_decrypt":
build_quic_trace_result(res, ev, ["packet_num", "len"])
+ elif ev.type == "crypto_handshake":
+ build_quic_trace_result(res, ev, ["ret"])
elif ev.type == "packet_prepare":
build_quic_trace_result(res, ev, ["first_octet", "dcid"])
elif ev.type == "packet_commit":
@@ -693,6 +712,7 @@ if sys.argv[1] == "quic":
u.enable_probe(probe="idle_timeout", fn_name="trace_idle_timeout")
u.enable_probe(probe="stateless_reset_receive", fn_name="trace_stateless_reset_receive")
u.enable_probe(probe="crypto_decrypt", fn_name="trace_crypto_decrypt")
+ u.enable_probe(probe="crypto_handshake", fn_name="trace_crypto_handshake")
u.enable_probe(probe="packet_prepare", fn_name="trace_packet_prepare")
u.enable_probe(probe="packet_commit", fn_name="trace_packet_commit")
u.enable_probe(probe="packet_acked", fn_name="trace_packet_acked")
|
nimble/ll: Fix adv macros
Use parentheses around macro parameters to avoid issue when expanding
macro. Also some macros uses "advsm" instead of "_advsm" parameter. | @@ -193,19 +193,23 @@ struct ble_ll_adv_sm
#define BLE_LL_ADV_SM_FLAG_CONN_RSP_TXD_ERR 0x8000
#define ADV_DATA_LEN(_advsm) \
- ((_advsm->adv_data) ? OS_MBUF_PKTLEN(advsm->adv_data) : 0)
+ (((_advsm)->adv_data) ? OS_MBUF_PKTLEN((_advsm)->adv_data) : 0)
#define SCAN_RSP_DATA_LEN(_advsm) \
- ((_advsm->scan_rsp_data) ? OS_MBUF_PKTLEN(advsm->scan_rsp_data) : 0)
-#define AUX_DATA_LEN(_advsm) \
- (*(_advsm->aux_data) ? OS_MBUF_PKTLEN(*advsm->aux_data) : 0)
+ (((_advsm)->scan_rsp_data) ? OS_MBUF_PKTLEN((_advsm)->scan_rsp_data) : 0)
-#define AUX_CURRENT(_advsm) (&(_advsm->aux[_advsm->aux_index]))
-#define AUX_NEXT(_advsm) (&(_advsm->aux[_advsm->aux_index ^ 1]))
+#define AUX_CURRENT(_advsm) \
+ (&((_advsm)->aux[(_advsm)->aux_index]))
+#define AUX_NEXT(_advsm) \
+ (&((_advsm)->aux[(_advsm)->aux_index ^ 1]))
+#define AUX_DATA_LEN(_advsm) \
+ (*((_advsm)->aux_data) ? OS_MBUF_PKTLEN(*(_advsm)->aux_data) : 0)
-#define SYNC_CURRENT(_advsm) (&(_advsm->periodic_sync[_advsm->periodic_sync_index]))
-#define SYNC_NEXT(_advsm) (&(_advsm->periodic_sync[_advsm->periodic_sync_index ^ 1]))
+#define SYNC_CURRENT(_advsm) \
+ (&((_advsm)->periodic_sync[(_advsm)->periodic_sync_index]))
+#define SYNC_NEXT(_advsm) \
+ (&((_advsm)->periodic_sync[(_advsm)->periodic_sync_index ^ 1]))
#define SYNC_DATA_LEN(_advsm) \
- (_advsm->periodic_adv_data ? OS_MBUF_PKTLEN(advsm->periodic_adv_data) : 0)
+ ((_advsm)->periodic_adv_data ? OS_MBUF_PKTLEN((_advsm)->periodic_adv_data) : 0)
/* The advertising state machine global object */
struct ble_ll_adv_sm g_ble_ll_adv_sm[BLE_ADV_INSTANCES];
|
patch-check: shfmt
shfmt is expected to be installed along with go.
GO111MODULE=on go install mvdan.cc/sh/v3/cmd/shfmt@latest | @@ -36,6 +36,7 @@ details on the presubmit API built into depot_tools.
import subprocess2
USE_PYTHON3 = True
+_BASH_INDENTATION = "2"
_INCLUDE_BASH_FILES_ONLY = [r".*\.sh$"]
_INCLUDE_MAN_FILES_ONLY = [r"man/.+\.1$"]
_LIBWEBP_MAX_LINE_LENGTH = 80
@@ -75,7 +76,24 @@ def _RunShellCheckCmd(input_api, output_api, bash_file):
cmd = ["shellcheck", "-x", "-oall", "-sbash", bash_file]
name = "Check %s file." % bash_file
start = input_api.time.time()
- subprocess2.communicate(["shellcheck", "--version"])
+ output, rc = subprocess2.communicate(
+ cmd, stdout=None, stderr=subprocess2.PIPE, universal_newlines=True)
+ duration = input_api.time.time() - start
+ if rc == 0:
+ return output_api.PresubmitResult("%s\n%s (%4.2fs)\n" %
+ (name, " ".join(cmd), duration))
+ return output_api.PresubmitError("%s\n%s (%4.2fs) failed\n%s" %
+ (name, " ".join(cmd), duration, output[1]))
+
+
+def _RunShfmtCheckCmd(input_api, output_api, bash_file):
+ """shfmt command wrapper."""
+ cmd = [
+ "shfmt", "-i", _BASH_INDENTATION, "-bn", "-ci", "-sr", "-kp", "-d",
+ bash_file
+ ]
+ name = "Check %s file." % bash_file
+ start = input_api.time.time()
output, rc = subprocess2.communicate(
cmd, stdout=None, stderr=subprocess2.PIPE, universal_newlines=True)
duration = input_api.time.time() - start
@@ -122,28 +140,36 @@ def _CommonChecks(input_api, output_api):
check_clang_format=False,
check_python=True,
result_factory=output_api.PresubmitError))
- return results
-
-
-def CheckChangeOnUpload(input_api, output_api):
- results = []
- results.extend(_CommonChecks(input_api, output_api))
results.extend(
_RunCmdOnCheckedFiles(input_api, output_api, _RunManCmd,
_INCLUDE_MAN_FILES_ONLY))
+
+ # Binaries shellcheck and shfmt are not installed in depot_tools.
+ # Installation is needed
+ try:
+ subprocess2.communicate(["shellcheck", "--version"])
results.extend(
_RunCmdOnCheckedFiles(input_api, output_api, _RunShellCheckCmd,
_INCLUDE_BASH_FILES_ONLY))
+ print("shfmt")
+ subprocess2.communicate(["shfmt", "-version"])
+ results.extend(
+ _RunCmdOnCheckedFiles(input_api, output_api, _RunShfmtCheckCmd,
+ _INCLUDE_BASH_FILES_ONLY))
+ except OSError as os_error:
+ results.append(
+ output_api.PresubmitPromptWarning(
+ '%s\nPlease install missing binaries locally.' % os_error.args[0]))
+ return results
+
+
+def CheckChangeOnUpload(input_api, output_api):
+ results = []
+ results.extend(_CommonChecks(input_api, output_api))
return results
def CheckChangeOnCommit(input_api, output_api):
results = []
results.extend(_CommonChecks(input_api, output_api))
- results.extend(
- _RunCmdOnCheckedFiles(input_api, output_api, _RunManCmd,
- _INCLUDE_MAN_FILES_ONLY))
- results.extend(
- _RunCmdOnCheckedFiles(input_api, output_api, _RunShellCheckCmd,
- _INCLUDE_BASH_FILES_ONLY))
return results
|
attempts at fixing build errors on foreign targets | /* this removes the name "unquote" */
#endif
-#ifndef WITH_C_LOADER
- #if WITH_GCC && (!__MINGW32__) && (!__CYGWIN__)
- #define WITH_C_LOADER 1
- /* (load file.so [e]) looks for (e 'init_func) and if found, calls it as the shared object init function.
- * If WITH_SYSTEM_EXTRAS is 0, the caller needs to supply system and delete-file so that cload.scm works.
- */
- #else
+/* #ifndef WITH_C_LOADER */
+/* #if WITH_GCC && (!__MINGW32__) && (!__CYGWIN__) */
+/* #define WITH_C_LOADER 1 */
+/* /\* (load file.so [e]) looks for (e 'init_func) and if found, calls it as the shared object init function. */
+/* * If WITH_SYSTEM_EXTRAS is 0, the caller needs to supply system and delete-file so that cload.scm works. */
+/* *\/ */
+/* #else */
+/* #define WITH_C_LOADER 0 */
+/* /\* I think dlopen et al are available in MS C, but I have no way to test them; see load_shared_object below *\/ */
+/* #endif */
+/* #endif */
#define WITH_C_LOADER 0
- /* I think dlopen et al are available in MS C, but I have no way to test them; see load_shared_object below */
- #endif
-#endif
#ifndef WITH_HISTORY
#define WITH_HISTORY 0
#endif
#ifdef _MSC_VER
- #define noreturn _Noreturn /* deprecated in C23 */
+ #define noreturn [[noreturn]] /* deprecated in C23 */
#else
#define noreturn __attribute__((noreturn))
/* this is ok in gcc/g++/clang and tcc; pure attribute is rarely applicable here, and does not seem to be helpful (maybe safe_strlen) */
#define MS_WINDOWS 0
#endif
-#if defined(_MSC_VER) || defined(__MINGW32__)
- #define Jmp_Buf jmp_buf
- #define SetJmp(A, B) setjmp(A)
- #define LongJmp(A, B) longjmp(A, B)
-#else
+#if defined(__GNUC__)
#define Jmp_Buf sigjmp_buf
#define SetJmp(A, B) sigsetjmp(A, B)
#define LongJmp(A, B) siglongjmp(A, B)
* In one case, the sigsetjmp version runs in 24 seconds, but the setjmp version takes 10 seconds, and
* yet callgrind says there is almost no difference? I removed setjmp from s7_optimize.
*/
+#elif defined(_MSC_VER) || defined(__MINGW32__)
+ #define Jmp_Buf jmp_buf
+ #define SetJmp(A, B) setjmp(A)
+ #define LongJmp(A, B) longjmp(A, B)
#endif
#if (!MS_WINDOWS)
@@ -12987,7 +12988,7 @@ double s7_round(double number) {return((number < 0.0) ? ceil(number - 0.5) : flo
static s7_complex catanh(s7_complex z) {return(clog((1.0 + z) / (1.0 - z)) / 2.0);}
#else
-#if (!defined(__FreeBSD__)) || (__FreeBSD__ < 12)
+#if (!defined(__FreeBSD__)) || (__FreeBSD__ < 12) || defined(__ANDROID__)
static s7_complex clog(s7_complex z) {return(log(fabs(cabs(z))) + carg(z) * _Complex_I);}
static s7_complex cpow(s7_complex x, s7_complex y)
{
|
Add Windows compiler Arch detection and copy dll accordingly. | @@ -291,13 +291,25 @@ $(wildcard documentation/extra_files/*.*) \
LICENSE.txt \
README.pdf \
-# pthreadGC-3.dll is required for Windows installation. It can be found in
-# the MinGW directory (usually C:\MinGW\bin) directory and should be
+# "libwinpthread-1.dll" is required for Windows installation when compiling with Msys2.
+# It can be found in the MinGW directory (usually "C:\msys64\mingw64\bin" for 64bit builds
+# or "C:\msys64\mingw32\bin" for 32bit builds) directory and should be
# copied to the current directory before installation or packaging.
+# We use $(MINGW_CHOST) for compiler Arch detection. (not tested for cross-compiling).
+#
+# "pthreadGC-3.dll" and "libgcc_s_dw2-1.dll" need to be copied if compiling with Msys1.
+# They are copied just in case.
+#
ifeq (MINGW,$(findstring MINGW,$(uname)))
+ ifeq ($(MINGW_CHOST), i686-w64-mingw32)
+ datafiles += maintenance/windows_dll/msys2-32/libwinpthread-1.dll
datafiles += maintenance/windows_dll/pthreadGC-3.dll
datafiles += maintenance/windows_dll/libgcc_s_dw2-1.dll
+ else
+ datafiles += maintenance/windows_dll/msys2-64/libwinpthread-1.dll
+ endif
+
endif
### pd-lib-builder ######################################################
|
SDL player sound fix | @@ -66,13 +66,13 @@ s32 runCart(void* cart, s32 size)
.userdata = NULL,
};
- audioDevice = SDL_OpenAudioDevice(NULL, 0, &want, &audioSpec, SDL_AUDIO_ALLOW_ANY_CHANGE);
+ audioDevice = SDL_OpenAudioDevice(NULL, 0, &want, &audioSpec, SDL_AUDIO_ALLOW_FREQUENCY_CHANGE | SDL_AUDIO_ALLOW_FORMAT_CHANGE | SDL_AUDIO_ALLOW_SAMPLES_CHANGE);
SDL_BuildAudioCVT(&cvt, want.format, want.channels, audioSpec.freq, audioSpec.format, audioSpec.channels, audioSpec.freq);
if (cvt.needed)
{
- cvt.len = audioSpec.freq * sizeof(s16) / TIC80_FRAMERATE;
+ cvt.len = audioSpec.freq * audioSpec.channels * sizeof(s16) / TIC80_FRAMERATE;
cvt.buf = SDL_malloc(cvt.len * cvt.len_mult);
}
}
|
Update windows drivers, add LCUI_Exit() and LCUI_Paint event | @@ -136,6 +136,7 @@ static void WinSurface_ExecDestroy( LCUI_Surface surface )
ReleaseDC( surface->hwnd, surface->hdc_client );
}
}
+ DestroyWindow( surface->hwnd );
surface->hwnd = NULL;
surface->fb_bmp = NULL;
surface->hdc_fb = NULL;
|
Fix download links on website | @@ -36,7 +36,7 @@ const DownloadLink = ({ arch }) => {
return (
<li>
<i className={`inline-image fa ${icon}`}></i>
- <Link to={`https://github.com/premake/premake-core/releases/download/v${LATEST_VERSION}/premake-${LATEST_VERSION}-${filename}`}>
+ <Link to={`https://github.com/premake/premake-core/releases/download/v${LATEST_VERSION}/premake5-v${LATEST_VERSION}-${filename}`}>
<b>{label}</b>
</Link>
</li>
|
x509_vfy.c: Improve a couple of internally documenting comments | @@ -356,8 +356,8 @@ static int check_issued(ossl_unused X509_STORE_CTX *ctx, X509 *x, X509 *issuer)
return 0;
}
-/*
- * Alternative lookup method: look from a STACK stored in other_ctx.
+/*-
+ * Alternative get_issuer method: look up from a STACK_OF(X509) in other_ctx.
* Returns -1 on internal error.
*/
static int get_issuer_sk(X509 **issuer, X509_STORE_CTX *ctx, X509 *x)
@@ -368,7 +368,10 @@ static int get_issuer_sk(X509 **issuer, X509_STORE_CTX *ctx, X509 *x)
return 0;
}
-/* Returns NULL on internal error (such as out of memory) */
+/*-
+ * Alternative lookup method: look from a STACK stored in other_ctx.
+ * Returns NULL on internal error (such as out of memory).
+ */
static STACK_OF(X509) *lookup_certs_sk(X509_STORE_CTX *ctx,
const X509_NAME *nm)
{
@@ -834,7 +837,7 @@ static int check_trust(X509_STORE_CTX *ctx, int num_untrusted)
for (i = num_untrusted; i < num; i++) {
x = sk_X509_value(ctx->chain, i);
trust = X509_check_trust(x, ctx->param->trust, 0);
- /* If explicitly trusted return trusted */
+ /* If explicitly trusted (so not neutral nor rejected) return trusted */
if (trust == X509_TRUST_TRUSTED)
goto trusted;
if (trust == X509_TRUST_REJECTED)
@@ -1816,7 +1819,7 @@ static int internal_verify(X509_STORE_CTX *ctx)
}
}
- /* in addition to RFC 5280, do also for trusted (root) cert */
+ /* In addition to RFC 5280 requirements do also for trust anchor cert */
/* Calls verify callback as needed */
if (!ossl_x509_check_cert_time(ctx, xs, n))
return 0;
@@ -2451,8 +2454,8 @@ int X509_STORE_CTX_init(X509_STORE_CTX *ctx, X509_STORE *store, X509 *x509,
}
/*
- * Set alternative lookup method: just a STACK of trusted certificates. This
- * avoids X509_STORE nastiness where it isn't needed.
+ * Set alternative get_issuer method: just from a STACK of trusted certificates.
+ * This avoids the complexity of X509_STORE where it is not needed.
*/
void X509_STORE_CTX_set0_trusted_stack(X509_STORE_CTX *ctx, STACK_OF(X509) *sk)
{
|
libhfuzz: remove inline to export symbols | #include "instrument.h"
-inline int hfuzz_strcmp(const char *s1, const char *s2, void *addr)
+int hfuzz_strcmp(const char *s1, const char *s2, void *addr)
{
unsigned int v = 0;
@@ -18,7 +18,7 @@ inline int hfuzz_strcmp(const char *s1, const char *s2, void *addr)
return (s1[i] - s2[i]);
}
-inline int hfuzz_strcasecmp(const char *s1, const char *s2, void *addr)
+int hfuzz_strcasecmp(const char *s1, const char *s2, void *addr)
{
unsigned int v = 0;
@@ -33,7 +33,7 @@ inline int hfuzz_strcasecmp(const char *s1, const char *s2, void *addr)
return (tolower(s1[i]) - tolower(s2[i]));
}
-inline int hfuzz_strncmp(const char *s1, const char *s2, size_t n, void *addr)
+int hfuzz_strncmp(const char *s1, const char *s2, size_t n, void *addr)
{
if (n == 0) {
return 0;
@@ -57,7 +57,7 @@ inline int hfuzz_strncmp(const char *s1, const char *s2, size_t n, void *addr)
return ret;
}
-inline int hfuzz_strncasecmp(const char *s1, const char *s2, size_t n, void *addr)
+int hfuzz_strncasecmp(const char *s1, const char *s2, size_t n, void *addr)
{
if (n == 0) {
return 0;
@@ -81,7 +81,7 @@ inline int hfuzz_strncasecmp(const char *s1, const char *s2, size_t n, void *add
return ret;
}
-inline char *hfuzz_strstr(const char *haystack, const char *needle, void *addr)
+char *hfuzz_strstr(const char *haystack, const char *needle, void *addr)
{
size_t needle_len = strlen(needle);
for (size_t i = 0; haystack[i]; i++) {
@@ -92,7 +92,7 @@ inline char *hfuzz_strstr(const char *haystack, const char *needle, void *addr)
return NULL;
}
-inline char *hfuzz_strcasestr(const char *haystack, const char *needle, void *addr)
+char *hfuzz_strcasestr(const char *haystack, const char *needle, void *addr)
{
size_t needle_len = strlen(needle);
for (size_t i = 0; haystack[i]; i++) {
@@ -103,7 +103,7 @@ inline char *hfuzz_strcasestr(const char *haystack, const char *needle, void *ad
return NULL;
}
-inline int hfuzz_memcmp(const void *m1, const void *m2, size_t n, void *addr)
+int hfuzz_memcmp(const void *m1, const void *m2, size_t n, void *addr)
{
if (n == 0) {
return 0;
|
extmod/modbuiltins/Control: add pid get/set | @@ -64,9 +64,44 @@ STATIC mp_obj_t builtins_Control_limits(size_t n_args, const mp_obj_t *pos_args,
}
STATIC MP_DEFINE_CONST_FUN_OBJ_KW(builtins_Control_limits_obj, 0, builtins_Control_limits);
+// pybricks.builtins.Control.pid
+STATIC mp_obj_t builtins_Control_pid(size_t n_args, const mp_obj_t *pos_args, mp_map_t *kw_args) {
+
+ PB_PARSE_ARGS_METHOD(n_args, pos_args, kw_args,
+ builtins_Control_obj_t, self,
+ PB_ARG_DEFAULT_NONE(kp),
+ PB_ARG_DEFAULT_NONE(ki),
+ PB_ARG_DEFAULT_NONE(kd)
+ );
+
+ // Read current values
+ int16_t _kp, _ki, _kd;
+ pbio_control_settings_get_pid(&self->control->settings, &_kp, &_ki, &_kd);
+
+ // If all given values are none, return current values
+ if (kp == mp_const_none && ki == mp_const_none && kd == mp_const_none) {
+ mp_obj_t ret[3];
+ ret[0] = mp_obj_new_int(_kp);
+ ret[1] = mp_obj_new_int(_ki);
+ ret[2] = mp_obj_new_int(_kd);
+ return mp_obj_new_tuple(3, ret);
+ }
+
+ // Set user settings
+ _kp = pb_obj_get_default_int(kp, _kp);
+ _ki = pb_obj_get_default_int(ki, _ki);
+ _kd = pb_obj_get_default_int(kd, _kd);
+
+ pbio_control_settings_set_pid(&self->control->settings, _kp, _ki, _kd);
+
+ return mp_const_none;
+}
+STATIC MP_DEFINE_CONST_FUN_OBJ_KW(builtins_Control_pid_obj, 0, builtins_Control_pid);
+
// dir(pybricks.builtins.Control)
STATIC const mp_rom_map_elem_t builtins_Control_locals_dict_table[] = {
{ MP_ROM_QSTR(MP_QSTR_limits ), MP_ROM_PTR(&builtins_Control_limits_obj) },
+ { MP_ROM_QSTR(MP_QSTR_pid ), MP_ROM_PTR(&builtins_Control_pid_obj ) },
};
STATIC MP_DEFINE_CONST_DICT(builtins_Control_locals_dict, builtins_Control_locals_dict_table);
|
glob: add service-worker to glob | (cat 3 js-name '.js')
=+ .^(js=@t %cx :(weld home /app/landscape/js/bundle /[js-name]/js))
=+ .^(map=@t %cx :(weld home /app/landscape/js/bundle /[map-name]/map))
+ =+ .^(sw=@t %cx :(weld home /app/landscape/js/bundle /serviceworker/js))
=+ !<(=js=mime (js-tube !>(js)))
+ =+ !<(=sw=mime (js-tube !>(sw)))
=+ !<(=map=mime (map-tube !>(map)))
=/ =glob:glob
%- ~(gas by *glob:glob)
:~ /[js-name]/js^js-mime
/[map-name]/map^map-mime
+ /serviceworker/js^sw-mime
==
=/ =path /(cat 3 'glob-' (scot %uv (sham glob)))/glob
[%pass /make %agent [our.bowl %hood] %poke %drum-put !>([path (jam glob)])]~
|
common/mock/fp_sensor_mock.c: Format with clang-format
BRANCH=none
TEST=none | @@ -59,9 +59,8 @@ int fp_sensor_acquire_image_with_mode(uint8_t *image_data, int mode)
return mock_ctrl_fp_sensor.fp_sensor_acquire_image_with_mode_return;
}
-int fp_finger_match(void *templ, uint32_t templ_count,
- uint8_t *image, int32_t *match_index,
- uint32_t *update_bitmap)
+int fp_finger_match(void *templ, uint32_t templ_count, uint8_t *image,
+ int32_t *match_index, uint32_t *update_bitmap)
{
return mock_ctrl_fp_sensor.fp_finger_match_return;
}
|
doc: fix GSG version number typo
Update to NUC GSG had a version number typ0 | @@ -43,7 +43,7 @@ complete this setup.
number of Clear Linux you are using.
#. Download the compressed Clear installer image from
- https://download.clearlinux.org/releases/261200/clear/clear-26120-installer.img.xz
+ https://download.clearlinux.org/releases/26120/clear/clear-26120-installer.img.xz
and follow the `Clear Linux installation guide
<https://clearlinux.org/documentation/clear-linux/get-started/bare-metal-install>`__
as a starting point for installing Clear Linux onto your platform. Follow the recommended
|
Review Correction: Minor Version >= 0, not 1 | @@ -47,7 +47,7 @@ clap_version_is_compatible(const clap_version_t v) {
#if defined(__cplusplus) && __cplusplus >= 201703L
// Static assert some version constraints
static_assert(CLAP_VERSION_MAJOR_DIGITS < 256 && CLAP_VERSION_MAJOR_DIGITS >= 1);
-static_assert(CLAP_VERSION_MINOR_DIGITS < 256 && CLAP_VERSION_REVISION >= 1);
+static_assert(CLAP_VERSION_MINOR_DIGITS < 256 && CLAP_VERSION_REVISION >= 0);
static_assert(CLAP_VERSION_REVISION_DIGITS < 256 && CLAP_VERSION_REVISION_DIGITS >= 0);
#endif
|
add console output for debugging | @@ -346,11 +346,13 @@ func Start(filename string) error {
// If the `scope start` command is run inside a container, we should call `ldscope --starthost`
// which will instead run `scope start` on the host
if util.InContainer() {
+ fmt.Println("before extract")
if err := extract(filename); err != nil {
return err
}
- ld := loader.ScopeLoader{Path: run.LdscopePath()}
+ fmt.Println("before ldscope --starthost")
+ ld := loader.ScopeLoader{Path: "/tmp/ldscope"}
stdoutStderr, err := ld.StartHost()
if err == nil {
log.Info().
@@ -369,6 +371,7 @@ func Start(filename string) error {
return err
}
}
+ fmt.Println("before successful return")
return nil
}
|
Log vendor options, too. | @@ -390,6 +390,9 @@ papplJobCreatePrintOptions(
papplLogJob(job, PAPPL_LOGLEVEL_DEBUG, "print-speed=%d", options->print_speed);
papplLogJob(job, PAPPL_LOGLEVEL_DEBUG, "printer-resolution=%dx%ddpi", options->printer_resolution[0], options->printer_resolution[1]);
+ for (i = 0; i < options->num_vendor; i ++)
+ papplLogJob(job, PAPPL_LOGLEVEL_DEBUG, "%s=%s", options->vendor[i].name, options->vendor[i].value);
+
pthread_rwlock_unlock(&printer->rwlock);
return (options);
|
Changed default values for dynamic adaptation and Q-Mode objects | #define LWM2M_QUEUE_MODE_CONF_INCLUDE_DYNAMIC_ADAPTATION 1
#define LWM2M_QUEUE_MODE_CONF_DEFAULT_CLIENT_AWAKE_TIME 2000
#define LWM2M_QUEUE_MODE_CONF_DEFAULT_CLIENT_SLEEP_TIME 10000
- #define LWM2M_QUEUE_MODE_CONF_DEFAULT_DYNAMIC_ADAPTATION_FLAG 1
- #define LWM2M_QUEUE_MODE_OBJECT_CONF_ENABLED 0 */
+ #define LWM2M_QUEUE_MODE_CONF_DEFAULT_DYNAMIC_ADAPTATION_FLAG 0
+ #define LWM2M_QUEUE_MODE_OBJECT_CONF_ENABLED 1 */
#endif /* PROJECT_CONF_H_ */
|
Use master branch of mobile-libs-carto | [submodule "libs-carto"]
path = libs-carto
url = https://github.com/cartodb/mobile-carto-libs
- branch = develop
+ branch = master
[submodule "libs-external"]
path = libs-external
url = https://github.com/cartodb/mobile-external-libs
|
Make a larger file, to avoid having the whole file posted before the
connection to the origin is established, effecitively disabling streaming | @@ -36,12 +36,14 @@ hosts:
EOT
+my $huge_file_size = 50 * 1024 * 1024;
+my $huge_file = create_data_file($huge_file_size);
# test that we'll proxy content-length as content-length if possible
-open(CURL, "curl -s -d \@@{[DOC_ROOT]}/halfdome.jpg --http1.1 'http://127.0.0.1:$server->{port}' 2> /dev/null | ");
+open(CURL, "curl -s -d \@$huge_file --http1.1 'http://127.0.0.1:$server->{port}' 2> /dev/null | ");
do_upstream("content-length");
close(CURL);
-open(CURL, "curl -s -d \@@{[DOC_ROOT]}/halfdome.jpg -Htransfer-encoding:chunked --http1.1 'http://127.0.0.1:$server->{port}' 2> /dev/null | ");
+open(CURL, "curl -s -d \@$huge_file -Htransfer-encoding:chunked --http1.1 'http://127.0.0.1:$server->{port}' 2> /dev/null | ");
do_upstream("transfer-encoding");
close(CURL);
|
hv: lapic: fix MISRA-C violation of potential numeric overflow
This patch fixes the MISRA-C violations in arch/x86/lapic.c, change local variable from
uint32_t to uint64_t to avoid potential numeric overflow.
Acked-by: Eddie Dong | @@ -154,15 +154,15 @@ static void restore_lapic(const struct lapic_regs *regs)
void suspend_lapic(void)
{
- uint32_t val;
+ uint64_t val;
saved_lapic_base_msr.value = msr_read(MSR_IA32_APIC_BASE);
save_lapic(&saved_lapic_regs);
/* disable APIC with software flag */
- val = (uint32_t) msr_read(MSR_IA32_EXT_APIC_SIVR);
- val = (~LAPIC_SVR_APIC_ENABLE_MASK) & val;
- msr_write(MSR_IA32_EXT_APIC_SIVR, (uint64_t) val);
+ val = msr_read(MSR_IA32_EXT_APIC_SIVR);
+ val = (~(uint64_t)LAPIC_SVR_APIC_ENABLE_MASK) & val;
+ msr_write(MSR_IA32_EXT_APIC_SIVR, val);
}
void resume_lapic(void)
|
Add KEM dupctx test | @@ -525,7 +525,7 @@ static int kem_rsa_gen_recover(void)
int ret = 0;
EVP_PKEY *pub = NULL;
EVP_PKEY *priv = NULL;
- EVP_PKEY_CTX *sctx = NULL, *rctx = NULL;
+ EVP_PKEY_CTX *sctx = NULL, *rctx = NULL, *dctx = NULL;
unsigned char secret[256] = { 0, };
unsigned char ct[256] = { 0, };
unsigned char unwrap[256] = { 0, };
@@ -536,11 +536,12 @@ static int kem_rsa_gen_recover(void)
&& TEST_ptr(sctx = EVP_PKEY_CTX_new_from_pkey(libctx, pub, NULL))
&& TEST_int_eq(EVP_PKEY_encapsulate_init(sctx, NULL), 1)
&& TEST_int_eq(EVP_PKEY_CTX_set_kem_op(sctx, "RSASVE"), 1)
- && TEST_int_eq(EVP_PKEY_encapsulate(sctx, NULL, &ctlen, NULL,
+ && TEST_ptr(dctx = EVP_PKEY_CTX_dup(sctx))
+ && TEST_int_eq(EVP_PKEY_encapsulate(dctx, NULL, &ctlen, NULL,
&secretlen), 1)
&& TEST_int_eq(ctlen, secretlen)
&& TEST_int_eq(ctlen, bits / 8)
- && TEST_int_eq(EVP_PKEY_encapsulate(sctx, ct, &ctlen, secret,
+ && TEST_int_eq(EVP_PKEY_encapsulate(dctx, ct, &ctlen, secret,
&secretlen), 1)
&& TEST_ptr(rctx = EVP_PKEY_CTX_new_from_pkey(libctx, priv, NULL))
&& TEST_int_eq(EVP_PKEY_decapsulate_init(rctx, NULL), 1)
@@ -553,6 +554,7 @@ static int kem_rsa_gen_recover(void)
EVP_PKEY_free(pub);
EVP_PKEY_free(priv);
EVP_PKEY_CTX_free(rctx);
+ EVP_PKEY_CTX_free(dctx);
EVP_PKEY_CTX_free(sctx);
return ret;
}
|
Add comment to explain how to get file size from S3 | @@ -570,6 +570,10 @@ cleanup:
return httpsStatus;
}
+ /* Ideally we could use a HEAD request to get the file size. However, performing a HEAD request
+ * with S3 requires generating a Sigv4 signature in an authorization header field. So here we use
+ * a GET request with range set to 0, then extract the file size from the "Content-Range" field in
+ * the HTTP response. */
static int _httpGetFileSize( uint32_t * pFileSize )
{
/* Return status. */
|
Removing unused local variable. | @@ -3382,7 +3382,6 @@ static void
nxt_router_response_ready_handler(nxt_task_t *task, nxt_port_recv_msg_t *msg,
void *data)
{
- size_t dump_size;
nxt_int_t ret;
nxt_buf_t *b;
nxt_unit_field_t *f;
@@ -3394,12 +3393,6 @@ nxt_router_response_ready_handler(nxt_task_t *task, nxt_port_recv_msg_t *msg,
b = msg->buf;
rc = data;
- dump_size = nxt_buf_used_size(b);
-
- if (dump_size > 300) {
- dump_size = 300;
- }
-
if (msg->size == 0) {
b = NULL;
}
|
drop stray include from math_support.c | #include "isl/val.h"
#include "isl/val_gmp.h"
-#include "isl/deprecated/int.h"
/*
* Allocated; not initialized
@@ -825,9 +824,6 @@ long long isl_val_get_num_ll(__isl_keep isl_val *v)
long long result;
mpz_init(tmp);
- // isl_val_get_num_gmp(v, tmp);
- // gmp_printf("isl_int: %Zd\n", tmp );
- // gmp_printf("isl_int hex: %Zx\n", tmp);
if (!v)
return 0;
@@ -839,8 +835,6 @@ long long isl_val_get_num_ll(__isl_keep isl_val *v)
isl_val_get_num_gmp(v, z);
if (!mpz_fits_ll(z)) {
- // gmp_printf("isl_int: %Zd\n", z);
- // gmp_printf("isl_int hex: %Zx\n", z);
printf("[pluto_math_support] numerator too large; returning largest/smallest signed 64-bit number\n");
sign = mpz_sgn(z);
mpz_clear(z);
|
fix jael after merge | +$ message :: message to her jael
$% [%nuke whos=(set ship)] :: cancel trackers
[%public-keys whos=(set ship)] :: view ethereum events
- [%public-keys-result =public-keys-result] :: tmp workaround
== ::
++$ message-result
+ $% [%public-keys-result =public-keys-result] :: public keys boon
+ ==
+$ card :: i/o action
(wind note gift) ::
:: ::
%public-keys
=. moz [[hen %give %done ~] moz]
$(tac mes)
- ::
- :: receive keys result
- :: [%public-keys-result =public-keys-result]
- ::
- %public-keys-result
- =. moz [[hen %give %done ~] moz]
- %- curd =< abet
- (public-keys:~(feel su hen our pki etn) public-keys-result.mes)
==
==
::
%- (slog tang.u.error.hin)
::TODO fail:et
+>.$
+ ::
+ [%a %boon *]
+ =+ ;; [%public-keys-result =public-keys-result] payload.hin
+ %- curd =< abet
+ (public-keys:~(feel su hen our pki etn) public-keys-result)
::
[%g %onto *]
~& [%jael-onto tea hin]
?> ?=([@ *] tea)
=* app i.tea
=/ =peer-sign ;;(peer-sign q.q.p.p.+>.hin)
- %. [hen tea app]
- =< pump
%- curd =< abet
(~(new-event su hen our pki etn) peer-sign)
==
etn/state-eth-node
==
+>(pki pki, etn etn, moz (weld (flop moz) ^moz))
- :: :: ++wind:of
- ++ pump
- |= [hen=duct =wire app=term]
- (emit [hen %pass wire %g %deal [our our] app %pump ~])
--
:: :: ++su
:::: ## relative^heavy :: subjective engine
[d %give %public-keys public-keys-result]
=/ our (slav %p i.t.i.d)
=/ who (slav %p i.t.t.i.d)
- =/ =message [%public-keys-result public-keys-result]
+ =/ =message-result [%public-keys-result public-keys-result]
%- emit
- [d %give %boon message]
+ [d %give %boon message-result]
$(yez t.yez)
::
++ get-source
?: fak.own.pki.lex
=/ cub (pit:nu:crub:crypto 512 u.who)
:^ ~ ~ %noun
- !> `deed:ames`[1 pub:ex:cub ~]
+ !> [1 pub:ex:cub ~]
::
=/ rac (clan:title u.who)
?: ?=(%pawn rac)
|
Update location of current file in run-context | (var where default-where)
+ (unless (= where "<anonymous>") (put env :current-file where))
+
# Evaluate 1 source form in a protected manner
(def lints @[])
(defn eval1 [source &opt l c]
[:source new-where]
(if (string? new-where)
+ (do
(set where new-where)
- (set where default-where))
+ (put env :current-file new-where))
+ (do
+ (set where default-where)
+ (put env :current-file nil)))
(do
(var pindex 0)
|
do not build cuda for aomp14 / amd-stg-open | @@ -61,6 +61,8 @@ elif [ "$AOMP_MAJOR_VERSION" == "14" ] ; then
AOMP_VERSION_STRING="14.0-0"
AOMP_INSTALL_DIR=${AOMP}_${AOMP_VERSION_STRING}
AOMP_PATCH_CONTROL_FILE="${AOMP_REPOS}/aomp/bin/patches/patch-control-file_14.0.txt"
+ # The openmp cuda build is broken in amd-stg-open so turn it off for now
+ AOMP_BUILD_CUDA=0
else
echo "ERROR: Invalid AOMP_MAJOR_VERSION: $AOMP_MAJOR_VERSION"
exit 1
|
[core] array-specialized buffer_caseless_compare()
specialize buffer_caseless_compare() for array.c | @@ -99,8 +99,26 @@ data_unset *array_pop(array *a) {
return du;
}
+__attribute_pure__
+static int array_caseless_compare(const char * const a, const char * const b, const size_t len) {
+ for (size_t i = 0; i < len; ++i) {
+ unsigned int ca = ((unsigned char *)a)[i];
+ unsigned int cb = ((unsigned char *)b)[i];
+ if (ca == cb) continue;
+
+ /* always lowercase for transitive results */
+ if (ca >= 'A' && ca <= 'Z') ca |= 32;
+ if (cb >= 'A' && cb <= 'Z') cb |= 32;
+
+ if (ca == cb) continue;
+ return (int)(ca - cb);
+ }
+ return 0;
+}
+
+__attribute_pure__
static int array_keycmp(const char *a, size_t alen, const char *b, size_t blen) {
- return alen < blen ? -1 : alen > blen ? 1 : buffer_caseless_compare(a, alen, b, blen);
+ return alen < blen ? -1 : alen > blen ? 1 : array_caseless_compare(a, b, blen);
}
/* returns index of element or ARRAY_NOT_FOUND
|
Fix typos in ev/go ev/select | @@ -943,7 +943,7 @@ JANET_CORE_FN(cfun_channel_pop,
JANET_CORE_FN(cfun_channel_choice,
"(ev/select & clauses)",
"Block until the first of several channel operations occur. Returns a tuple of the form [:give chan], [:take chan x], or [:close chan], where "
- "a :give tuple is the result of a write and :take tuple is the result of a write. Each clause must be either a channel (for "
+ "a :give tuple is the result of a write and :take tuple is the result of a read. Each clause must be either a channel (for "
"a channel take operation) or a tuple [channel x] for a channel give operation. Operations are tried in order, such that the first "
"clauses will take precedence over later clauses. Both and give and take operations can return a [:close chan] tuple, which indicates that "
"the specified channel was closed while waiting, or that the channel was already closed.") {
@@ -2438,7 +2438,7 @@ JANET_CORE_FN(cfun_ev_go,
"(ev/go fiber &opt value supervisor)",
"Put a fiber on the event loop to be resumed later. Optionally pass "
"a value to resume with, otherwise resumes with nil. Returns the fiber. "
- "An optional `core/channel` can be provided as well as a supervisor. When various "
+ "An optional `core/channel` can be provided as a supervisor. When various "
"events occur in the newly scheduled fiber, an event will be pushed to the supervisor. "
"If not provided, the new fiber will inherit the current supervisor.") {
janet_arity(argc, 1, 3);
|
Disable gpu_timing for now
Issue | @@ -323,6 +323,9 @@ parse_overlay_config(struct overlay_params *params,
if (env && read_cfg)
parse_overlay_env(params, env);
+ // Command buffer gets reused and timestamps cause hangs for some reason, force off for now
+ params->enabled[OVERLAY_PARAM_ENABLED_gpu_timing] = false;
+
// if font_size is used and height has not been changed from default
// increase height as needed based on font_size
|
fix noisy warnings on cmake
use QUIET option so CMake doesn't complain if we don't find SDL2
through the system means. | @@ -13,7 +13,7 @@ if(WIN32)
# then try to find SDL2 using normal means (eg. the user may have installed SDL2 using pacman on msys2)
# note we don't use REQUIRED here, because it can fail -- in which case we fall back to looking for the
# library "directly" using local files.
- find_package(SDL2)
+ find_package(SDL2 QUIET)
if(NOT SDL2_FOUND)
if(MINGW)
# Support both 32 and 64 bit builds
|
Fix nc_email to check ASN1 strings with NULL byte in the middle | @@ -714,6 +714,9 @@ static int nc_email(ASN1_IA5STRING *eml, ASN1_IA5STRING *base)
if (baseat != baseptr) {
if ((baseat - baseptr) != (emlat - emlptr))
return X509_V_ERR_PERMITTED_VIOLATION;
+ if (memchr(baseptr, 0, baseat - baseptr) ||
+ memchr(emlptr, 0, emlat - emlptr))
+ return X509_V_ERR_UNSUPPORTED_NAME_SYNTAX;
/* Case sensitive match of local part */
if (strncmp(baseptr, emlptr, emlat - emlptr))
return X509_V_ERR_PERMITTED_VIOLATION;
|
Fortran example: problem compiling grib_read_from_file.f90 | ! Get message lengths using two different interfaces
! See GRIB-292
!
-program grib_read_from_file
+program grib_read_from_file_example
use eccodes
implicit none
character(len=32) :: input_grib_file
|
Add wcsreplace() fucntion | @@ -83,6 +83,29 @@ int strtrim( char *outstr, const char *instr, const char *charlist )
return op - outstr;
}
+int wcsreplace( wchar_t *str, size_t max_len,
+ const wchar_t *substr, const wchar_t *newstr )
+{
+ size_t len, buf_len;
+ wchar_t *buf, *p, *q;
+ len = wcslen( newstr );
+ p = wcsstr( str, substr );
+ if( !p ) {
+ return 0;
+ }
+ buf_len = wcslen( str ) + len;
+ buf = malloc( buf_len * sizeof( wchar_t ) );
+ wcscpy( buf, str );
+ q = buf + (p - str);
+ wcscpy( q, newstr );
+ p += wcslen( substr );
+ q += len;
+ wcscpy( q, p );
+ wcsncpy( str, buf, max_len );
+ free( buf );
+ return 1;
+}
+
void freestrs( char **strs )
{
int i = 0;
|
herm: stop sending %hail on-connect
Client will probably want to send a %blew first anyway. By not doing any
screen refreshed in herm, we avoid doing unnecessary redraws on-connect. | ~| path
?> ?=([%session @ %view ~] path)
=* ses i.t.path
- :~ :: subscribe to the requested session
+ :: subscribe to the requested session
::
::NOTE multiple views do not result in multiple subscriptions
:: because they go over the same wire/duct
::
- (pass-session ses %view ~)
- :: tell session to refresh, so new client knows what's on screen
- ::TODO should client be responsible for this?
- ::
- (pass-session ses %hail ~)
- ==
+ [(pass-session ses %view ~)]~
::
++ on-arvo
|= [=wire =sign-arvo]
|
fcrypt: Use fences for code blocks | @@ -41,6 +41,7 @@ Thus we recommend to either mount `/tmp` to a RAM disk or specify another path a
If you encounter the following error at `kdb mount`:
+```
The command kdb mount terminated unsuccessfully with the info:
Too many plugins!
The plugin sync can't be positioned at position precommit anymore.
@@ -48,11 +49,14 @@ If you encounter the following error at `kdb mount`:
Failed because precommit with 7 is larger than 6
Please report the issue at https://issues.libelektra.org/
+```
you might want to consider disabling the sync plugin by entering:
+```sh
kdb set /sw/elektra/kdb/#0/current/plugins ""
kdb set system/sw/elektra/kdb/#0/current/plugins ""
+```
Please note that this is a workaround until a more sustainable solution is found.
@@ -74,25 +78,36 @@ Please refer to [crypto](../crypto/).
You can mount the plugin with encryption enabled like this:
+```sh
kdb mount test.ecf /t fcrypt "encrypt/key=DDEBEF9EE2DC931701338212DAF635B17F230E8D"
+```
If you only want to sign the configuration file, you can mount the plugin like this:
+```sh
kdb mount test.ecf /t fcrypt "sign/key=DDEBEF9EE2DC931701338212DAF635B17F230E8D"
+```
Both options `encrypt/key` and `sign/key` can be combined:
- kdb mount test.ecf /t fcrypt "encrypt/key=DDEBEF9EE2DC931701338212DAF635B17F230E8D,sign/key=DDEBEF9EE2DC931701338212DAF635B17F230E8D"
+```sh
+kdb mount test.ecf /t fcrypt \
+ "encrypt/key=DDEBEF9EE2DC931701338212DAF635B17F230E8D,sign/key=DDEBEF9EE2DC931701338212DAF635B17F230E8D"
+```
If you create a key under `/t`
+```sh
kdb set /t/a "hello world"
+```
you will notice that you can not read the plain text of `test.ecf` because it has been encrypted by GPG.
But you can still access `/t/a` with `kdb get`:
+```sh
kdb get /t/a
+```
If you are looking for a more interactive example, have a look at the following ASCIIcast at:
@@ -105,8 +120,10 @@ If you are looking for a more interactive example, have a look at the following
The GPG signature keys can be specified as `sign/key` directly.
If you want to use more than one key for signing, just enumerate like:
+```
sign/key/#0
sign/key/#1
+```
If more than one key is defined, every private key is used to sign the file of the backend.
@@ -116,7 +133,9 @@ Note that the signed file is stored in the internal format of GPG.
So you only see binary data when opening the signed configuration file directly.
However, you can simply display the plain text content of the file by using GPG:
+```sh
gpg2 -d signed.ecf
+```
### GPG Configuration
|
When --watch flag is passed, reload all the code upon resume.
This allows you to reload without wiping all game state!
But maybe this should be a different flag? | @@ -2156,6 +2156,11 @@ static void onConsoleResumeCommand(Console* console, const char* param)
{
commandDone(console);
+ const tic_script_config* script_config = console->tic->api.get_script_config(console->tic);
+ if (script_config->eval && console->codeLiveReload.active)
+ {
+ script_config->eval(console->tic, console->tic->cart.code.data);
+ }
console->tic->api.resume(console->tic);
resumeRunMode();
|
notification-redirects: fixing group dms | @@ -7,7 +7,9 @@ function getGroupResourceRedirect(key: string) {
if(!association || !('graph' in metadata.config)) {
return '';
}
- return `/~landscape${association.group}/resource/${metadata.config.graph}${association.resource}`;
+
+ const section = association.group === association.resource ? '/messages' : association.group;
+ return `/~landscape${section}/resource/${metadata.config.graph}${association.resource}`;
}
function getPostRedirect(key: string, segs: string[]) {
|
Add version to diagnostics window | * about dialog
*
* Copyright (C) 2010-2016 wj32
- * Copyright (C) 2017-2018 dmex
+ * Copyright (C) 2017-2020 dmex
*
* This file is part of Process Hacker.
*
@@ -179,6 +179,23 @@ FORCEINLINE ULONG PhpGetObjectTypeObjectCount(
return info.NumberOfObjects;
}
+PPH_STRING PhpGetBuildTimeDiagnostics(
+ VOID
+ )
+{
+ LARGE_INTEGER time;
+ SYSTEMTIME systemTime = { 0 };
+ PIMAGE_DOS_HEADER imageDosHeader;
+ PIMAGE_NT_HEADERS imageNtHeader;
+
+ imageDosHeader = (PIMAGE_DOS_HEADER)PhInstanceHandle; // HACK
+ imageNtHeader = (PIMAGE_NT_HEADERS)PTR_ADD_OFFSET(imageDosHeader, imageDosHeader->e_lfanew);
+ RtlSecondsSince1970ToTime(imageNtHeader->FileHeader.TimeDateStamp, &time);
+ PhLargeIntegerToLocalSystemTime(&systemTime, &time);
+
+ return PhaFormatDateTime(&systemTime);
+}
+
PPH_STRING PhGetDiagnosticsString(
VOID
)
@@ -187,6 +204,24 @@ PPH_STRING PhGetDiagnosticsString(
PhInitializeStringBuilder(&stringBuilder, 50);
+#if (PHAPP_VERSION_REVISION != 0)
+ PhAppendFormatStringBuilder(&stringBuilder,
+ L"Process Hacker\r\nVersion: %lu.%lu.%lu (%hs)\r\n",
+ PHAPP_VERSION_MAJOR,
+ PHAPP_VERSION_MINOR,
+ PHAPP_VERSION_REVISION,
+ PHAPP_VERSION_COMMIT
+ );
+ PhAppendFormatStringBuilder(&stringBuilder, L"Compiled: %s\r\n\r\n", PhpGetBuildTimeDiagnostics()->Buffer);
+#else
+ PhAppendFormatStringBuilder(&stringBuilder,
+ L"Process Hacker\r\nVersion: %lu.%lu\r\n",
+ PHAPP_VERSION_MAJOR,
+ PHAPP_VERSION_MINOR
+ );
+ PhAppendFormatStringBuilder(&stringBuilder, L"Compiled: %s\r\n\r\n", PhpGetBuildTimeDiagnostics()->Buffer);
+#endif
+
PhAppendFormatStringBuilder(&stringBuilder, L"OBJECT INFORMATION\r\n");
#define OBJECT_TYPE_COUNT(Type) PhAppendFormatStringBuilder(&stringBuilder, \
|
Fix unbounded calculation length bug. | @@ -190,7 +190,7 @@ static void compute_residuals(ScsResiduals *r, scs_int m, scs_int n) {
r->res_unbdd_p = NAN;
r->res_infeas = NAN;
if (r->ctx_tau < 0) {
- r->res_unbdd_a = SAFEDIV_POS(NORM(r->ax_s, n), -r->ctx_tau);
+ r->res_unbdd_a = SAFEDIV_POS(NORM(r->ax_s, m), -r->ctx_tau);
r->res_unbdd_p = SAFEDIV_POS(NORM(r->px, n), -r->ctx_tau);
}
if (r->bty_tau < 0) {
|
isotp_send fix bus and add slow mode | import binascii
+import time
DEBUG = False
@@ -61,7 +62,7 @@ def isotp_recv_subaddr(panda, addr, bus, sendaddr, subaddr):
# **** import below this line ****
-def isotp_send(panda, x, addr, bus=0, recvaddr=None, subaddr=None):
+def isotp_send(panda, x, addr, bus=0, recvaddr=None, subaddr=None, rate=None):
if recvaddr is None:
recvaddr = addr + 8
@@ -96,7 +97,12 @@ def isotp_send(panda, x, addr, bus=0, recvaddr=None, subaddr=None):
rr = recv(panda, 1, recvaddr, bus)[0]
panda.can_send(addr, sends[-1], 0)
else:
- panda.can_send_many([(addr, None, s, 0) for s in sends])
+ if rate is None:
+ panda.can_send_many([(addr, None, s, bus) for s in sends])
+ else:
+ for dat in sends:
+ panda.can_send(addr, dat, bus)
+ time.sleep(rate)
def isotp_recv(panda, addr, bus=0, sendaddr=None, subaddr=None):
if sendaddr is None:
|
Fix Variable
Inputs on the right side of the operator are not marked with PARAM
(which denotes a haste input). This fixes the display of the variable
operator so that the text on the right is displayed white and not cyan;
which matches Orca. | @@ -671,7 +671,7 @@ END_OPERATOR
BEGIN_OPERATOR(variable)
LOWERCASE_REQUIRES_BANG;
PORT(0, -1, IN | PARAM);
- PORT(0, 1, IN | PARAM);
+ PORT(0, 1, IN);
Glyph left = PEEK(0, -1);
Glyph right = PEEK(0, 1);
if (left != '.') {
|
docs - fix incorrect R version reference | @@ -329,7 +329,7 @@ LANGUAGE 'plr';</codeblock><p>This
format="html" scope="external">MADlib</xref> directly from R.</p>
<p>R documentation is installed with the Greenplum R package:</p>
<p>
- <codeph>$GPHOME/ext/R-3.3.1/doc</codeph>
+ <codeph>$GPHOME/ext/R-3.3.3/doc</codeph>
</p>
</body>
<topic id="topic16" xml:lang="en">
|
Added note about java requierement | @@ -3,7 +3,10 @@ Copyright 2019 Stephane Dallongeville
https://stephane-d.github.io/SGDK/
SGDK is an open and free development kit for the Sega Megadrive.
-It contains a development library (sources included) to make software for the Sega Megadrive / Genesis system and it uses the GCC compiler plus some custom tools to build the ROM (binaries are provided for Windows OS for convenience) .
+It contains the development library itself (sources included) and some custom tools used to compile resources.
+SGDK uses the GCC compiler (m68k-elf target) and libgcc to generate ROM image. Binaries (GCC 6.3) are provided for Windows OS for convenience but you need to install it by yourself for other systems.
+Note that SGDK also requires Java (custom tools use it) so you need to have Java JRE installed on your system:
+https://www.oracle.com/technetwork/java/javase/downloads/jre8-downloads-2133155.html
SGDK library and custom tools are distributed under the MIT license (see license.txt file).
GCC compiler and libgcc are under GNU license (GPL3) and any software build from it (as the SGDK library) is under the GCC runtime library exception license (see COPYING.RUNTIME file)
|
graceful fallback for huge page allocation on Linux | @@ -369,6 +369,13 @@ static void* mi_unix_mmap(void* addr, size_t size, size_t try_alignment, int pro
if (large_only || lflags != flags) {
// try large OS page allocation
p = mi_unix_mmapx(addr, size, try_alignment, protect_flags, lflags, lfd);
+ #ifdef MAP_HUGE_1GB
+ if (p == NULL && (lflags & MAP_HUGE_1GB) != 0) {
+ _mi_warning_message("unable to allocate huge (1GiB) page, trying large (2MiB) pages instead (error %i)\n", errno);
+ lflags = ((lflags & ~MAP_HUGE_1GB) | MAP_HUGE_2MB);
+ p = mi_unix_mmapx(addr, size, try_alignment, protect_flags, lflags, lfd);
+ }
+ #endif
if (large_only) return p;
if (p == NULL) {
mi_atomic_write(&large_page_try_ok, 10); // on error, don't try again for the next N allocations
|
[ctr/lua] apply change to testcode | @@ -114,8 +114,8 @@ func TestContractHello(t *testing.T) {
func TestContractSystem(t *testing.T) {
callInfo := "{\"Name\":\"testState\", \"Args\":[]}"
contractState := getContractState(t, systemCode)
- bcCtx := NewContext(sdb, nil, contractState, "HNM6akcic1ou1fX", "c2b36750", 100, 1234,
- "node", 1, accountId, 0)
+ bcCtx := NewContext(sdb, nil, nil, contractState, "HNM6akcic1ou1fX", "c2b36750", 100, 1234,
+ "node", 1, accountId, 0, nil)
contractCall(t, contractState, callInfo, bcCtx)
receipt := types.NewReceiptFromBytes(DB.Get(tid))
@@ -147,8 +147,8 @@ func TestContractQuery(t *testing.T) {
t.Errorf("failed check error: %s", err.Error())
}
- bcCtx := NewContext(sdb, nil, contractState, "", "", 100, 1234,
- "node", 1, accountId, 0)
+ bcCtx := NewContext(sdb, nil, nil, contractState, "", "", 100, 1234,
+ "node", 1, accountId, 0, nil)
contractCall(t, contractState, setInfo, bcCtx)
|
travis CHANGE use cmcoka tarball instead of its git
Use more stable code of cmocka, current master has some issue avoiding
cmocka usage. | @@ -29,8 +29,9 @@ branches:
before_install:
- eval "${MATRIX_EVAL}"
- - git clone git://git.cryptomilk.org/projects/cmocka.git
- - cd cmocka && mkdir build && cd build
+ - wget https://cmocka.org/files/1.1/cmocka-1.1.2.tar.xz
+ - tar -xf cmocka-1.1.2.tar.xz
+ - cd cmocka-1.1.2; mkdir build; cd build
- cmake .. && make -j2 && sudo make install
- cd ../..
- if [ "$TRAVIS_OS_NAME" = "osx" ]; then brew update; fi
|
util/comm-dev.c: Format with clang-format
BRANCH=none
TEST=none | @@ -60,9 +60,8 @@ static const char *strresult(int i)
/* Old ioctl format, used by Chrome OS 3.18 and older */
-static int ec_command_dev(int command, int version,
- const void *outdata, int outsize,
- void *indata, int insize)
+static int ec_command_dev(int command, int version, const void *outdata,
+ int outsize, void *indata, int insize)
{
struct cros_ec_command s_cmd;
int r;
@@ -117,16 +116,14 @@ static int ec_readmem_dev(int offset, int bytes, void *dest)
r_mem.offset = offset;
r_mem.size = bytes;
- return ec_command_dev(EC_CMD_READ_MEMMAP, 0,
- &r_mem, sizeof(r_mem),
+ return ec_command_dev(EC_CMD_READ_MEMMAP, 0, &r_mem, sizeof(r_mem),
dest, bytes);
}
/* New ioctl format, used by Chrome OS 4.4 and later as well as upstream 4.0+ */
-static int ec_command_dev_v2(int command, int version,
- const void *outdata, int outsize,
- void *indata, int insize)
+static int ec_command_dev_v2(int command, int version, const void *outdata,
+ int outsize, void *indata, int insize)
{
struct cros_ec_command_v2 *s_cmd;
int r;
@@ -193,8 +190,7 @@ static int ec_readmem_dev_v2(int offset, int bytes, void *dest)
r_mem.offset = offset;
r_mem.size = bytes;
- return ec_command_dev_v2(EC_CMD_READ_MEMMAP, 0,
- &r_mem, sizeof(r_mem),
+ return ec_command_dev_v2(EC_CMD_READ_MEMMAP, 0, &r_mem, sizeof(r_mem),
dest, bytes);
}
@@ -204,9 +200,7 @@ static int ec_readmem_dev_v2(int offset, int bytes, void *dest)
*/
static int ec_dev_is_v2(void)
{
- struct ec_params_hello h_req = {
- .in_data = 0xa0b0c0d0
- };
+ struct ec_params_hello h_req = { .in_data = 0xa0b0c0d0 };
struct ec_response_hello h_resp;
struct cros_ec_command s_cmd = {};
int r;
|
CoreValidation: Fixed RAM size in GNU linker script. | @@ -42,7 +42,7 @@ __ROM_SIZE = 0x00200000;
; </h>
-----------------------------------------------------------------------------*/
__RAM_BASE = 0x20200000;
-__RAM_SIZE = 0x20200000;
+__RAM_SIZE = 0x00200000;
/*--------------------- Stack / Heap Configuration ---------------------------
; <h> Stack / Heap Configuration
|
porting/examples/linux_blemesh: Allow specifying custom HCI | #include <stdbool.h>
#include <stdint.h>
+#include <stdlib.h>
#include <pthread.h>
#include "nimble/nimble_npl.h"
@@ -67,10 +68,15 @@ void mesh_initialized(void)
TASK_DEFAULT_STACK, TASK_DEFAULT_STACK_SIZE);
}
-int main(void)
+int main(int argc, char *argv[])
{
int ret = 0;
+ /* allow to specify custom hci */
+ if (argc > 1) {
+ ble_hci_sock_set_device(atoi(argv[1]));
+ }
+
ble_hci_sock_init();
nimble_port_init();
|
[numerics] respect itermax iparam[0] in mclp_enum.c | @@ -207,6 +207,7 @@ void mlcp_enum(MixedLinearComplementarityProblem* problem, double *z, double *w,
sU = z;
sV = z + problem->n;
tol = options->dparam[0];
+ int itermax = options->iparam[0];
sMref = problem->M->matrix0;
/* LWORK = 2*npm; LWORK >= max( 1, MN + max( MN, NRHS ) ) where MN = min(M,N)*/
@@ -236,7 +237,7 @@ void mlcp_enum(MixedLinearComplementarityProblem* problem, double *z, double *w,
ipiv = sW2V + sMm;
initEnum(problem->m);
- while (nextEnum(sW2V))
+ while (nextEnum(sW2V) && itermax-- > 0)
{
mlcp_buildM(sW2V, sM, sMref, sNn, sMm, sMl);
buildQ();
@@ -377,6 +378,7 @@ void mlcp_enum_Block(MixedLinearComplementarityProblem* problem, double *z, doub
/*sW2=w+(sMl-problem->m); sW2 size :m */
sU = z;
tol = options->dparam[0];
+ int itermax = options->iparam[0];
sMref = problem->M->matrix0;
/* LWORK = 2*npm; LWORK >= max( 1, MN + max( MN, NRHS ) ) where MN = min(M,N)*/
@@ -411,7 +413,7 @@ void mlcp_enum_Block(MixedLinearComplementarityProblem* problem, double *z, doub
*info = 0;
mlcp_buildIndexInBlock(problem, indexInBlock);
initEnum(problem->m);
- while (nextEnum(sW2V))
+ while (nextEnum(sW2V) && itermax-- > 0)
{
mlcp_buildM_Block(sW2V, sM, sMref, sNn, sMm, sMl, indexInBlock);
buildQ();
|
Run the mimic checksum benchmarks for longer. | @@ -808,23 +808,23 @@ void bench_puffs_zlib_decode_100k() {
void bench_mimic_adler32_10k() {
CHECK_FOCUS(__func__);
do_bench_buf1_buf1(mimic_bench_adler32, tc_src, &checksum_midsummer_gt, 0, 0,
- 30000);
+ 150000);
}
void bench_mimic_adler32_100k() {
CHECK_FOCUS(__func__);
- do_bench_buf1_buf1(mimic_bench_adler32, tc_src, &checksum_pi_gt, 0, 0, 3000);
+ do_bench_buf1_buf1(mimic_bench_adler32, tc_src, &checksum_pi_gt, 0, 0, 15000);
}
void bench_mimic_crc32_10k() {
CHECK_FOCUS(__func__);
do_bench_buf1_buf1(mimic_bench_crc32, tc_src, &checksum_midsummer_gt, 0, 0,
- 30000);
+ 100000);
}
void bench_mimic_crc32_100k() {
CHECK_FOCUS(__func__);
- do_bench_buf1_buf1(mimic_bench_crc32, tc_src, &checksum_pi_gt, 0, 0, 3000);
+ do_bench_buf1_buf1(mimic_bench_crc32, tc_src, &checksum_pi_gt, 0, 0, 10000);
}
void bench_mimic_flate_decode_1k() {
|
session server BUGFIX uninitialized var
False positive. | @@ -1711,7 +1711,7 @@ nc_ps_poll_session_io(struct nc_session *session, int io_timeout, time_t now_mon
API int
nc_ps_poll(struct nc_pollsession *ps, int timeout, struct nc_session **session)
{
- int ret, r;
+ int ret = NC_PSPOLL_ERROR, r;
uint8_t q_id;
uint16_t i, j;
char msg[256];
|
compile with /Zc:__cplusplus in vs2022 | @@ -107,7 +107,7 @@ mi_decl_nodiscard extern inline mi_decl_restrict void* mi_malloc_small(size_t si
}
// The main allocation function
-mi_decl_nodiscard extern inline void* _mi_heap_malloc_zero(mi_heap_t* heap, size_t size, bool zero) mi_attr_noexcept {
+extern inline void* _mi_heap_malloc_zero(mi_heap_t* heap, size_t size, bool zero) mi_attr_noexcept {
if mi_likely(size <= MI_SMALL_SIZE_MAX) {
return mi_heap_malloc_small_zero(heap, size, zero);
}
|
doc: rework boolean | @@ -6,46 +6,47 @@ Inconsistent use of bool in various parts of Elektra.
## Constraints
+- needs to be string
+
## Assumptions
-- needs to be string
-- convenience plugins can convert anything to 0 or 1
- type checker plugins can reject everything not 0 or 1
## Considered Alternatives
-- strictly only allow 0 and 1 (would move validation across the code)
- only check presence or absence (no cascading override of already present key possible)
-- use as in CMake (would move convenience across the code)
+- use booleans as in CMake, which allows on/off, true/false, ... (would need convenience across the code)
## Decision
-Use, depending on what your default should be:
+Only the strings `0` and `1` are allowed in the `KeySet` for `type = boolean`.
+Everything else should lead to errors in checkers (in `kdbSet`).
+
+Storage plugins are allowed any representation as suitable.
-- 0 is false, everything else is true (default is true)
-- 1 is true, everything else is false (default is false)
+In the absence of the key, the default can be either:
-Example:
+- default is true:
+ `0` is false, everything else is true, or
+- default is false:
+ `1` is true, everything else is false.
+
+Example for implementation in C:
```c
if ( strcmp(keyString(k), "0")) {/*true*/} else {/*false*/}
if (!strcmp(keyString(k), "1")) {/*true*/} else {/*false*/}
```
-In the documentation it should mention that a bool is used
+In the spec/docu it should mention that a bool is used
and which is the default.
The type checker plugin should allow
-- non-presence (default)
+- non-presence (for default), if not required
- the string "0"
- the string "1"
-The convenience plugin should transform (it might be combined with a plugin that transforms everything lower-case):
-
-- "false", "off", "no" to "0"
-- "true", "on", "yes" to "1"
-
## Rationale
- most easy to implement
|
board/fizz/usb_pd_pdo.c: Format with clang-format
BRANCH=none
TEST=none | #include "usb_pd.h"
#include "usb_pd_pdo.h"
-#define PDO_FIXED_FLAGS (PDO_FIXED_DUAL_ROLE | PDO_FIXED_DATA_SWAP |\
- PDO_FIXED_COMM_CAP)
+#define PDO_FIXED_FLAGS \
+ (PDO_FIXED_DUAL_ROLE | PDO_FIXED_DATA_SWAP | PDO_FIXED_COMM_CAP)
const uint32_t pd_src_pdo[] = {
PDO_FIXED(5000, 3000, PDO_FIXED_FLAGS),
|
Update: fix, inheritances were reversed | @@ -51,9 +51,9 @@ R1( ({A} <-> {B}), |-, (A <-> B), Truth_StructuralDeduction )
R1( ([A] <-> [B]), |-, (A <-> B), Truth_StructuralDeduction )
//NAL3 rules
R1( ((S | P) --> M), |-, (S --> M), Truth_StructuralDeduction )
-R1( (M --> (S & P)), |-, (S --> M), Truth_StructuralDeduction )
+R1( (M --> (S & P)), |-, (M --> S), Truth_StructuralDeduction )
R1( ((S | P) --> M), |-, (P --> M), Truth_StructuralDeduction )
-R1( (M --> (S & P)), |-, (P --> M), Truth_StructuralDeduction )
+R1( (M --> (S & P)), |-, (M --> P), Truth_StructuralDeduction )
R2( (P --> M), (S --> M), |-, ((S | P) --> M), Truth_Intersection )
R2( (P --> M), (S --> M), |-, ((S & P) --> M), Truth_Union )
R2( (P --> M), (S --> M), |-, ((S ~ P) --> M), Truth_Difference )
|
BugID:18989472: Fix an issue in work queue. | @@ -11,10 +11,11 @@ struct k_work_q g_work_queue;
static void k_work_submit_to_queue(struct k_work_q *work_q, struct k_work *work)
{
struct k_work *delayed_work = NULL;
+ uint32_t now = k_uptime_get_32();
if (!atomic_test_and_set_bit(work->flags, K_WORK_STATE_PENDING)) {
SYS_SLIST_FOR_EACH_NODE(&g_work_queue.queue.data_q, delayed_work) {
- if (delayed_work->timeout < work->timeout) {
+ if ((delayed_work->start_ms + delayed_work->timeout - now) < work->timeout) {
break;
}
}
|
Fix potential NULL pointer dereference
In EC key generation, if allocation of struct ec_gen_ctx fails, values
provided by parameters are copied into the context at represented by a NULL
pointer. To fix this, prevent copy if allocation fails. | @@ -1006,11 +1006,11 @@ static void *ec_gen_init(void *provctx, int selection,
gctx->libctx = libctx;
gctx->selection = selection;
gctx->ecdh_mode = 0;
- }
if (!ec_gen_set_params(gctx, params)) {
OPENSSL_free(gctx);
gctx = NULL;
}
+ }
return gctx;
}
|
Add the feature that switch random address to origin mac addr in the ADV
report data. | @@ -2065,14 +2065,41 @@ static void btu_ble_phy_update_complete_evt(UINT8 *p)
btm_ble_update_phy_evt(&update_phy);
}
+#if BLE_PRIVACY_SPT == TRUE
+/*******************************************************************************
+**
+** Function btm_ble_resolve_random_addr_adv_ext
+**
+** Description resolve random address complete callback.
+**
+** Returns void
+**
+*******************************************************************************/
+static void btm_ble_resolve_random_addr_adv_ext(void *p_rec, void *p)
+{
+ tBTM_SEC_DEV_REC *match_rec = (tBTM_SEC_DEV_REC *) p_rec;
+ BD_ADDR bda;
+ UINT8 *pp = (UINT8 *)p+4; //jump to the location of bd addr
+ if (match_rec) {
+ // Assign the original address to be the current report address
+ memcpy(bda, match_rec->ble.pseudo_addr, BD_ADDR_LEN);
+ BDADDR_TO_STREAM(pp,bda);
+ }
+}
+#endif
+
static void btu_ble_ext_adv_report_evt(UINT8 *p, UINT16 evt_len)
{
tBTM_BLE_EXT_ADV_REPORT ext_adv_report = {0};
UINT8 num_reports = {0};
+ UINT8 *pp = p;
//UINT8 legacy_event_type = 0;
UINT16 evt_type = 0;
uint8_t addr_type;
BD_ADDR bda;
+ #if (defined BLE_PRIVACY_SPT && BLE_PRIVACY_SPT == TRUE)
+ BOOLEAN match = FALSE;
+ #endif
if (!p) {
HCI_TRACE_ERROR("%s, Invalid params.", __func__);
@@ -2106,12 +2133,17 @@ static void btu_ble_ext_adv_report_evt(UINT8 *p, UINT16 evt_len)
STREAM_TO_UINT8(addr_type, p);
STREAM_TO_BDADDR(bda, p);
- // if it is an anonymous adv, skip address resolution
- if(addr_type != 0xFF) {
#if (defined BLE_PRIVACY_SPT && BLE_PRIVACY_SPT == TRUE)
- btm_identity_addr_to_random_pseudo(bda, &addr_type, FALSE);
-#endif
+ if(addr_type != 0xFF) {
+ match = btm_identity_addr_to_random_pseudo(bda, &addr_type, FALSE);
+ if (!match && BTM_BLE_IS_RESOLVE_BDA(bda)) {
+ btm_ble_resolve_random_addr(bda, btm_ble_resolve_random_addr_adv_ext, pp);
+ //the BDADDR may be updated, so read it again
+ p = p - sizeof(bda);
+ STREAM_TO_BDADDR(bda, p);
}
+ }
+#endif
ext_adv_report.addr_type = addr_type;
memcpy(ext_adv_report.addr, bda, 6);
STREAM_TO_UINT8(ext_adv_report.primary_phy, p);
|
Fix socket type in linux to avoid false "OTHER" protocols. | @@ -112,6 +112,11 @@ addSock(int fd, int type)
memset(&g_netinfo[fd], 0, sizeof(struct net_info_t));
g_netinfo[fd].fd = fd;
g_netinfo[fd].type = type;
+#ifdef __LINUX__
+ // Clear these bits so comparisons of type will work
+ g_netinfo[fd].type &= ~SOCK_CLOEXEC;
+ g_netinfo[fd].type &= ~SOCK_NONBLOCK;
+#endif // __LINUX__
}
}
|
Fix invalid NtSystemRoot | @@ -520,9 +520,12 @@ NTSTATUS PhpUpdateMemoryRegionTypes(
PS_SYSTEM_DLL_INIT_BLOCK ldrInitBlock = { 0 };
PVOID ldrInitBlockBaseAddress = NULL;
PPH_MEMORY_ITEM cfgBitmapMemoryItem;
+ PH_STRINGREF systemRootString;
PPH_STRING ntdllFileName;
- ntdllFileName = PhConcatStrings2(USER_SHARED_DATA->NtSystemRoot, L"\\System32\\ntdll.dll");
+ PhGetSystemRoot(&systemRootString);
+ ntdllFileName = PhConcatStringRefZ(&systemRootString, L"\\System32\\ntdll.dll");
+
status = PhGetProcedureAddressRemote(
ProcessHandle,
ntdllFileName->Buffer,
|
app_update: Make gen_empty_partition.py Python 2 & 3 compatible
Closes | # See the License for the specific language governing permissions and
# limitations under the License.
from __future__ import print_function, division
+from __future__ import unicode_literals
import argparse
import os
import re
@@ -42,9 +43,7 @@ def critical(msg):
sys.stderr.write('\n')
def generate_blanked_file(size, output_path):
- output = ""
- for i in range(size):
- output += b"\xFF"
+ output = b"\xFF" * size
try:
stdout_binary = sys.stdout.buffer # Python 3
except AttributeError:
|
exclude fuzz-initial test from build | @@ -35,7 +35,7 @@ test_script:
- ps: cd "$Env:Configuration"
- ps: vstest.console /logger:Appveyor UnitTest1.dll
# Alternative to UnitTest1 (apparently running the same tests):
- - ps: .\picoquic_t -n -r
+ - ps: .\picoquic_t -n -r -x fuzz_initial
deploy: off
|
enable PPP, USB_NET_QMI_WWAN and USB_SERIAL_OPTION | @@ -9,7 +9,7 @@ diff -rupN old/linux-xlnx-xilinx-v2016.4/arch/arm/configs/xilinx_zynq_defconfig
CONFIG_MDIO_BITBANG=y
CONFIG_INPUT_SPARSEKMAP=y
CONFIG_INPUT_EVDEV=y
-@@ -239,3 +240,128 @@ CONFIG_RCU_CPU_STALL_TIMEOUT=60
+@@ -239,3 +240,135 @@ CONFIG_RCU_CPU_STALL_TIMEOUT=60
CONFIG_FONTS=y
CONFIG_FONT_8x8=y
CONFIG_FONT_8x16=y
@@ -31,10 +31,17 @@ diff -rupN old/linux-xlnx-xilinx-v2016.4/arch/arm/configs/xilinx_zynq_defconfig
+CONFIG_B43=y
+CONFIG_BRCMFMAC=y
+CONFIG_BRCMFMAC_USB=y
++CONFIG_PPP_ASYNC=y
++CONFIG_PPP_DEFLATE=y
++CONFIG_PPP_FILTER=y
++CONFIG_PPP_MULTILINK=y
++CONFIG_PPP_SYNC_TTY=y
+CONFIG_USB_USBNET=y
+CONFIG_USB_NET_CDC_EEM=y
+CONFIG_USB_NET_CDC_MBIM=y
+CONFIG_USB_NET_HUAWEI_CDC_NCM=y
++CONFIG_USB_NET_QMI_WWAN=y
++CONFIG_USB_SERIAL_OPTION=y
+CONFIG_NETFILTER=y
+CONFIG_NETFILTER_ADVANCED=y
+CONFIG_NF_CONNTRACK=y
|
Fix random SEGV
After arr.toHex() returns the pointer in *str is no longer guaranteed
to be valid. | @@ -4544,8 +4544,7 @@ void DeRestPluginPrivate::updateSensorNode(const deCONZ::NodeEvent &event)
else if (ia->id() == 0xff01) // Xiaomi magic
{
QByteArray arr = ia->toString().toLatin1();
- const char *str = qPrintable(arr.toHex());
- DBG_Printf(DBG_INFO_L2, ">>>>> 0x%016llX: Xiaomi magic: %s\n", event.node()->address().ext(), str);
+ DBG_Printf(DBG_INFO_L2, ">>>>> 0x%016llX: Xiaomi magic: %s\n", event.node()->address().ext(), qPrintable(arr.toHex()));
}
}
}
|
CI: Make the maintainers to be the owners of the copyright header ignore list | @@ -204,7 +204,7 @@ requirements.txt @esp-idf-codeowners/tools
# sort-order-reset
# ignore lists
-/tools/ci/check_copyright_ignore.txt @esp-idf-codeowners/tools
+/tools/ci/check_copyright_ignore.txt @esp-idf-codeowners/all-maintainers
/tools/ci/check_copyright_permanent_ignore.txt @esp-idf-codeowners/all-maintainers
/tools/ci/check_examples_cmake_make-cmake_ignore.txt @esp-idf-codeowners/tools
/tools/ci/check_examples_cmake_make-make_ignore.txt @esp-idf-codeowners/tools
|
80-test_cmp_http.t: fix adaption of plan on 'certstatus' aspect of Mock server | @@ -171,7 +171,7 @@ sub test_cmp_http_aspect {
indir data_dir() => sub {
plan tests => 1 + @server_configurations * @all_aspects
- + (grep(/^Mock$/, @server_configurations)
+ - (grep(/^Mock$/, @server_configurations)
&& grep(/^certstatus$/, @all_aspects));
foreach my $server_name (@server_configurations) {
|
fix warning of posix_signal | #include <rthw.h>
#include <rtthread.h>
-#include <time.h>
+#include <sys/time.h>
+#include <sys/errno.h>
#include "posix_signal.h"
#define sig_valid(sig_no) (sig_no >= 0 && sig_no < RT_SIG_MAX)
|
notifications: clear state before processing initial update | @@ -8,6 +8,7 @@ import {
import { makePatDa } from "~/logic/lib/util";
import _ from "lodash";
import {StoreState} from "../store/type";
+import { BigIntOrderedMap } from '../lib/BigIntOrderedMap';
type HarkState = Pick<StoreState, "notifications" | "notificationsGraphConfig" | "notificationsGroupConfig" | "unreads" | "notificationsChatConfig">;
@@ -177,6 +178,7 @@ function unreadEach(json: any, state: HarkState) {
function unreads(json: any, state: HarkState) {
const data = _.get(json, 'unreads');
if(data) {
+ clearState(state);
console.log(data);
data.forEach(({ index, stats }) => {
const { unreads, notifications, last } = stats;
@@ -193,6 +195,29 @@ function unreads(json: any, state: HarkState) {
}
}
+function clearState(state){
+ let initialState = {
+ notifications: new BigIntOrderedMap<Timebox>(),
+ archivedNotifications: new BigIntOrderedMap<Timebox>(),
+ notificationsGroupConfig: [],
+ notificationsChatConfig: [],
+ notificationsGraphConfig: {
+ watchOnSelf: false,
+ mentions: false,
+ watching: [],
+ },
+ unreads: {
+ graph: {},
+ group: {}
+ },
+ notificationsCount: 0
+ };
+
+ Object.keys(initialState).forEach(key => {
+ state[key] = initialState[key];
+ });
+}
+
function updateUnreadCount(state: HarkState, index: NotifIndex, count: (c: number) => number) {
if(!('graph' in index)) {
return;
|
eqlms: decim_execute() using push_block() | @@ -302,16 +302,12 @@ int EQLMS(_decim_execute)(EQLMS() _q,
if (_k == 0)
return liquid_error(LIQUID_EICONFIG,"eqlms_%s_decim_execute(), down-sampling rate 'k' must be greater than 0", EXTENSION_FULL);
- unsigned int i;
- for (i=0; i<_k; i++) {
- // push input sample
- EQLMS(_push)(_q, _x[i]);
-
- // compute output sample
- if (i==0)
+ // push input sample and compute output
+ EQLMS(_push)(_q, _x[0]);
EQLMS(_execute)(_q, _y);
- }
- return LIQUID_OK;
+
+ // push remaining samples
+ return EQLMS(_push_block)(_q, _x+1, _k-1);
}
// execute equalizer with block of samples using constant
|
Prevent integer underflow in item size calculation | @@ -302,14 +302,21 @@ oe_result_t oe_parse_sgx_endorsements(
uint8_t* item_ptr = data_ptr_start + offsets[i];
uint32_t item_size;
- if (offsets[i] >= endorsements->buffer_size)
+ if (offsets[i] >= data_size)
OE_RAISE_MSG(
OE_INVALID_PARAMETER,
"Offset value when creating SGX endorsement is incorrect.",
NULL);
if (i < OE_SGX_ENDORSEMENT_COUNT - 1)
+ {
+ if (offsets[i + 1] <= offsets[i])
+ OE_RAISE_MSG(
+ OE_INVALID_PARAMETER,
+ "Endorsement offset values should be in ascending order.",
+ NULL);
item_size = offsets[i + 1] - offsets[i];
+ }
else
item_size = data_size - offsets[i];
|
out_opensearch: support dynamic index with types | @@ -490,11 +490,21 @@ static int opensearch_format(struct flb_config *config,
index = ra_index;
}
+ if (ctx->suppress_type_name) {
index_len = flb_sds_snprintf(&j_index,
flb_sds_alloc(j_index),
OS_BULK_INDEX_FMT_NO_TYPE,
ctx->action,
index);
+ }
+ else {
+ index_len = flb_sds_snprintf(&j_index,
+ flb_sds_alloc(j_index),
+ OS_BULK_INDEX_FMT,
+ ctx->action,
+ index, ctx->type);
+ }
+
flb_sds_destroy(ra_index);
ra_index = NULL;
index = NULL;
|
man: bump version | @@ -99,7 +99,7 @@ default = https://master\.libelektra\.org/doc/api_blueprints/snippet\-sharing\.a
[current/backend/api/description/html]
check/type = string
description = A link to the compiled blueprint describing the API\.
-default = https://doc\.libelektra\.org/restapi/0\.9\.0/snippet\-sharing\.html
+default = https://doc\.libelektra\.org/restapi/0\.9\.1/snippet\-sharing\.html
[current/backend/jwt/encryption/secret]
check/type = string
|
ksFindHierarchy now only copies the name if the root or a key copied from root is within ks | @@ -1325,10 +1325,18 @@ elektraCursor ksFindHierarchy (const KeySet * ks, const Key * root, elektraCurso
if (end != NULL)
{
- struct _KeyName * copy = keyNameCopy (root->keyName);
- struct _KeyName * old = root->keyName;
+ struct _KeyName * oldName = NULL;
+ struct _KeyName * copy = NULL;
+
+ if (search >= 0)
+ {
+ // root or a copy of root is part of ks
+ // we need to temporarily create a copy of the keyName, as to not change the name of keys in ks
+ copy = keyNameCopy (root->keyName);
+ oldName = root->keyName;
((Key *) root)->keyName = copy;
keyNameRefInc (copy);
+ }
if (root->keyName->keyUSize == 3)
{
@@ -1352,9 +1360,12 @@ elektraCursor ksFindHierarchy (const KeySet * ks, const Key * root, elektraCurso
*end = endSearch < 0 ? -endSearch - 1 : endSearch;
}
- ((Key *) root)->keyName = old;
+ if (oldName != NULL)
+ {
+ ((Key *) root)->keyName = oldName;
keyNameRefDecAndDel (copy, true);
}
+ }
return it;
}
|
Add comment explaining why zspills work only on the oldest kvsets in root | @@ -170,8 +170,11 @@ sp3_work_wtype_root(
znode = cn_kvset_can_zspill(le->le_kvset, rmap);
- /* Don't start a zspill if there the older busy kvsets. This avoids
- * tying up a spill thread that will just end up waiting on an rspill.
+ /* Don't start a zspill if there are older busy kvsets. This ensures that when a zspill does
+ * run, there's no other active spill that was started before it. i.e. it wouldn't have to wait
+ * behind any other spill thread. This is important because zspill uses cn_move() which unlinks
+ * the input kvsets immediately when cn_subspill_apply() is called. When the input kvsets are
+ * unlinked, there cannot be any active spills that started before the zspill.
*/
if (znode && list_next_entry_or_null(le, le_link, &tn->tn_kvset_list)) {
ev_debug(1);
|
fixup: remove ',' | @@ -325,7 +325,7 @@ def generateFullBuildStages() {
CMAKE_FLAGS_CLANG,
[TEST.ALL, TEST.MEM, TEST.INSTALL]
)
- tasks << buildAndTestMingwW64(),
+ tasks << buildAndTestMingwW64()
tasks << buildAndTest(
"ubuntu-xenial",
DOCKER_IMAGES.xenial,
|
refactor(demo): ethereum demo update
modify demo recipient address of ethereum | @@ -50,7 +50,7 @@ const BCHAR * demoUrl = "http://192.168.132.200:7545";
/**
* transfer recipient address
*/
-const BCHAR * demoRecipirntAddress = "0x4BeC3cDD520B7985067219F6f596EF7a55Ee5963";
+const BCHAR * demoRecipirntAddress = "0xDED9ea325f8D657614f0F96444ca9DF1d7E2f27c";
BoatEthWallet *g_ethereum_wallet_ptr;
|
avoid wrongly restart discovery | @@ -213,7 +213,9 @@ static void bt_app_gap_cb(esp_bt_gap_cb_event_t event, esp_bt_gap_cb_param_t *pa
switch (event) {
/* when device discovered a result, this event comes */
case ESP_BT_GAP_DISC_RES_EVT: {
+ if (s_a2d_state == APP_AV_STATE_DISCOVERING) {
filter_inquiry_scan_result(param);
+ }
break;
}
/* when discovery state changed, this event comes */
|
Add test for no reset after DigestFinal_ex and DigestFinalXOF | @@ -686,6 +686,51 @@ static int test_EVP_DigestVerifyInit(void)
return ret;
}
+/*
+ * Test corner cases of EVP_DigestInit/Update/Final API call behavior.
+ */
+static int test_EVP_Digest(void)
+{
+ int ret = 0;
+ EVP_MD_CTX *md_ctx = NULL;
+ unsigned char md[EVP_MAX_MD_SIZE];
+
+ if (!TEST_ptr(md_ctx = EVP_MD_CTX_new()))
+ goto out;
+
+ if (!TEST_true(EVP_DigestInit_ex(md_ctx, EVP_sha256(), NULL))
+ || !TEST_true(EVP_DigestUpdate(md_ctx, kMsg, sizeof(kMsg)))
+ || !TEST_true(EVP_DigestFinal(md_ctx, md, NULL))
+ /* EVP_DigestFinal resets the EVP_MD_CTX. */
+ || !TEST_ptr_eq(EVP_MD_CTX_md(md_ctx), NULL))
+ goto out;
+
+ if (!TEST_true(EVP_DigestInit_ex(md_ctx, EVP_sha256(), NULL))
+ || !TEST_true(EVP_DigestUpdate(md_ctx, kMsg, sizeof(kMsg)))
+ || !TEST_true(EVP_DigestFinal_ex(md_ctx, md, NULL))
+ /* EVP_DigestFinal_ex does not reset the EVP_MD_CTX. */
+ || !TEST_ptr(EVP_MD_CTX_md(md_ctx))
+ /*
+ * EVP_DigestInit_ex with NULL type should work on
+ * pre-initialized context.
+ */
+ || !TEST_true(EVP_DigestInit_ex(md_ctx, NULL, NULL)))
+ goto out;
+
+ if (!TEST_true(EVP_DigestInit_ex(md_ctx, EVP_shake256(), NULL))
+ || !TEST_true(EVP_DigestUpdate(md_ctx, kMsg, sizeof(kMsg)))
+ || !TEST_true(EVP_DigestFinalXOF(md_ctx, md, sizeof(md)))
+ /* EVP_DigestFinalXOF does not reset the EVP_MD_CTX. */
+ || !TEST_ptr(EVP_MD_CTX_md(md_ctx))
+ || !TEST_true(EVP_DigestInit_ex(md_ctx, NULL, NULL)))
+ goto out;
+ ret = 1;
+
+ out:
+ EVP_MD_CTX_free(md_ctx);
+ return ret;
+}
+
static int test_d2i_AutoPrivateKey(int i)
{
int ret = 0;
@@ -2109,6 +2154,7 @@ int setup_tests(void)
ADD_TEST(test_EVP_set_default_properties);
ADD_ALL_TESTS(test_EVP_DigestSignInit, 9);
ADD_TEST(test_EVP_DigestVerifyInit);
+ ADD_TEST(test_EVP_Digest);
ADD_TEST(test_EVP_Enveloped);
ADD_ALL_TESTS(test_d2i_AutoPrivateKey, OSSL_NELEM(keydata));
ADD_TEST(test_privatekey_to_pkcs8);
|
Addition of an option to choose the solution of the reduced symmetric system with Qp2 or QpH inside the matrix.
SICONOS_FRICTION_3D_IPM_IPARAM_REDUCED_SYSTEM_METHOD | @@ -545,7 +545,9 @@ enum SICONOS_FRICTION_3D_IPM_IPARAM_ENUM
/** index in iparam to update the vector w for solving nonconvex problem */
SICONOS_FRICTION_3D_IPM_IPARAM_UPDATE_S = 17,
/** index in iparam to use Qp or F formula for computing Nesterov-Todd scaling **/
- SICONOS_FRICTION_3D_IPM_IPARAM_NESTEROV_TODD_SCALING_METHOD = 18
+ SICONOS_FRICTION_3D_IPM_IPARAM_NESTEROV_TODD_SCALING_METHOD = 18,
+ /** index in iparam to use a reduced symmetric system with Qp2 or QpH inside the matrix **/
+ SICONOS_FRICTION_3D_IPM_IPARAM_REDUCED_SYSTEM_METHOD = 19
};
enum SICONOS_FRICTION_3D_IPM_DPARAM_ENUM
@@ -578,4 +580,10 @@ enum SICONOS_FRICTION_3D_IPM_NESTEROV_TODD_SCALING_METHOD_ENUM
SICONOS_FRICTION_3D_IPM_NESTEROV_TODD_SCALING_WITH_F = 1
};
+enum SICONOS_FRICTION_3D_IPM_IPARAM_REDUCED_SYSTEM_METHOD_ENUM
+ {
+ SICONOS_FRICTION_3D_IPM_IPARAM_REDUCED_SYSTEM_WITH_QP2 = 0,
+ SICONOS_FRICTION_3D_IPM_IPARAM_REDUCED_SYSTEM_WITH_QPH = 1
+ };
+
#endif
|
[ci] Enable running CI on Fedora 36
Fedora 34 is EOL since 2022-06-07:
This diff adds support for F36 (current release). | @@ -113,7 +113,7 @@ jobs:
runs-on: ubuntu-20.04
strategy:
matrix:
- os: [{distro: "fedora", version: "34", nick: "f34"}]
+ os: [{distro: "fedora", version: "34", nick: "f34"}, {distro: "fedora", version: "36", nick: "f36"}]
env:
- TYPE: Debug
PYTHON_TEST_LOGFILE: critical.log
|
Added missing return in metadata_probe_cores | @@ -385,8 +385,11 @@ void ocf_metadata_probe_cores(ocf_ctx_t ctx, ocf_volume_t volume,
const struct ocf_metadata_iface *iface;
context = env_vzalloc(sizeof(*context));
- if (!context)
+ if (!context) {
cmpl(priv, -OCF_ERR_NO_MEM, 0);
+ return;
+ }
+
context->cmpl = cmpl;
context->priv = priv;
|
Replace OpenSSL's ERR_PACK with ERR_GET_REASON | @@ -1209,23 +1209,22 @@ squelch_err_ssl_handshake(unsigned long err)
{
if(verbosity >= VERB_QUERY)
return 0; /* only squelch on low verbosity */
- /* this is very specific, we could filter on ERR_GET_REASON()
- * (the third element in ERR_PACK) */
- if(err == ERR_PACK(ERR_LIB_SSL, SSL_F_SSL3_GET_RECORD, SSL_R_HTTPS_PROXY_REQUEST) ||
- err == ERR_PACK(ERR_LIB_SSL, SSL_F_SSL3_GET_RECORD, SSL_R_HTTP_REQUEST) ||
- err == ERR_PACK(ERR_LIB_SSL, SSL_F_SSL3_GET_RECORD, SSL_R_WRONG_VERSION_NUMBER) ||
- err == ERR_PACK(ERR_LIB_SSL, SSL_F_SSL3_READ_BYTES, SSL_R_SSLV3_ALERT_BAD_CERTIFICATE)
+ if(ERR_GET_LIB(err) == ERR_LIB_SSL &&
+ (ERR_GET_REASON(err) == SSL_R_HTTPS_PROXY_REQUEST ||
+ ERR_GET_REASON(err) == SSL_R_HTTP_REQUEST ||
+ ERR_GET_REASON(err) == SSL_R_WRONG_VERSION_NUMBER ||
+ ERR_GET_REASON(err) == SSL_R_SSLV3_ALERT_BAD_CERTIFICATE
#ifdef SSL_F_TLS_POST_PROCESS_CLIENT_HELLO
- || err == ERR_PACK(ERR_LIB_SSL, SSL_F_TLS_POST_PROCESS_CLIENT_HELLO, SSL_R_NO_SHARED_CIPHER)
+ || ERR_GET_REASON(err) == SSL_R_NO_SHARED_CIPHER
#endif
#ifdef SSL_F_TLS_EARLY_POST_PROCESS_CLIENT_HELLO
- || err == ERR_PACK(ERR_LIB_SSL, SSL_F_TLS_EARLY_POST_PROCESS_CLIENT_HELLO, SSL_R_UNKNOWN_PROTOCOL)
- || err == ERR_PACK(ERR_LIB_SSL, SSL_F_TLS_EARLY_POST_PROCESS_CLIENT_HELLO, SSL_R_UNSUPPORTED_PROTOCOL)
+ || ERR_GET_REASON(err) == SSL_R_UNKNOWN_PROTOCOL
+ || ERR_GET_REASON(err) == SSL_R_UNSUPPORTED_PROTOCOL
# ifdef SSL_R_VERSION_TOO_LOW
- || err == ERR_PACK(ERR_LIB_SSL, SSL_F_TLS_EARLY_POST_PROCESS_CLIENT_HELLO, SSL_R_VERSION_TOO_LOW)
+ || ERR_GET_REASON(err) == SSL_R_VERSION_TOO_LOW
# endif
#endif
- )
+ ))
return 1;
return 0;
}
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.