message
stringlengths
6
474
diff
stringlengths
8
5.22k
Fix back/forward slash keycodes.
#define EQL 0x2E #define LBKT 0x2F #define RBKT 0x30 -#define FSLH 0x31 +#define BSLH 0x31 #define SCLN 0x33 #define QUOT 0x34 #define GRAV 0x35 #define CMMA 0x36 #define DOT 0x37 -#define BSLH 0x38 +#define FSLH 0x38 #define CLCK 0x39 #define F1 0x3A #define F2 0x3B
rnndb: add reg showing the current secure level of a falcon
<reg32 offset="0x208" name="DEBUG_DATA_WR" variants="GF119-"/> <reg32 offset="0x20c" name="DEBUG_DATA_RD" variants="GF119-"/> + <reg32 offset="0x240" name="UNK240" variants="GM200-"> + <bitfield low="0" high="1" name="SEC_MODE"> + <value value="0" name="NS"/> + <value value="1" name="LS"/> + <value value="2" name="HS"/> + </bitfield> + </reg32> + <reg32 offset="0xfe8" name="PM_SEL" variants="GF100-"> <!-- XXX: what the fuck? --> <bitfield low="0" high="3" name="0"/> <!-- from ??? -->
fix static code analysis - Uninitialized Variable in Constructor
-// Copyright(c) 2019-2021, Intel Corporation +// Copyright(c) 2019-2023, Intel Corporation // // Redistribution and use in source and binary forms, with or without // modification, are permitted provided that the following conditions are met: @@ -112,7 +112,11 @@ public: group_id(0), speed(0), df_id(0), eth_lwmac(0), ptr_(NULL), - mmap_ptr(NULL) { } + mmap_ptr(NULL) { + memset(&uio, 0, sizeof(uio)); + memset(&eth_info, 0, sizeof(eth_info)); + memset(&eth_dfh, 0, sizeof(eth_dfh)); + } ~eth_group() {}
perf-tools/likwid: update version to v4.3.3
Summary: Toolsuite of command line applications for performance oriented programmers Name: %{pname}-%{compiler_family}%{PROJ_DELIM} -Version: 4.3.2 +Version: 4.3.3 Release: 1%{?dist} License: GPLv3 Group: %{PROJ_NAME}/perf-tools
fix: add BoatIotSdkInit(); in test_001CreateWallet_0001CreateOneTimeWalletSuccess
@@ -72,6 +72,7 @@ START_TEST(test_001CreateWallet_0001CreateOneTimeWalletSuccess) { BSINT32 rtnVal; BoatPlatONWallet *g_platon_wallet_ptr = NULL; + BoatIotSdkInit(); BoatPlatONWalletConfig wallet = get_platon_wallet_settings(); extern BoatIotSdkContext g_boat_iot_sdk_context;
Fix sloe so that it is chapter aware.
?+ typ ~ {$hold *} $(typ ~(repo ut typ)) {$core *} - (turn (~(tap by q.s.q.typ) ~) |=({a/term *} a)) + %- zing + %+ turn (~(tap by q.s.q.typ) ~) + |= {* b/tomb} + %+ turn (~(tap by q.b) ~) + |=({a/term *} a) == :: ++ slop :: cons two vases
tigge_check not failing for some wrong validityTime/validityDate
@@ -381,6 +381,7 @@ static void check_validity_datetime(grib_handle* h) long validityDate, validityTime; /* Check only applies to accumulated, max etc. */ + str_len = 100; err = grib_get_string(h, "stepRange", stepRange, &str_len); if (err) return; @@ -410,7 +411,6 @@ static void check_range(grib_handle* h,const parameter* p,double min,double max) /* See ECC-437 */ if (!(get(h,"bitMapIndicator") == 0 && min == missing && max == missing)) { - if(min < p->min1 || min > p->min2) { printf("warning: %s, field %d [%s]: %s minimum value %g is not in [%g,%g]\n",file,field,param, @@ -429,7 +429,6 @@ static void check_range(grib_handle* h,const parameter* p,double min,double max) printf(" => [%g,%g]\n",max < p->max1 ? max : p->max1, max > p->max2 ? max : p->max2); warning++; } - } } @@ -806,7 +805,6 @@ static void statistical_process(grib_handle* h,const parameter* p,double min,dou CHECK((get(h,"endStep") % 6) == 0); /* Every six hours */ } - if(get(h,"indicatorOfUnitForTimeRange") == 11) { /* Six hourly is OK */ @@ -1400,8 +1398,6 @@ static void verify(grib_handle* h) todo ?? now it's allowed in the code here! if(!missing(h,"typeOfStatisticalProcessing")) CHECK(ne(h,"stepRange",0));*/ - - } void validate(const char* path)
lily.h: Documentation corrections.
@@ -677,7 +677,7 @@ void lily_list_push(lily_container_val *con, lily_value *value); // Returns the raw buffer behind a String. char *lily_string_raw(lily_string_val *string_val); -// Function: lily_string_raw +// Function: lily_string_length // Returns the size (in bytes) of a String buffer. int lily_string_length(lily_string_val *string_val); @@ -903,8 +903,8 @@ lily_container_val *lily_push_list (lily_state *s, uint32_t size); // If the caller is unsure, the function 'lily_is_valid_utf8' can be used. void lily_push_string (lily_state *s, const char *source); -// Function: lily_push_string -// (Stack: +1) Push a String wrapping over 'source' onto the stack. +// Function: lily_push_string_sized +// (Stack: +1) Push a String of 'size' bytes from 'source' onto the stack. // // This performs the same work as lily_push_string, except that 'size' bytes are // copied from 'source' (instead of all of it). @@ -1267,8 +1267,8 @@ void lily_mb_add_char(lily_msgbuf *msgbuf, char ch); // ^T - lily_type * (internal use only). void lily_mb_add_fmt(lily_msgbuf *msgbuf, const char *format, ...); -// Function: lily_mb_fmt_va -// lily_add_fmt, but using a va_list. +// Function: lily_mb_add_fmt_va +// lily_mb_add_fmt, but using a va_list. void lily_mb_add_fmt_va(lily_msgbuf *msgbuf, const char *format, va_list); // Function: lily_mb_add_slice
Updated CHANGELOG for v0.4
@@ -5,8 +5,20 @@ Summary: added halo model matter power spectrum calculation and halo mass-concen ## C library In ccl_halomod.c: +Added this source file. Contains functions to compute halo-model matter power spectra and also mass-concentration relations. + +In ccl_power.c + +Added sigmaV, changed sigma(R) -> sigma(R,a) + +In ccl_massfunc.c + +Added Sheth & Tormen (1999) mass function. + ## Python library +sigmaR(R) defaults to sigmaR(R,a=1) unless a is specified. sigmaV(R) is also added. New functions ccl.halomodel_matter_power and ccl.halo_concentration. + # v 0.3 API changes: Summary: the user interface for setting up cosmologies with neutrinos has been altered. Users should from now on pass Neff, the effective number of relativistic neutrino species in the early universe, and mnu, either a sum or neutrino masses or a set of 3 neutrinos masses.
remove custom thrift code
@@ -535,4 +535,7 @@ ALLOW yabs/telephony/platform/internal/rtp -> vendor/github.com/wernerd/GoRTP ALLOW quasar/iot/adapters/tuya_adapter -> vendor/github.com/TuyaInc/tuya_pulsar_sdk_go ALLOW quasar/iot/adapters/tuya_adapter/server -> vendor/github.com/sirupsen/logrus +# SUBBOTNIK-90 +ALLOW infra/rtc/instance_resolver/pkg/clients/iss3 -> vendor/git.apache.org/thrift.git/lib/go + DENY .* -> vendor/
Include USER button in button state
@@ -40,7 +40,7 @@ namespace pimoroni { gpio_set_function(USER, GPIO_FUNC_SIO); gpio_set_dir(USER, GPIO_IN); - gpio_set_pulls(USER, false, true); + gpio_set_pulls(USER, true, false); gpio_set_function(VBUS_DETECT, GPIO_FUNC_SIO); gpio_set_dir(VBUS_DETECT, GPIO_IN); @@ -195,8 +195,9 @@ namespace pimoroni { } void Badger2040::update_button_states() { - uint32_t mask = (1UL << A) | (1UL << B) | (1UL << C) | (1UL << D) | (1UL << E); + uint32_t mask = (1UL << A) | (1UL << B) | (1UL << C) | (1UL << D) | (1UL << E) | (1UL << USER); _button_states = gpio_get_all() & mask; + _button_states ^= (1UL << USER); // USER button state is inverted } uint32_t Badger2040::button_states() {
admin/test-suite: add skip of shebang check for locally installed bats
@@ -23,6 +23,8 @@ Source0: tests-ohpc.tar BuildRequires: autoconf%{PROJ_DELIM} BuildRequires: automake%{PROJ_DELIM} +%global __mangle_shebangs_exclude bats + %if 0%{?suse_version} >= 1230 Requires(pre): shadow %endif
Added the session ticket state machine per RFC 5077
// This module provides an specification of the -// TLS 1.2 handshake message state machine according to RFC 5246. This +// TLS 1.2 handshake message state machine according to RFCs 5246 and 5077. This // is an overapproximation because state transitions don't depend on // message contents --- and, in reality, they should. @@ -28,6 +28,11 @@ type State = [5] (serverChangeCipherSpecSent : State) = 14 (serverFinishedSent : State) = 15 (applicationDataTransmission : State) = 16 +(serverNewSessionTicketSent : State) = 17 +(serverChangeCipherSpecWithTicketSent : State) = 18 +(serverFinishedWithTicketSent : State) = 19 +(clientChangeCipherSpecWithTicketSent : State) = 20 +(clientFinishedWithTicketSent : State) = 21 // TLS protocol types type Protocol = [2] @@ -49,6 +54,7 @@ type MessageType = [4] (certificateVerify : MessageType) = 7 (clientKeyExchange : MessageType) = 8 (finished : MessageType) = 9 +(newSessionTicket : MessageType) = 10 // ChangeCipherSpec message types (changeCipherSpecMessage : MessageType) = 0 @@ -86,6 +92,13 @@ handshakeTransition old new = \/ (old == clientFinishedSent /\ new == serverChangeCipherSpecSent) \/ (old == serverChangeCipherSpecSent /\ new == serverFinishedSent) \/ (old == serverFinishedSent /\ new == applicationDataTransmission) + \/ (old == serverHelloSent /\ new == serverNewSessionTicketSent) + \/ (old == serverHelloSent /\ new == serverChangeCipherSpecWithTicketSent) + \/ (old == serverNewSessionTicketSent /\ new == serverChangeCipherSpecWithTicketSent) + \/ (old == serverChangeCipherSpecWithTicketSent /\ new == serverFinishedWithTicketSent) + \/ (old == serverFinishedWithTicketSent /\ new == clientChangeCipherSpecWithTicketSent) + \/ (old == clientChangeCipherSpecWithTicketSent /\ new == clientFinishedWithTicketSent) + \/ (old == clientFinishedWithTicketSent /\ new == applicationDataTransmission) type Message = {messageType : MessageType ,protocol : Protocol @@ -114,6 +127,11 @@ message state = else if state == serverChangeCipherSpecSent then mkMessage server changeCipherSpec changeCipherSpecMessage else if state == serverFinishedSent then mkMessage server handshake finished else if state == applicationDataTransmission then mkMessage both data applicationData + else if state == serverNewSessionTicketSent then mkMessage server handshake newSessionTicket + else if state == serverChangeCipherSpecWithTicketSent then mkMessage server changeCipherSpec changeCipherSpecMessage + else if state == serverFinishedWithTicketSent then mkMessage server handshake finished + else if state == clientChangeCipherSpecWithTicketSent then mkMessage client changeCipherSpec changeCipherSpecMessage + else if state == clientFinishedWithTicketSent then mkMessage client handshake finished else mkMessage noSender data error // relation between RFC and s2n handshake state machines @@ -156,6 +174,7 @@ s2nMessageType state = else if mt == finished then (if send == server then TLS_SERVER_FINISHED else if send == client then TLS_SERVER_FINISHED else ERROR_MESSAGE) + else if mt == newSessionTicket then TLS_SERVER_NEW_SESSION_TICKET else ERROR_MESSAGE) else 0
Base64: Fix implicit type conversions
@@ -144,14 +144,14 @@ int base64Decode (const char * input, kdb_octet_t ** output, size_t * outputLeng return -1; } - (*output)[outputIndex++] = (byte0 << 2) + (byte1 >> 4); + (*output)[outputIndex++] = (kdb_octet_t) (byte0 << 2) + (kdb_octet_t) (byte1 >> 4); if (input[position + 2] != padding) { - (*output)[outputIndex++] = (byte1 << 4) + (byte2 >> 2); + (*output)[outputIndex++] = (kdb_octet_t) (byte1 << 4) + (kdb_octet_t) (byte2 >> 2); } if (input[position + 3] != padding) { - (*output)[outputIndex++] = (byte2 << 6) + byte3; + (*output)[outputIndex++] = (kdb_octet_t) (byte2 << 6) + (kdb_octet_t) byte3; } } return 1;
fix -h output for --sort option This fixes a regression from where the author forgot to update the help output.
@@ -40,7 +40,7 @@ parser.add_argument("-r", "--maxrows", default=20, help="maximum rows to print, default 20") parser.add_argument("-s", "--sort", default="all", choices=["all", "reads", "writes", "rbytes", "wbytes"], - help="sort column, default rbytes") + help="sort column, default all") parser.add_argument("-p", "--pid", type=int, metavar="PID", dest="tgid", help="trace this PID only") parser.add_argument("interval", nargs="?", default=1,
chat: submit color on blur
@@ -23,6 +23,7 @@ export class SettingsScreen extends Component { this.changeTitle = this.changeTitle.bind(this); this.changeDescription = this.changeDescription.bind(this); this.changeColor = this.changeColor.bind(this); + this.submitColor = this.submitColor.bind(this); } componentDidMount() { @@ -55,9 +56,23 @@ export class SettingsScreen extends Component { color: `#${uxToHex(props.association.metadata.color)}` }); } + } + + changeTitle() { + this.setState({title: event.target.value}) + } + + changeDescription() { + this.setState({description: event.target.value}); + } + + changeColor() { + this.setState({color: event.target.value}); + } + + submitColor() { + let { props, state } = this; - if (state.color !== prevState.color) { - //submit color if valid let color = state.color; if (color.startsWith("#")) { color = state.color.substr(1); @@ -89,19 +104,6 @@ export class SettingsScreen extends Component { } } } - } - - changeTitle() { - this.setState({title: event.target.value}) - } - - changeDescription() { - this.setState({description: event.target.value}); - } - - changeColor() { - this.setState({color: event.target.value}); - } deleteChat() { const { props, state } = this; @@ -223,6 +225,7 @@ export class SettingsScreen extends Component { value={this.state.color} disabled={!chatOwner} onChange={this.changeColor} + onBlur={this.submitColor} /> </div> </div>
removing some of loud error crap
@@ -89,10 +89,7 @@ static void sprintf_proxy_checkit(t_sprintf_proxy *x, char *buf, int checkin) sprintf(tmp, "%g", f); result = sprintf(buf, x->p_pattern, tmp); } - else /* LATER consider calling it a bug(), rather than error? */ - loud_error((t_pd *)x->p_master, - "can't convert float to type of argument %d", - x->p_id + 1); + else pd_error(x, "sprintf: can't convert float to type of argument %d", x->p_id + 1); if (result > 0) valid = 1; } @@ -111,10 +108,7 @@ static void sprintf_proxy_checkit(t_sprintf_proxy *x, char *buf, int checkin) if (result >= 0) valid = 1; } - else /* CHECKED */ - loud_error((t_pd *)x->p_master, - "can't convert symbol to type of argument %d", - x->p_id + 1); + else pd_error(x, "sprintf: can't convert symbol to type of argument %d", x->p_id + 1); } *pattend = tmp; }
misc: fix the pretty print for api trace Type: style
@@ -1385,7 +1385,7 @@ static void *vl_api_add_node_next_t_print s = format (0, "SCRIPT: add_node_next "); - s = format (0, "node %s next %s ", mp->node_name, mp->next_name); + s = format (s, "node %s next %s ", mp->node_name, mp->next_name); FINISH; } @@ -2520,9 +2520,9 @@ static void *vl_api_pg_create_interface_t_print u8 *s; s = format (0, "SCRIPT: pg_create_interface "); - s = format (0, "if_id %d", (mp->interface_id)); - s = format (0, "gso-enabled %u", mp->gso_enabled); - s = format (0, "gso-size %u", (mp->gso_size)); + s = format (s, "if_id %d ", (mp->interface_id)); + s = format (s, "gso-enabled %u ", mp->gso_enabled); + s = format (s, "gso-size %u", (mp->gso_size)); FINISH; } @@ -2533,8 +2533,8 @@ static void *vl_api_pg_capture_t_print u8 *s; s = format (0, "SCRIPT: pg_capture "); - s = format (0, "if_id %d ", (mp->interface_id)); - s = format (0, "pcap %s", mp->pcap_file_name); + s = format (s, "if_id %d ", (mp->interface_id)); + s = format (s, "pcap %s", mp->pcap_file_name); if (mp->count != ~0) s = format (s, "count %d ", (mp->count)); if (!mp->is_enabled)
When using PEM_read_bio_PrivateKey_ex() the public key is optional Fixes However the private key part is not optional which was mishandled by the legacy routine.
@@ -75,6 +75,10 @@ static EVP_PKEY *pem_read_bio_key_decoder(BIO *bp, EVP_PKEY **x, } ERR_pop_to_mark(); + /* if we were asked for private key, the public key is optional */ + if ((selection & OSSL_KEYMGMT_SELECT_PRIVATE_KEY) != 0) + selection = selection & ~OSSL_KEYMGMT_SELECT_PUBLIC_KEY; + if (!evp_keymgmt_util_has(pkey, selection)) { EVP_PKEY_free(pkey); pkey = NULL; @@ -106,7 +110,7 @@ static EVP_PKEY *pem_read_bio_key_legacy(BIO *bp, EVP_PKEY **x, EVP_PKEY *ret = NULL; ERR_set_mark(); /* not interested in PEM read errors */ - if (selection & OSSL_KEYMGMT_SELECT_PRIVATE_KEY) { + if ((selection & OSSL_KEYMGMT_SELECT_PRIVATE_KEY) != 0) { if (!PEM_bytes_read_bio_secmem(&data, &len, &nm, PEM_STRING_EVP_PKEY, bp, cb, u)) { @@ -116,7 +120,7 @@ static EVP_PKEY *pem_read_bio_key_legacy(BIO *bp, EVP_PKEY **x, } else { const char *pem_string = PEM_STRING_PARAMETERS; - if (selection & OSSL_KEYMGMT_SELECT_PUBLIC_KEY) + if ((selection & OSSL_KEYMGMT_SELECT_PUBLIC_KEY) != 0) pem_string = PEM_STRING_PUBLIC; if (!PEM_bytes_read_bio(&data, &len, &nm, pem_string, @@ -174,9 +178,13 @@ static EVP_PKEY *pem_read_bio_key_legacy(BIO *bp, EVP_PKEY **x, goto p8err; ret = ossl_d2i_PrivateKey_legacy(ameth->pkey_id, x, &p, len, libctx, propq); - } else if (selection & OSSL_KEYMGMT_SELECT_PUBLIC_KEY) { + } else if ((selection & OSSL_KEYMGMT_SELECT_PRIVATE_KEY) == 0 + && (selection & OSSL_KEYMGMT_SELECT_PUBLIC_KEY) != 0) { + /* Trying legacy PUBKEY decoding only if we do not want private key. */ ret = ossl_d2i_PUBKEY_legacy(x, &p, len); - } else if ((slen = ossl_pem_check_suffix(nm, "PARAMETERS")) > 0) { + } else if ((selection & EVP_PKEY_KEYPAIR) == 0 + && (slen = ossl_pem_check_suffix(nm, "PARAMETERS")) > 0) { + /* Trying legacy params decoding only if we do not want a key. */ ret = EVP_PKEY_new(); if (ret == NULL) goto err; @@ -294,6 +302,7 @@ EVP_PKEY *PEM_read_bio_PrivateKey_ex(BIO *bp, EVP_PKEY **x, OSSL_LIB_CTX *libctx, const char *propq) { return pem_read_bio_key(bp, x, cb, u, libctx, propq, + /* we also want the public key, if available */ EVP_PKEY_KEYPAIR); }
revert: "mk_core: mk_rconf: Be more verbose on indentation errors (#322)" This reverts commit
@@ -169,31 +169,6 @@ static int mk_rconf_meta_add(struct mk_rconf *conf, char *buf, int len) return 0; } -static int check_indent(const char *line, const char *indent) -{ - while (*line == *indent && *indent) { - line++; - indent++; - } - - if (*indent != '\0') { - if (isblank(*line)) { - mk_err("[config] Inconsistent use of tab and space"); - } - else { - mk_err("[config] Indentation level is too low"); - } - return -1; - } - - if (isblank(*line)) { - mk_err("[config] Extra indentation level found"); - return -1; - } - - return 0; -} - /* To call this function from mk_rconf_read */ static int mk_rconf_read_glob(struct mk_rconf *conf, const char * path); @@ -362,7 +337,7 @@ static int mk_rconf_read(struct mk_rconf *conf, const char *path) } /* Validate indentation level */ - if (check_indent(buf, indent) < 0) { + if (strncmp(buf, indent, indent_len) != 0 || isblank(buf[indent_len]) != 0) { mk_config_error(path, line, "Invalid indentation level"); mk_mem_free(key);
Clang: warning: macro name is a reserved identifier
@@ -52,28 +52,28 @@ static unsigned long I(unsigned long x,unsigned long y,unsigned long z) { return #define ROT(x, c) ((x << c) | (x >> (32 - c))) -#define _F(x, y, z) ((x & y) | ((~x) & z)) -#define _G(x, y, z) ((x & z) | (y & (~z))) -#define _H(x, y, z) (x ^ y ^ z) -#define _I(x, y, z) (y ^ (x | (~z))) +#define ECC_F(x, y, z) ((x & y) | ((~x) & z)) +#define ECC_G(x, y, z) ((x & z) | (y & (~z))) +#define ECC_H(x, y, z) (x ^ y ^ z) +#define ECC_I(x, y, z) (y ^ (x | (~z))) #define F_(A, B, C, D, g, i) \ - A += _F(B, C, D) + w[g] + k[i]; \ + A += ECC_F(B, C, D) + w[g] + k[i]; \ A &= 0xffffffff; \ A = ROT(A, r[i]); \ A += B; #define G_(A, B, C, D, g, i) \ - A += _G(B, C, D) + w[g] + k[i]; \ + A += ECC_G(B, C, D) + w[g] + k[i]; \ A &= 0xffffffff; \ A = ROT(A, r[i]); \ A += B; #define H_(A, B, C, D, g, i) \ - A += _H(B, C, D) + w[g] + k[i]; \ + A += ECC_H(B, C, D) + w[g] + k[i]; \ A &= 0xffffffff; \ A = ROT(A, r[i]); \ A += B; #define I_(A, B, C, D, g, i) \ - A += _I(B, C, D) + w[g] + k[i]; \ + A += ECC_I(B, C, D) + w[g] + k[i]; \ A &= 0xffffffff; \ A = ROT(A, r[i]); \ A += B;
windows-makefile.tmpl: Convert all /I and /D to -I and -D We were not consistently using one or the other, and the perlasm code assumes dashes, which MSVC tolerates. Fixes
@@ -187,7 +187,7 @@ CC={- $config{CC} -} CPP={- $config{CPP} -} CPPFLAGS={- our $cppflags1 = join(" ", (map { "-D".$_} @{$config{CPPDEFINES}}), - (map { " /I ".$_} @{$config{CPPINCLUDES}}), + (map { " -I ".$_} @{$config{CPPINCLUDES}}), @{$config{CPPFLAGS}}) -} CFLAGS={- join(' ', @{$config{CFLAGS}}) -} LD={- $config{LD} -} @@ -535,8 +535,8 @@ reconfigure reconf: my ($gen0, @gens) = @{$args{generator}}; my $generator = '"'.$gen0.'"'.join('', map { " $_" } @gens); my $generator_incs = join("", map { " -I \"$_\"" } @{$args{generator_incs}}); - my $incs = join("", map { " /I \"$_\"" } @{$args{incs}}); - my $defs = join("", map { " /D".$_ } @{$args{defs}}); + my $incs = join("", map { " -I \"$_\"" } @{$args{incs}}); + my $defs = join("", map { " -D".$_ } @{$args{defs}}); my $deps = @{$args{deps}} ? '"'.join('" "', @{$args{generator_deps}}, @{$args{deps}}).'"' : ''; @@ -627,8 +627,8 @@ EOF ( @{$args{srcs}} ); my $srcs = '"'.join('" "', @srcs).'"'; my $deps = '"'.join('" "', @srcs, @{$args{deps}}).'"'; - my $incs = join("", map { ' /I "'.$_.'"' } @{$args{incs}}); - my $defs = join("", map { " /D".$_ } @{$args{defs}}); + my $incs = join("", map { ' -I "'.$_.'"' } @{$args{incs}}); + my $defs = join("", map { " -D".$_ } @{$args{defs}}); my $cflags = { shlib => ' $(LIB_CFLAGS)', lib => ' $(LIB_CFLAGS)', dso => ' $(DSO_CFLAGS)', @@ -660,7 +660,7 @@ EOF } elsif ($srcs[0] =~ /.S$/) { return <<"EOF"; $obj: $deps - \$(CC) /EP /D__ASSEMBLER__ $cflags $defs $srcs > \[email protected] && \$(AS) $asflags \$(ASOUTFLAG)\$\@ \[email protected] + \$(CC) /EP -D__ASSEMBLER__ $cflags $defs $srcs > \[email protected] && \$(AS) $asflags \$(ASOUTFLAG)\$\@ \[email protected] EOF } my $recipe = <<"EOF";
env -> targetenv
@@ -57,7 +57,7 @@ rule("utils.glsl2spv") assert(glslangValidator or glslc, "glslangValidator or glslc not found!") -- glsl to spv - local targetenv = target:extraconf("rules", "utils.glsl2spv", "env") or "vulkan1.0" + local targetenv = target:extraconf("rules", "utils.glsl2spv", "targetenv") or "vulkan1.0" local outputdir = target:extraconf("rules", "utils.glsl2spv", "outputdir") or path.join(target:autogendir(), "rules", "utils", "glsl2spv") local spvfilepath = path.join(outputdir, path.filename(sourcefile_glsl) .. ".spv") batchcmds:show_progress(opt.progress, "${color.build.object}generating.glsl2spv %s", sourcefile_glsl)
Fix incorrect return type in the docs for s2n_connection_get_delay()
@@ -683,7 +683,7 @@ built-in blinding (set blinding to S2N_BUILT_IN_BLINDING) or self-service blindi ### s2n\_connection\_get\_delay ```c -int64_t s2n_connection_get_delay(struct s2n_connection *conn); +uint64_t s2n_connection_get_delay(struct s2n_connection *conn); ``` **s2n_connection_get_delay** returns the number of nanoseconds an application
Update build_win.bat to handle new amalg script.
@rem Ensure correct command prompt @if not defined INCLUDE goto :BADCMD +@rem Set compile and link options here +@setlocal +@set JANET_COMPILE=cl /nologo /Isrc\include /c /O2 /W3 /LD /D_CRT_SECURE_NO_WARNINGS +@set JANET_LINK=link /nologo + @rem Sub commands @if "%1"=="help" goto HELP @if "%1"=="clean" goto CLEAN @if "%1"=="test" goto TEST @if "%1"=="dist" goto DIST -@rem Set compile and link options here -@setlocal -@set JANET_COMPILE=cl /nologo /Isrc\include /c /O2 /W3 /LD /D_CRT_SECURE_NO_WARNINGS -@set JANET_LINK=link /nologo - mkdir build mkdir build\core mkdir build\mainclient @@ -112,7 +112,14 @@ exit /b 0 :DIST mkdir dist janet.exe tools\gendoc.janet > dist\doc.html -janet.exe tools\amalg.janet > dist\janet.c + +@rem Gen amlag +setlocal enabledelayedexpansion +set "amalg_files=" +for %%f in (src\core\*.c) do ( + set "amalg_files=!amalg_files! %%f" +) +janet.exe tools\amalg.janet src\core\util.h src\core\state.h src\core\gc.h src\core\vector.h src\core\fiber.h src\core\regalloc.h src\core\compile.h src\core\emit.h src\core\symcache.h %amalg_files% build\core_image.c > dist\janet.c copy janet.exe dist\janet.exe copy LICENSE dist\LICENSE copy README.md dist\README.md
dirinboz: remove unuse config This patch remove unuse config on dirinboz: CONFIG_IO_EXPANDER_PCAL6408 CONFIG_USB_MUX_PS8740 BRANCH=zork TEST=make BOARD=dirinboz
#include <stdbool.h> #include "baseboard.h" -#define CONFIG_IO_EXPANDER_PCAL6408 #define CONFIG_MKBP_USE_GPIO #define CONFIG_USBC_PPC_NX20P3483 -#define CONFIG_USB_MUX_PS8740 #define CONFIG_USB_MUX_PS8743 #define CONFIG_USB_MUX_RUNTIME_CONFIG
Minor update to force new CI test
Authors: see AUTHORS Copyright: see AUTHORS License: see LICENSE - Last Updated: 07/15/2019 + Last Updated: 07/22/2019 ****************************************************************************** */
linux preprocessor flag added to the .conf file generator
@@ -452,7 +452,7 @@ add_custom_target(iniconfig ALL if(MSVC) set(PRECOMPILER_FLAG /EP) else() - set(PRECOMPILER_FLAG -E -P) + set(PRECOMPILER_FLAG -E -P -D__LINUX__) endif() add_custom_command(TARGET iniconfig
tcpstates: incorrect display of dport fix incorrect display of dport for kprobe attachment in tcpstates
@@ -182,6 +182,7 @@ int kprobe__tcp_set_state(struct pt_regs *ctx, struct sock *sk, int state) // dport is either used in a filter here, or later u16 dport = sk->__sk_common.skc_dport; + dport = ntohs(dport); FILTER_DPORT // calculate delta
BuildElixir: require elixirc This will make the macros in BuildElixir fail if elixirc is not present
## macro(pack_archive avm_name) + find_package(Elixir REQUIRED) foreach(module_name ${ARGN}) add_custom_command( @@ -32,6 +33,7 @@ macro(pack_archive avm_name) endmacro() macro(pack_runnable avm_name main) + find_package(Elixir REQUIRED) add_custom_command( OUTPUT Elixir.${main}.beam
Fixed issue where parsed date range was not rendered with --date-spec.
@@ -526,7 +526,7 @@ int get_start_end_parsing_dates (char **start, char **end, const char *f) { uint32_t *dates = NULL; uint32_t len = 0; - const char *sndfmt = conf.spec_date_time_num_format; + const char *sndfmt = "%Y%m%d"; char s[DATE_LEN]; char e[DATE_LEN];
HLS: Remove cplusplus stuff again
* limitations under the License. */ -#ifdef __cplusplus -namespace hls { -extern "C" { -#endif - #if !defined(NO_SYNTH) #include "ap_int.h" @@ -116,10 +111,5 @@ short action_hashjoin_hls(ap_uint<MEMDW> *din_gmem, #endif /* NO_SYNTH END_IF Specific Hardware declarations */ -#ifdef __cplusplus -} -} -#endif - #endif /* __ACTION_HASHJOIN_HLS_H__ */
[timer] update the RT_TIMER_CTRL_GET_STATE code in rt_timer_control
@@ -560,12 +560,12 @@ rt_err_t rt_timer_control(rt_timer_t timer, int cmd, void *arg) if(timer->parent.flag & RT_TIMER_FLAG_ACTIVATED) { /*timer is start and run*/ - *(rt_tick_t *)arg = RT_TIMER_FLAG_ACTIVATED; + *(rt_uint32_t *)arg = RT_TIMER_FLAG_ACTIVATED; } else { /*timer is stop*/ - *(rt_tick_t *)arg = RT_TIMER_FLAG_DEACTIVATED; + *(rt_uint32_t *)arg = RT_TIMER_FLAG_DEACTIVATED; } break;
Fixed few bugs in tests Fixes - thanks
@@ -2492,7 +2492,7 @@ static void TestUserData() VkBuffer buf; VmaAllocation alloc; VmaAllocationInfo allocInfo; res = vmaCreateBuffer(g_hAllocator, &bufCreateInfo, &allocCreateInfo, &buf, &alloc, &allocInfo); TEST(res == VK_SUCCESS); - TEST(allocInfo.pUserData = numberAsPointer); + TEST(allocInfo.pUserData == numberAsPointer); vmaGetAllocationInfo(g_hAllocator, alloc, &allocInfo); TEST(allocInfo.pUserData == numberAsPointer); @@ -2736,13 +2736,13 @@ static void TestVirtualBlocks() TEST(allocInfo0.offset < blockSize); TEST(allocInfo0.offset == offset); TEST(allocInfo0.size == allocCreateInfo.size); - TEST(allocInfo0.pUserData = allocCreateInfo.pUserData); + TEST(allocInfo0.pUserData == allocCreateInfo.pUserData); // # Check SetUserData vmaSetVirtualAllocationUserData(block, allocation0, (void*)(uintptr_t)2); vmaGetVirtualAllocationInfo(block, allocation0, &allocInfo0); - TEST(allocInfo0.pUserData = (void*)(uintptr_t)2); + TEST(allocInfo0.pUserData == (void*)(uintptr_t)2); // # Allocate 4 MB (also test passing null as pOffset during allocation) @@ -3590,7 +3590,7 @@ static void TestLinearAllocator() VmaPoolStats stats; vmaGetPoolStats(g_hAllocator, pool, &stats); TEST(stats.size == poolCreateInfo.blockSize); - TEST(stats.unusedSize = poolCreateInfo.blockSize - bufSumSize); + TEST(stats.unusedSize == poolCreateInfo.blockSize - bufSumSize); TEST(stats.allocationCount == bufInfo.size()); // Destroy the buffers in random order. @@ -4732,7 +4732,7 @@ static void TestPool_SameSize() VmaPoolStats poolStats = {}; vmaGetPoolStats(g_hAllocator, pool, &poolStats); TEST(poolStats.allocationCount == items.size()); - TEST(poolStats.size = BUF_COUNT * BUF_SIZE); + TEST(poolStats.size == BUF_COUNT * BUF_SIZE); TEST(poolStats.unusedRangeCount == 1); TEST(poolStats.unusedSize == BUF_SIZE); }
smooth out cursor movement nearer()
@@ -30,11 +30,11 @@ def nearer(cur_time, replay, index): returnindex = 0 key_state = replay[index][KEYS_PRESSED] - for x in range(1, 4): + for x in range(0, 4): delta_t = abs(replay[index + x][TIMES] - cur_time) - if key_state != replay[index + x][KEYS_PRESSED]: - if delta_t <= min_time_toskip: - return x + # if key_state != replay[index + x][KEYS_PRESSED]: + # if delta_t <= min_time_toskip: + # return x if delta_t < min_time: min_time = delta_t returnindex = x
fixed bug in ESSID handling, if ESSID len is exact 32
@@ -2173,7 +2173,7 @@ for(zeiger = aplist; zeiger < aplist +APLIST_MAX; zeiger++) if(essidtagptr != NULL) { essidtag = (ietag_t*)essidtagptr; - if(essidtag->len < ESSID_LEN_MAX) + if(essidtag->len <= ESSID_LEN_MAX) { zeiger->essid_len = essidtag->len; memcpy(zeiger->essid, essidtag->data, essidtag->len); @@ -2225,7 +2225,7 @@ essidtagptr = gettag(TAG_SSID, apinfoptr, apinfolen); if(essidtagptr != NULL) { essidtag = (ietag_t*)essidtagptr; - if(essidtag->len < ESSID_LEN_MAX) + if(essidtag->len <= ESSID_LEN_MAX) { aplist_ptr->essid_len = essidtag->len; memcpy(aplist_ptr->essid, essidtag->data, essidtag->len); @@ -2313,7 +2313,6 @@ if(checkpownedstaap(macsta, macap) >= 3) return; } - memset(&packetout, 0, HDRRT_SIZE +MAC_SIZE_NORM +CAPABILITIESAP_SIZE +ESSID_LEN_MAX +IETAG_SIZE +1); memcpy(&packetout, &hdradiotap, HDRRT_SIZE); macftx = (mac_t*)(packetout +HDRRT_SIZE); @@ -2531,7 +2530,7 @@ for(zeiger = aplist; zeiger < aplist +APLIST_MAX; zeiger++) if(essidtagptr != NULL) { essidtag = (ietag_t*)essidtagptr; - if(essidtag->len < ESSID_LEN_MAX) + if(essidtag->len <= ESSID_LEN_MAX) { zeiger->essid_len = essidtag->len; memcpy(zeiger->essid, essidtag->data, essidtag->len); @@ -2583,7 +2582,7 @@ essidtagptr = gettag(TAG_SSID, apinfoptr, apinfolen); if(essidtagptr != NULL) { essidtag = (ietag_t*)essidtagptr; - if(essidtag->len < ESSID_LEN_MAX) + if(essidtag->len <= ESSID_LEN_MAX) { aplist_ptr->essid_len = essidtag->len; memcpy(aplist_ptr->essid, essidtag->data, essidtag->len); @@ -2697,7 +2696,7 @@ essidtagptr = gettag(TAG_SSID, apinfoptr, apinfolen); if(essidtagptr != NULL) { essidtag = (ietag_t*)essidtagptr; - if(essidtag->len < ESSID_LEN_MAX) + if(essidtag->len <= ESSID_LEN_MAX) { aplist_ptr->essid_len = essidtag->len; memcpy(aplist_ptr->essid, essidtag->data, essidtag->len); @@ -2829,7 +2828,7 @@ essidtagptr = gettag(TAG_SSID, apinfoptr, apinfolen); if(essidtagptr != NULL) { essidtag = (ietag_t*)essidtagptr; - if(essidtag->len < ESSID_LEN_MAX) + if(essidtag->len <= ESSID_LEN_MAX) { aplist_ptr->essid_len = essidtag->len; memcpy(aplist_ptr->essid, essidtag->data, essidtag->len);
Fix conditional valid bit reset Status bits outside provided mask shall be unchanged.
@@ -237,7 +237,7 @@ static bool _ocf_metadata_clear_valid_if_clean_##type(struct ocf_cache *cache, \ \ _raw_bug_on(raw, line); \ \ - map[line].valid &= mask & map[line].dirty; \ + map[line].valid &= (mask & map[line].dirty) | (~mask); \ \ if (map[line].valid) { \ return true; \
snap: bump to v1.9.4
name: fluent-bit base: core18 -version: '1.9.3' +version: '1.9.4' summary: High performance logs and stream processor description: | Fluent Bit is a high performance log processor and stream processor for Linux.
Figured out purpose of further Lumi specific attribute
@@ -3663,7 +3663,9 @@ Contactor > On/off=0003 - HP/HC=0004</description> <!-- LUMI --> <cluster id="0xfcc0" name="Lumi specific" mfcode="0x115f"> <description>Lumi specific attributes. -Note - Aqara Opple switches have 2 modes of operation (0x0009): Switch all devices (0), event based switching (1).</description> + +Note - Aqara Opple switches have 2 modes of operation (0x0009): Switch all devices (0), event based switching (1). +Child lock off: 0 - false, 1 - true</description> <server> <attribute id="0x0002" name="Power outages" type="u16" mfcode="0x115f" access="rw" required="m"> </attribute> <attribute id="0x0003" name="Unknown" type="enum8" mfcode="0x115f" access="rw" required="m"> </attribute> @@ -3678,8 +3680,8 @@ Note - Aqara Opple switches have 2 modes of operation (0x0009): Switch all devic <attribute id="0x00fc" name="Unknown" type="bool" mfcode="0x115f" access="rw" required="m"> </attribute> <attribute id="0x00fe" name="Serial Number" type="cstring" mfcode="0x115f" access="rw" required="m"> </attribute> <attribute id="0x00ff" name="Unknown (write only)" type="ostring" mfcode="0x115f" access="w" required="m"> </attribute> - <attribute id="0x0100" name="Unknown" type="u8" mfcode="0x115f" access="rw" required="m"> </attribute> - <attribute id="0x0200" name="Unknown" type="u8" mfcode="0x115f" access="rw" required="m"> </attribute> + <attribute id="0x0100" name="Unknown" type="u8" mfcode="0x115f" access="r" required="m"> </attribute> + <attribute id="0x0200" name="Child lock off" type="u8" mfcode="0x115f" access="rw" required="m"> </attribute> <attribute id="0x0201" name="Restore Power on Outage" type="bool" mfcode="0x115f" access="rw" required="m"> </attribute> <attribute id="0x0202" name="Auto-off after 20m below Threshold" type="bool" mfcode="0x115f" access="rw" required="m"> </attribute> <attribute id="0x0203" name="Device LED off" type="bool" mfcode="0x115f" access="rw" required="m"> </attribute>
Fix multiple choice text positioning when using a variable width font
@@ -2015,7 +2015,10 @@ class ScriptBuilder { const variableAlias = this.getVariableAlias(variable); const trueText = trimlines(args.trueText || "", 17, 1) || "Choice A"; const falseText = trimlines(args.falseText || "", 17, 1) || "Choice B"; - const choiceText = `\\001\\001 ${trueText}\n ${falseText}`; + const speedInstant = textCodeSetSpeed(0); + const gotoFirstLine = textCodeGoto(3, 2); + const gotoSecondLine = textCodeGoto(3, 3); + const choiceText = `${speedInstant}${gotoFirstLine}${trueText}\n${gotoSecondLine}${falseText}`; const numLines = choiceText.split("\n").length; this._addComment("Text Multiple Choice");
Simplify openbase test
{-# LANGUAGE CPP #-} module HsLuaSpec where -#if MIN_VERSION_base(4,8,0) -#else -import Control.Applicative ( (<$>), (<*>) ) -#endif -import Control.Monad (forM, forM_, when) +import Control.Monad (forM, forM_, when, liftM2) import Data.ByteString (ByteString) import qualified Data.ByteString.Char8 as B import qualified Data.Text as T @@ -174,11 +170,10 @@ testOpenBase = TestLabel "openbase" . TestCase . assert $ do openbase l -- openbase returns one table in lua 5.2 and later #if LUA_VERSION_NUMBER >= 502 - ret <- istable l (-1) + istable l (-1) #else - ret <- (&&) <$> istable l (-1) <*> istable l (-2) + liftM2 (&&) (istable l (-1)) (istable l (-2)) #endif - return ret loadInspect :: LuaState -> Assertion loadInspect l = do
BugID:17291083:fix init state error in gateway exit
@@ -434,7 +434,6 @@ int linkkit_gateway_init(linkkit_params_t *initParams) if (linkkit_gateway_ctx->is_inited == 1) { return FAIL_RETURN; } - linkkit_gateway_ctx->is_inited = 1; if (initParams->maxMsgSize < 256 || initParams->maxMsgQueueSize < 1 || @@ -442,6 +441,7 @@ int linkkit_gateway_init(linkkit_params_t *initParams) initParams->threadStackSize < 1024) { return FAIL_RETURN; } + linkkit_gateway_ctx->is_inited = 1; return SUCCESS_RETURN; }
Add unit test for long table fields
@@ -130,6 +130,14 @@ describe("Pallene type checker", function() "duplicate field 'x' in table") end) + it("allows tables with fields with more than LUAI_MAXSHORTLEN chars", function() + local field = string.rep('a', 41) + local module, _ = run_checker([[ + function f(t: {]].. field ..[[: float}) end + ]]) + assert.truthy(module) + end) + it("catches array expression in indexing is not an array", function() assert_error([[ function fn(x: integer)
removes http from boot-sequence hack
@@ -949,10 +949,6 @@ _pier_boot_vent(u3_pier* pir_u) cod_l = u3a_lush(c3__behn); u3_behn_ef_bake(pir_u); u3a_lop(cod_l); - - cod_l = u3a_lush(c3__http); - u3_http_ef_bake(); - u3a_lop(cod_l); } /* insert legacy boot event
lv_ta: fixes typo in new line char detection
@@ -190,7 +190,7 @@ void lv_ta_add_char(lv_obj_t * ta, uint32_t c) { lv_ta_ext_t * ext = lv_obj_get_ext_attr(ta); - if(ext->one_line && (c == '\n' || c == '\n')) { + if(ext->one_line && (c == '\n' || c == '\r')) { LV_LOG_INFO("Text area: line break ignored in one-line mode"); return; }
Fix typo in error message in esp_bluedroid_init Closes
@@ -119,7 +119,7 @@ esp_err_t esp_bluedroid_init(void) future_t **future_p; if (esp_bt_controller_get_status() != ESP_BT_CONTROLLER_STATUS_ENABLED) { - LOG_ERROR("Conroller not initialised\n"); + LOG_ERROR("Controller not initialised\n"); return ESP_ERR_INVALID_STATE; }
perf-tools/extrae: remove unneeded patch
@@ -24,7 +24,7 @@ License: LGPLv2+ Group: %{PROJ_NAME}/perf-tools URL: https://tools.bsc.es Source0: https://ftp.tools.bsc.es/extrae/extrae-%{version}-src.tar.bz2 -Patch1: mpicheck.patch + BuildRequires: autoconf%{PROJ_DELIM} BuildRequires: automake%{PROJ_DELIM}
clay: track /{mar,lib,sur} dependencies properly
:: :: Keep any parts of the ford cache whose dependencies didn't change :: + :: Make sure to invalidate any paths whose '-'s or '/'s could be + :: converted in an import; i.e. /mar, /lib, and /sur hoon files. + :: ++ promote-ford |= [=ford-cache deletes=(set path) changes=(set path)] ^+ ford-cache =/ invalid=(set path) (~(uni in deletes) changes) + =. invalid + %- ~(gas in invalid) + %- zing + %+ turn ~(tap in invalid) + |= pax=path + ^- (list path) + =/ xap=path (flop pax) + ?. &(=(%hoon (head xap)) ?=([?(%mar %sur %lib) @ @ *] pax)) + ~ + =- (turn - |=(suf=path [i.pax (snoc suf %hoon)])) + %- segments + %- crip + =/ xup (tail xap) :: lose %hoon extension + =/ pux (tail (flop xup)) :: lose static prefix + %+ turn (tail (spud pux)) :: lose leading '/' + |=(c=@tD `@tD`?:(=('/' c) '-' c)) :: convert '/' to '-' + :: :* ((invalidate path vase) vases.ford-cache invalid) ((invalidate mark dais) marks.ford-cache invalid) ((invalidate mars tube) casts.ford-cache invalid)
Fix wrong type in src/cfg.c. Resolves warning on mac, but doesn't change functionality at all.
@@ -99,7 +99,7 @@ static unsigned srcEnabledDefault[] = { DEFAULT_SRC_METRIC, }; -static cfg_out_format_t typeDefault[] = { +static cfg_transport_t typeDefault[] = { DEFAULT_OUT_TYPE, DEFAULT_CTL_TYPE, DEFAULT_LOG_TYPE,
Add missing include in s2n_certificate.c string.h is needed for strnlen.
/* - * Copyright 2014 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * Copyright 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"). * You may not use this file except in compliance with the License. #include <s2n.h> #include <openssl/x509v3.h> #include <openssl/pem.h> +#include <string.h> #include <strings.h> #include "crypto/s2n_certificate.h"
Remove dhparam from SSL_CONF list. Avoid duplicate assertion by removing dhparam from SSL_CONF parameter list: dhparam is handled manually by s_server.
@@ -206,7 +206,7 @@ int set_cert_times(X509 *x, const char *startdate, const char *enddate, OPT_S_SERVERPREF, OPT_S_LEGACYRENEG, OPT_S_LEGACYCONN, \ OPT_S_ONRESUMP, OPT_S_NOLEGACYCONN, OPT_S_ALLOW_NO_DHE_KEX, \ OPT_S_STRICT, OPT_S_SIGALGS, OPT_S_CLIENTSIGALGS, OPT_S_GROUPS, \ - OPT_S_CURVES, OPT_S_NAMEDCURVE, OPT_S_CIPHER, OPT_S_DHPARAM, \ + OPT_S_CURVES, OPT_S_NAMEDCURVE, OPT_S_CIPHER, \ OPT_S_RECORD_PADDING, OPT_S_DEBUGBROKE, OPT_S_COMP, \ OPT_S_NO_RENEGOTIATION, OPT_S__LAST @@ -248,8 +248,6 @@ int set_cert_times(X509 *x, const char *startdate, const char *enddate, {"named_curve", OPT_S_NAMEDCURVE, 's', \ "Elliptic curve used for ECDHE (server-side only)" }, \ {"cipher", OPT_S_CIPHER, 's', "Specify cipher list to be used"}, \ - {"dhparam", OPT_S_DHPARAM, '<', \ - "DH parameter file to use, in cert file if not specified"}, \ {"record_padding", OPT_S_RECORD_PADDING, 's', \ "Block size to pad TLS 1.3 records to."}, \ {"debug_broken_protocol", OPT_S_DEBUGBROKE, '-', \ @@ -280,7 +278,6 @@ int set_cert_times(X509 *x, const char *startdate, const char *enddate, case OPT_S_CURVES: \ case OPT_S_NAMEDCURVE: \ case OPT_S_CIPHER: \ - case OPT_S_DHPARAM: \ case OPT_S_RECORD_PADDING: \ case OPT_S_NO_RENEGOTIATION: \ case OPT_S_DEBUGBROKE
changed open file function ifstream has disabled its copy constructor
@@ -115,14 +115,15 @@ namespace return outputs; } - inline std::ifstream open_file(std::string path, std::ios_base::openmode mode = std::ios_base::in) + inline void open_file(std::ifstream & input, + std::string path, + std::ios_base::openmode mode = std::ios_base::in) { - std::ifstream input{path, mode}; + input.open(path,mode); if (!input) { std::string file_error_msg = "Couldn't open file " + path; throw std::runtime_error{file_error_msg}; } - return input; } } @@ -145,13 +146,16 @@ int main(int argc, char** argv) auto outputs = get_outputs(vm[ebi::vcf::REPORT].as<std::string>(), vcf_path); BOOST_LOG_TRIVIAL(info) << "Reading from input VCF file..."; - std::ifstream vcf_input = open_file(vcf_path); + std::ifstream vcf_input; + open_file(vcf_input, vcf_path); BOOST_LOG_TRIVIAL(info) << "Reading from input FASTA file..."; - std::ifstream fasta_input = open_file(fasta_path, std::ifstream::binary); + std::ifstream fasta_input; + open_file(fasta_input, fasta_path, std::ifstream::binary); BOOST_LOG_TRIVIAL(info) << "Reading from input FASTA index file..."; - std::ifstream fasta_index_input = open_file(fasta_index_path, std::ifstream::binary); + std::ifstream fasta_index_input; + open_file(fasta_index_input, fasta_index_path, std::ifstream::binary); ebi::vcf::assembly_checker::check_vcf_ref(vcf_input, fasta_input, fasta_index_input, outputs); return 0;
Add script/print-json-token-debug-format.c -a flag
// Together with the hexadecimal WUFFS_BASE__TOKEN__ETC constants defined in // token-public.h, this format is somewhat human-readable when piped through a // hex-dump program (such as /usr/bin/hd), printing one token per line. +// Alternatively, pass the -h (--human-readable) flag to this program. +// +// Pass -a (--all-tokens) to print all tokens, including whitespace. // // If the input or output is larger than the program's buffers (64 MiB and // 131072 tokens by default), there may be multiple valid tokenizations of any @@ -145,12 +148,19 @@ const int base38_decode[38] = { const char* // main1(int argc, char** argv) { + bool all_tokens = false; bool human_readable = false; int i; for (i = 1; i < argc; i++) { + if ((strcmp(argv[i], "-a") == 0) || + (strcmp(argv[i], "--all-tokens") == 0)) { + all_tokens = true; + continue; + } if ((strcmp(argv[i], "-h") == 0) || (strcmp(argv[i], "--human-readable") == 0)) { human_readable = true; + continue; } } @@ -177,7 +187,7 @@ main1(int argc, char** argv) { wuffs_base__token* t = &tok.data.ptr[tok.meta.ri++]; uint16_t len = wuffs_base__token__length(t); - if (wuffs_base__token__value(t) != 0) { + if (all_tokens || (wuffs_base__token__value(t) != 0)) { uint8_t lp = wuffs_base__token__link_prev(t) ? 1 : 0; uint8_t ln = wuffs_base__token__link_next(t) ? 1 : 0; uint32_t vmajor = wuffs_base__token__value_major(t);
rtdl: Remove broken assertion from R_X86_64_DTPOFF64
@@ -1192,7 +1192,6 @@ void Loader::_processRela(SharedObject *object, Elf64_Rela *reloc) { case R_X86_64_DTPOFF64: { __ensure(p); __ensure(!reloc->r_addend); - __ensure(p->object()->tlsModel == TlsModel::initial); *((uint64_t *)rel_addr) = p->symbol()->st_value; } break; case R_X86_64_TPOFF64: { @@ -1201,7 +1200,8 @@ void Loader::_processRela(SharedObject *object, Elf64_Rela *reloc) { __ensure(!reloc->r_addend); if(p->object()->tlsModel != TlsModel::initial) mlibc::panicLogger() << "rtdl: In object " << object->name - << ": Static TLS relocation to dynamically loaded object " + << ": Static TLS relocation to symbol " << p->getString() + << " in dynamically loaded object " << p->object()->name << frg::endlog; *((uint64_t *)rel_addr) = p->object()->tlsOffset + p->symbol()->st_value; }else{
ZCLDB: Fix typo for Xiaomi sensitivity attribute manufacturer code
<value name="Mains (single phase) with battery backup" value="0x81"></value> </attribute> <attribute id="0x4000" name="SW Build ID" type="cstring" access="r" required="o" range="0,16"></attribute> - <attribute id="0xff0d" name="Xiaomi Sensitivity" type="u8" access="rw" required="o" mfcode="0x11f5"></attribute> + <attribute id="0xff0d" name="Xiaomi Sensitivity" type="u8" access="rw" required="o" mfcode="0x115f"></attribute> + <!-- <attribute id="0xff0d" name="Xiaomi Sensitivity" type="u8" access="rw" required="o" mfcode="0x1037"></attribute> --> </attribute-set> <attribute-set id="001" description="Basic Device Settings"> <attribute id="0010" name="Location Description" type="cstring" range="0,16" access="rw" required="o"></attribute>
ci: change example simple sniffer test channel
# SPDX-License-Identifier: Apache-2.0 import pytest +from common_test_methods import get_env_config_variable from pytest_embedded import Dut -def _sniffer_packets_check(dut: Dut, packet_num: int) -> None: +def _sniffer_packets_check(dut: Dut, channel: int, packet_num: int) -> None: dut.write('pcap --open -f simple-sniffer') dut.expect('cmd_pcap: open file successfully') - dut.write(f'sniffer -i wlan -c 2 -n {packet_num}') + dut.write(f'sniffer -i wlan -c {channel} -n {packet_num}') dut.expect(f'cmd_sniffer: {packet_num} packages will be captured') dut.expect('cmd_sniffer: start WiFi promiscuous ok') dut.expect('cmd_sniffer: stop promiscuous ok') @@ -43,8 +44,9 @@ def _sniffer_packets_check(dut: Dut, packet_num: int) -> None: ], indirect=True) def test_examples_simple_sniffer(dut: Dut) -> None: dut.expect('sniffer>') + channel = get_env_config_variable('wifi_ap', 'sniffer_channel', default=1) # Sniffer multiple times with few packets for _ in range(3): - _sniffer_packets_check(dut, 5) + _sniffer_packets_check(dut, channel, 5) dut.write('') dut.expect('sniffer>')
[kernel] display a message for an empty matrix
@@ -680,9 +680,15 @@ void SimpleMatrix::display() const std::cout.setf(std::ios::scientific); std::cout.precision(6); + if (size(0) == 0 || size(1) ==0) + { + std::cout << "SimpleMatrix::display(): empty matrix" << std::endl; + } if (_num == 1) + { Siconos::algebra::print_m(*mat.Dense); //std::cout << *mat.Dense << std::endl; + } else if (_num == 2) std::cout << *mat.Triang << std::endl; else if (_num == 3)
lv_obj: bugfix: free_num and free_p were not copied
@@ -198,6 +198,12 @@ lv_obj_t * lv_obj_create(lv_obj_t * parent, lv_obj_t * copy) lv_obj_set_signal_f(new_obj, lv_obj_signal); lv_obj_set_design_f(new_obj, lv_obj_design); + /*Set free data*/ + new_obj->free_num = 0; +#if LV_OBJ_FREE_P != 0 + new_obj->free_p = NULL; +#endif + /*Set attributes*/ new_obj->click_en = 0; new_obj->drag_en = 0; @@ -235,6 +241,12 @@ lv_obj_t * lv_obj_create(lv_obj_t * parent, lv_obj_t * copy) lv_obj_set_signal_f(new_obj, lv_obj_signal); lv_obj_set_design_f(new_obj, lv_obj_design); + /*Set free data*/ + new_obj->free_num = 0; +#if LV_OBJ_FREE_P != 0 + new_obj->free_p = NULL; +#endif + /*Set attributes*/ new_obj->click_en = 1; new_obj->drag_en = 0; @@ -255,6 +267,11 @@ lv_obj_t * lv_obj_create(lv_obj_t * parent, lv_obj_t * copy) new_obj->opa = copy->opa; + /*Set free data*/ + new_obj->free_num = copy->free_num; +#if LV_OBJ_FREE_P != 0 + new_obj->free_p = copy->free_p; +#endif /*Set attributes*/ new_obj->click_en = copy->click_en; new_obj->drag_en = copy->drag_en;
os/fs/smartfs : Modify number of cleaned entry properly If next entry or sector is not exist, it clean entry but it doesn't increase count
@@ -2103,6 +2103,7 @@ int smartfs_scan_entry(struct smartfs_mountpt_s *fs, char *map, struct sector_re fdbg("Error marking entry inactive at sector %d\n", firstsector); goto errout; } + info->cleanentries++; } else { /* Make New node of Entry's first sector and put it to queue */ @@ -2146,6 +2147,7 @@ int smartfs_scan_entry(struct smartfs_mountpt_s *fs, char *map, struct sector_re goto errout; } + info->cleanentries++; break; }
OcDevicePathLib: Account for more than one \0-character for PathName
@@ -697,9 +697,19 @@ OcFileDevicePathNameSize ( IN CONST FILEPATH_DEVICE_PATH *FilePath ) { + UINTN Size; + ASSERT (FilePath != NULL); - return (DevicePathNodeLength (FilePath) - SIZE_OF_FILEPATH_DEVICE_PATH); + Size = (DevicePathNodeLength (FilePath) - SIZE_OF_FILEPATH_DEVICE_PATH); + // + // Account for more than one termination character. + // + while (Size >= 2 && FilePath->PathName[Size - 2] == L'\0') { + --Size; + } + + return Size; } /**
Use VFunc show in AgentInspect
@@ -84,14 +84,13 @@ public unsafe partial struct AgentInspect None = 0, Filled = 8, } - [MemberFunction("40 53 48 83 EC 40 48 8B D9 48 8B 49 10 48 8B 01 FF 90 ?? ?? ?? ?? BA")] - public partial void Show(); + public void ExamineCharacter(uint objectID) { RequestObjectID = objectID; RequestSearchCommentOID = objectID; RequestFreeCompanyOID = objectID; CurrentObjectID = 0xE0000000; - Show(); + AgentInterface.Show(); } }
watchdogs sucks
@@ -58,6 +58,7 @@ static int ICACHE_FLASH_ATTR __spi_comm(char *dat, int len, uint32_t *recvData, // give the ST time to be ready, up to 1s for (int i = 0;(gpio_input_get() & (1 << 4)) && i < 100000; i++) { os_delay_us(10); + system_soft_wdt_feed(); } // TODO: handle this better
MEMFS: Ability to exclude a dir during walk
@@ -30,9 +30,9 @@ for directory in dirs: dname = os.path.basename(directory) NAMES.append(dname) - for dirname, _, files in os.walk(directory): + for dirpath, dirnames, files in os.walk(directory): for name in files: - full = '%s/%s' % (dirname, name) + full = '%s/%s' % (dirpath, name) _, ext = os.path.splitext(full) if ext not in ['.def', '.table', '.tmpl']: continue
fix modules backends for symlinked plugins
@@ -62,6 +62,7 @@ int ELEKTRA_PLUGIN_FUNCTION (get) (Plugin * handle, KeySet * returned, Key * par Key * modulesRoot = keyNew ("system:/elektra/modules", KEY_END); if (keyCmp (modulesRoot, parentKey) == 0) { + keyDel (modulesRoot); return ELEKTRA_PLUGIN_STATUS_SUCCESS; } @@ -71,21 +72,32 @@ int ELEKTRA_PLUGIN_FUNCTION (get) (Plugin * handle, KeySet * returned, Key * par keyDel (modulesRoot); return ELEKTRA_PLUGIN_STATUS_ERROR; } - keyDel (modulesRoot); const char * phase = elektraPluginGetPhase (handle); if (strcmp (phase, KDB_GET_PHASE_RESOLVER) == 0) { + keyDel (modulesRoot); return ELEKTRA_PLUGIN_STATUS_SUCCESS; } else if (strcmp (phase, KDB_GET_PHASE_STORAGE) == 0) { Plugin * plugin = elektraPluginGetData (handle); - plugin->kdbGet (plugin, returned, parentKey); + + // create separate parentKey so that symlinked/aliased plugins still work + // TODO (kodebach): use separate function for contract to avoid all of this + keyAddBaseName (modulesRoot, plugin->name); + int ret = plugin->kdbGet (plugin, returned, modulesRoot); + keyDel (modulesRoot); + + if (ret == ELEKTRA_PLUGIN_STATUS_ERROR) + { + return ELEKTRA_PLUGIN_STATUS_ERROR; + } return ELEKTRA_PLUGIN_STATUS_SUCCESS; } else { + keyDel (modulesRoot); return ELEKTRA_PLUGIN_STATUS_NO_UPDATE; } }
OcAppleDiskImageLib: Fix chunk offsets.
@@ -255,7 +255,7 @@ OcAppleDiskImageRead ( case APPLE_DISK_IMAGE_CHUNK_TYPE_RAW: { - ChunkData = (Context->Buffer + BlockData->DataOffset + Chunk->CompressedOffset); + ChunkData = (Context->Buffer + Chunk->CompressedOffset); ChunkDataCurrent = (ChunkData + ChunkOffset); CopyMem (BufferCurrent, ChunkDataCurrent, BufferChunkSize); @@ -273,7 +273,7 @@ OcAppleDiskImageRead ( OutSize = DecompressZLIB ( ChunkData, ChunkTotalLength, - (Context->Buffer + BlockData->DataOffset + Chunk->CompressedOffset), + (Context->Buffer + Chunk->CompressedOffset), Chunk->CompressedLength ); if (OutSize != ChunkTotalLength) {
Update numerics/CMakeLists.txt
@@ -154,7 +154,7 @@ if(WITH_FCLIB) message(STATUS "FCLIB can not be found locally. Try to download and install it from github repository.") FetchContent_Declare(fclib - GIT_REPOSITORY [email protected]:FrictionalContactLibrary/fclib.git + GIT_REPOSITORY https://github.com/FrictionalContactLibrary/fclib.git GIT_TAG origin/master # #CMAKE_ARGS FCLIB_HEADER_ONLY=OFF # LOG_CONFIGURE TRUE
runtimes/singularity: bump to v3.2.1
Summary: Application and environment virtualization Name: %{pname}%{PROJ_DELIM} -Version: 3.2.0 +Version: 3.2.1 Release: 1%{?dist} # https://spdx.org/licenses/BSD-3-Clause-LBNL.html License: BSD-3-Clause-LBNL
netkvm: introduce class for NDIS mutex
@@ -161,6 +161,25 @@ private: CNdisSpinLock& operator= (const CNdisSpinLock&) = delete; }; +class CNdisMutex +{ +public: + CNdisMutex() + { + NDIS_INIT_MUTEX(&m_Mutex); + } + void Lock() + { + NDIS_WAIT_FOR_MUTEX(&m_Mutex); + } + void Unlock() + { + NDIS_RELEASE_MUTEX(&m_Mutex); + } +private: + KMUTEX m_Mutex; +}; + template <typename T> class CLockedContext { @@ -321,6 +340,17 @@ private: CNdisSpinLock m_Lock; }; +class CMutexProtectedAccess +{ +public: + void Lock() { m_Mutex.Lock(); } + void Unlock() { m_Mutex.Unlock(); } +private: + CNdisMutex m_Mutex; +}; + +typedef CLockedContext<CMutexProtectedAccess> CMutexLockedContext; + class CRawAccess { public:
add idt.h to kernel headers
#include <kernel/assert.h> #include <kernel/boot_info.h> #include <kernel/gdt/gdt.h> +#include <kernel/interrupts/idt.h> #define SPIN while (1) {sys_yield(RUNNABLE);} #define SPIN_NOMULTI do {} while (1);
system/camera: fix 'is_image' uninitialized
@@ -266,7 +266,7 @@ static int nxcamera_cmd_output(FAR struct nxcamera_s *pcam, FAR char *parg) int ret; char path[PATH_MAX]; FAR char *ext; - bool isimage; + bool isimage = false; /* First try to open the device directly */
DM: virtio-gpio: add IRQ statistics print each IRQ descriptor interrupts number and all of IRQ descriptors interrupts when UOS requests or releases a GPIO IRQ. Acked-by: Yu Wang
@@ -254,6 +254,7 @@ struct gpio_irq_desc { uint8_t level; /* level value */ uint64_t mode; /* interrupt trigger mode */ void *data; /* virtio gpio instance */ + uint64_t intr_stat; /* interrupts count */ }; struct gpio_irq_chip { @@ -261,6 +262,7 @@ struct gpio_irq_chip { struct gpio_irq_desc descs[VIRTIO_GPIO_MAX_VLINES]; uint64_t intr_pending; /* pending interrupts */ uint64_t intr_service; /* service interrupts */ + uint64_t intr_stat; /* all interrupts count */ }; struct virtio_gpio { @@ -278,6 +280,8 @@ struct virtio_gpio { static void print_gpio_info(struct virtio_gpio *gpio); static void print_virtio_gpio_info(struct virtio_gpio_request *req, struct virtio_gpio_response *rsp, bool in); +static void print_intr_statistics(struct gpio_irq_chip *chip); +static void record_intr_statistics(struct gpio_irq_chip *chip, uint64_t mask); static void native_gpio_update_line_info(struct gpio_line *line) @@ -868,6 +872,9 @@ gpio_irq_deliver_intr(struct virtio_gpio *gpio, uint64_t mask) /* Generate interrupt if appropriate. */ vq_endchains(vq, 1); + /* interrupt statistics */ + record_intr_statistics(&gpio->irq_chip, mask); + } else DPRINTF("virtio gpio failed to send an IRQ, mask %lu", mask); } @@ -1117,12 +1124,16 @@ virtio_gpio_irq_proc(struct virtio_gpio *gpio, struct iovec *iov, uint16_t flag) * if gpio_irq_enable failure. */ gpio_irq_enable(gpio, req->pin, req->mode); + + /* print IRQ statistics */ + print_intr_statistics(chip); break; case IRQ_ACTION_DISABLE: gpio_irq_disable(chip, req->pin); - /* reopen the GPIO */ - native_gpio_open_line(desc->gpio, 0, 0); + + /* print IRQ statistics */ + print_intr_statistics(chip); break; case IRQ_ACTION_ACK: /* @@ -1435,4 +1446,35 @@ print_virtio_gpio_info(struct virtio_gpio_request *req, rsp->data); } +static void +record_intr_statistics(struct gpio_irq_chip *chip, uint64_t mask) +{ + struct gpio_irq_desc *desc; + int i; + + for (i = 0; i < VIRTIO_GPIO_MAX_VLINES; i++) { + desc = &chip->descs[i]; + if (mask & BIT(desc->pin)) + desc->intr_stat++; + } + chip->intr_stat++; +} + +static void +print_intr_statistics(struct gpio_irq_chip *chip) +{ + struct gpio_irq_desc *desc; + int i; + + DPRINTF("virtio gpio generated interrupts %lu\n", chip->intr_stat); + for (i = 0; i < VIRTIO_GPIO_MAX_VLINES; i++) { + desc = &chip->descs[i]; + if (!desc->gpio || desc->intr_stat == 0) + continue; + DPRINTF("Chip %s GPIO %d generated interrupts %lu\n", + desc->gpio->chip->dev_name, desc->gpio->offset, + desc->intr_stat); + } +} + DEFINE_PCI_DEVTYPE(pci_ops_virtio_gpio);
test-suite: disable affinity for superlu_dist tests with mvapich2
@@ -16,6 +16,8 @@ testname="libs/superLU_dist" NODES=2 TASKS=4 +export MV2_ENABLE_AFFINITY=0 + @test "[$testname] PDGSSVX with full (default) options ($rm/$LMOD_FAMILY_COMPILER/$LMOD_FAMILY_MPI)" { if [ ! -s pddrive ];then flunk "pddrive binary does not exist"
Correct v1 hq ALPN
@@ -39,12 +39,12 @@ enum class AppProtocol { Perf, }; -constexpr uint8_t HQ_ALPN[] = "\x5hq-29\x5hq-30\x5hq-31\x5hq-32\x2hq"; +constexpr uint8_t HQ_ALPN[] = "\x5hq-29\x5hq-30\x5hq-31\x5hq-32\xahq-interop"; constexpr uint8_t HQ_ALPN_DRAFT29[] = "\x5hq-29"; constexpr uint8_t HQ_ALPN_DRAFT30[] = "\x5hq-30"; constexpr uint8_t HQ_ALPN_DRAFT31[] = "\x5hq-31"; constexpr uint8_t HQ_ALPN_DRAFT32[] = "\x5hq-32"; -constexpr uint8_t HQ_ALPN_V1[] = "\x2hq"; +constexpr uint8_t HQ_ALPN_V1[] = "\xahq-interop"; constexpr uint8_t H3_ALPN[] = "\x5h3-29\x5h3-30\x5h3-31\x5h3-32\x2h3"; constexpr uint8_t H3_ALPN_DRAFT29[] = "\x5h3-29";
cooja: disable slip-arch with NULLNET The file uses slip_input_byte which resides in slip. Slip uses the rxbuf from uIP, and that is not available with NULLNET.
* */ +#if !defined(NETSTACK_CONF_WITH_NULLNET) || !NETSTACK_CONF_WITH_NULLNET + #include "dev/slip.h" #include "dev/rs232.h" @@ -37,3 +39,4 @@ slip_arch_init() rs232_set_input(slip_input_byte); } +#endif
Add spacing to process general groupbox
@@ -90,7 +90,7 @@ BEGIN EDITTEXT IDC_FILENAME,15,65,191,12,ES_AUTOHSCROLL | ES_READONLY PUSHBUTTON "Inspect",IDC_INSPECT,210,64,17,15,BS_ICON PUSHBUTTON "Open",IDC_OPENFILENAME,230,64,17,15,BS_ICON - GROUPBOX "Process",IDC_PROCESS,7,115,246,139 + GROUPBOX "Process",IDC_PROCESS,7,112,246,142 LTEXT "Command line:",IDC_STATIC,13,124,50,8 EDITTEXT IDC_CMDLINE,79,122,147,12,ES_AUTOHSCROLL | ES_READONLY LTEXT "Current directory:",IDC_STATIC,13,140,60,8
Update cpp wrapper tests
@@ -3082,6 +3082,19 @@ cpp_wrapper_getsuite_4( PLANCK_UNIT_ADD_TO_SUITE(suite, test_master_table_dictionary_create_delete_all_2); PLANCK_UNIT_ADD_TO_SUITE(suite, test_master_table_dictionary_open_close_all_1); PLANCK_UNIT_ADD_TO_SUITE(suite, test_master_table_dictionary_open_close_all_2); + + return suite; +} + +/** +@brief Creates the suite to test. +@return Pointer to a test suite. +*/ +planck_unit_suite_t * +cpp_wrapper_getsuite_5( +) { + planck_unit_suite_t *suite = planck_unit_new_suite(); + PLANCK_UNIT_ADD_TO_SUITE(suite, test_master_table_all); return suite; @@ -3114,4 +3127,11 @@ runalltests_cpp_wrapper( planck_unit_run_suite(suite4); planck_unit_destroy_suite(suite4); + + fdeleteall(); + + planck_unit_suite_t *suite5 = cpp_wrapper_getsuite_5(); + + planck_unit_run_suite(suite5); + planck_unit_destroy_suite(suite5); }
compiled schema BUGFIX when validating empty leafref path
@@ -2674,6 +2674,12 @@ lys_compile_leafref_validate(struct lysc_ctx *ctx, struct lysc_node *startnode, iter = 0; id = leafref->path; + + if (!*id) { + LOGVAL(ctx->ctx, LY_VLOG_STR, ctx->path, LYVE_SYNTAX_YANG, "Empty leafref path."); + return LY_EVALID; + } + while(*id && (ret = lys_path_token(&id, &prefix, &prefix_len, &name, &name_len, &parent_times, &has_predicate)) == LY_SUCCESS) { if (!iter) { /* first iteration */ /* precess ".." in relative paths */
OcAppleDiskImageLib: Don't zero the ZLIB buffer after allocation as it is required to be entirely filled.
@@ -264,7 +264,7 @@ OcAppleDiskImageRead ( case APPLE_DISK_IMAGE_CHUNK_TYPE_ZLIB: { - ChunkData = AllocateZeroPool (ChunkTotalLength); + ChunkData = AllocatePool (ChunkTotalLength); if (ChunkData == NULL) { return FALSE; }
Do not ignore EVP_PKEY_print_public/EVP_PKEY_print_private return values
@@ -186,23 +186,29 @@ int pkey_main(int argc, char **argv) if (!noout) { if (outformat == FORMAT_PEM) { if (pubout) { - PEM_write_bio_PUBKEY(out, pkey); + if (!PEM_write_bio_PUBKEY(out, pkey)) + goto end; } else { assert(private); - if (traditional) - PEM_write_bio_PrivateKey_traditional(out, pkey, cipher, + if (traditional) { + if (!PEM_write_bio_PrivateKey_traditional(out, pkey, cipher, NULL, 0, NULL, - passout); - else - PEM_write_bio_PrivateKey(out, pkey, cipher, - NULL, 0, NULL, passout); + passout)) + goto end; + } else { + if (!PEM_write_bio_PrivateKey(out, pkey, cipher, + NULL, 0, NULL, passout)) + goto end; + } } } else if (outformat == FORMAT_ASN1) { if (pubout) { - i2d_PUBKEY_bio(out, pkey); + if (!i2d_PUBKEY_bio(out, pkey)) + goto end; } else { assert(private); - i2d_PrivateKey_bio(out, pkey); + if (!i2d_PrivateKey_bio(out, pkey)) + goto end; } } else { BIO_printf(bio_err, "Bad format specified for key\n"); @@ -212,10 +218,12 @@ int pkey_main(int argc, char **argv) if (text) { if (pubtext) { - EVP_PKEY_print_public(out, pkey, 0, NULL); + if (EVP_PKEY_print_public(out, pkey, 0, NULL) <= 0) + goto end; } else { assert(private); - EVP_PKEY_print_private(out, pkey, 0, NULL); + if (EVP_PKEY_print_private(out, pkey, 0, NULL) <= 0) + goto end; } }
refactors event-log replay preparation
@@ -667,12 +667,22 @@ _pier_disk_read_header_complete(u3_disk* log_u, u3_noun dat) } /* _pier_disk_read_header(): -** XX async -** XX very slow */ static void _pier_disk_read_header(u3_disk* log_u) { + // XX disabled + // + // This is very, very slow. + // The one situation in which we currently *need* it - + // full log replay - it's unnecessary thanks to the current + // _pier_disk_load_commit. + // In all other situations, we're covered by + // _pier_work_play or u3_pier_boot. + // In the long run, it seems best to always get identity + // from the log for restart/replay. + // +#if 0 c3_assert( 0 != log_u->fol_u ); c3_d pos_d = log_u->fol_u->end_d; @@ -705,6 +715,7 @@ _pier_disk_read_header(u3_disk* log_u) c3_free(buf_d); } +#endif } /* _pier_disk_load_commit(): load all commits >= evt_d; set ent_u, ext_u. @@ -1099,18 +1110,16 @@ _pier_boot_ready(u3_pier* pir_u) // pir_u->but_d = log_u->com_d; + // begin queuing batches of committed events + // + // XX batch, async + // + _pier_disk_load_commit(pir_u, (1ULL + god_u->dun_d)); + if ( 0 == god_u->dun_d ) { fprintf(stderr, "pier: replaying events 1 through %" PRIu64 "\r\n", log_u->com_d); - // restore pier identity - // - // XX currently very slow - // technically unnecessary due to the current _pier_disk_load_commit - // could be removed if _pier_disk_load_commit were moved before block - // - _pier_disk_read_header(pir_u->log_u); - // prepare serf for replay of boot sequence, don't write log header // _pier_work_boot(pir_u, c3n); @@ -1122,12 +1131,6 @@ _pier_boot_ready(u3_pier* pir_u) log_u->com_d); } - // begin queuing batches of committed events - // - // XX batch, async - // - _pier_disk_load_commit(pir_u, (1ULL + god_u->dun_d)); - pir_u->sat_e = u3_psat_pace; } // resume @@ -1157,6 +1160,10 @@ _pier_disk_init_complete(u3_disk* log_u, c3_d evt_d) log_u->com_d = log_u->moc_d = evt_d; + // restore pier identity (XX currently a no-op, see comment) + // + _pier_disk_read_header(log_u); + _pier_boot_ready(log_u->pir_u); }
Usage guide grammar fix
@@ -40,10 +40,8 @@ cd openssl-1.1.0a make make install -# Make to the main s2n directory -cd ../../ - # Build s2n +cd ../../ make ``` @@ -71,10 +69,8 @@ make depend make make install -# Make to the main s2n directory -cd ../../ - # Build s2n +cd ../../ make ``` @@ -97,10 +93,8 @@ cd libressl-x.y.z ./configure --prefix=`pwd`/../../libcrypto-root/ make CFLAGS=-fPIC install -# Make to the main s2n directory -cd ../../ - # Build s2n +cd ../../ make ```
Fix location of misleading comment Fixes
@@ -446,10 +446,10 @@ process_dio_from_current_dag(uip_ipaddr_t *from, rpl_dio_t *dio) return; } - /* Add neighbor to RPL neighbor table */ nbr = rpl_neighbor_get_from_ipaddr(from); last_dtsn = nbr != NULL ? nbr->dtsn : RPL_LOLLIPOP_INIT; + /* Add neighbor to RPL neighbor table */ if(!update_nbr_from_dio(from, dio)) { LOG_ERR("neighbor table full, dropping DIO\n"); return;
Fix broken test: eccodes_t_definitions
-label "Unstructured Grid Mapping" +# ECMWF Unstructured Grid Mapping concept_nofail unstructuredGridType(unknown,"unstructuredGridType.def",conceptsLocalDirAll,conceptsMasterDir); concept_nofail unstructuredGridSubtype(unknown,"unstructuredGridSubtype.def",conceptsLocalDirAll,conceptsMasterDir); concept_nofail unstructuredGridUUID(unknown,"unstructuredGridUUID.def",conceptsLocalDirAll,conceptsMasterDir); -
cmake: add missing dependency to package config
@PACKAGE_INIT@ -# import our export targets to user of our library -include("${CMAKE_CURRENT_LIST_DIR}/iotivity-liteTargets.cmake") - # If the CMakeLists.txt puts target dependencies to the public build INTERFACE # (i.e. by using target_link_libraries(mytarget PUBLIC|INTERFACE Boost)) # we need to find this dependent target libraries too. @@ -13,5 +10,9 @@ include("${CMAKE_CURRENT_LIST_DIR}/iotivity-liteTargets.cmake") # find_dependency(RapidJSON 1.0 REQUIRED MODULE) include(CMakeFindDependencyMacro) find_dependency(Threads 1.0 REQUIRED MODULE) +find_dependency(MbedTLS 3.1 REQUIRED) + +# import our export targets to user of our library +include("${CMAKE_CURRENT_LIST_DIR}/iotivity-liteTargets.cmake") check_required_components(iotivity-lite)
Removing left over debugging statement. Uncommenting needed line
@@ -23,7 +23,6 @@ then v_patch=${version_list[2]} v_build=${version_list[3]} ((v_build+=1)) - echo "BUild number is $v_build" new_tag="$v_major.$v_minor.$v_patch.$v_build" fi @@ -31,4 +30,4 @@ echo "Tagging new verson: $new_tag" git tag $new_tag echo "Pushing new tag..." -#git push origin --tags +git push origin --tags
fixes ASN.1 DER unsigned integer en/de-coding
++ lem :: element bytes ^- (list @) ?- pec - [%int *] ?: (lte p.pec 127) :: XX unsigned only! - [p.pec ~] - [0 (rip 3 p.pec)] + [%int *] =/ a (flop (rip 3 p.pec)) :: XX unsigned only! + ?~ a [0 ~] + ?:((lte i.a 127) a [0 a]) :: [%oct *] (rip 3 p.pec) [%nul *] ~ %+ cook |*(a=* `spec:asn1`a) ;~ pose %+ stag %int - %+ boss 256 - %+ cook - |=(a=(list @) ?:(?=([@ @ *] a) t.a a)) + %+ bass 256 + %+ sear + |= a=(list @) + ^- (unit (list @)) + ?~ a ~ + ?: ?=([@ ~] a) `a + ?. =(0 i.a) `a + ?.((gth i.t.a 127) ~ `t.a) ;~(pfix (just `@`2) till) :: (stag %oct (boss 256 ;~(pfix (just `@`4) till)))
Register bundled fonts earlier in UIApplicationMainInit * Register bundled fonts earlier in UIApplicationMainInit Fixes * slightly lower - autorelease pool needs to be created first
@@ -145,6 +145,25 @@ int UIApplicationMainInit(NSString* principalClassName, NSRunLoop* runLoop = [NSRunLoop currentRunLoop]; UIApplication* uiApplication; + // Register fonts listed in app's Info.plist, from the app's bundle + // This needs to happen before [UIApplication new]/[objc_getClass(pClassName) new] below, + // as they may attempt to use fonts from the app's bundle + if (infoDict) { + NSArray* fonts = [infoDict objectForKey:@"UIAppFonts"]; + if (fonts != nil) { + NSMutableArray* fontURLs = [NSMutableArray array]; + for (NSString* curFontName in fonts) { + // curFontName contains extension, so pass in nil + NSURL* url = [[NSBundle mainBundle] URLForResource:curFontName withExtension:nil]; + if (url != nil) { + [fontURLs addObject:url]; + } + } + + CTFontManagerRegisterFontsForURLs((CFArrayRef)fontURLs, kCTFontManagerScopeNone, nil); + } + } + if (principalClassName == nil) { principalClassName = [infoDict objectForKey:@"NSPrincipalClass"]; } @@ -168,21 +187,7 @@ int UIApplicationMainInit(NSString* principalClassName, [uiApplication setDelegate:delegateApp]; idretain rootController(nil); - if (infoDict != nil) { - NSArray* fonts = [infoDict objectForKey:@"UIAppFonts"]; - if (fonts != nil) { - NSMutableArray* fontURLs = [NSMutableArray array]; - for (NSString* curFontName in fonts) { - // curFontName contains extension, so pass in nil - NSURL* url = [[NSBundle mainBundle] URLForResource:curFontName withExtension:nil]; - if (url != nil) { - [fontURLs addObject:url]; - } - } - - CTFontManagerRegisterFontsForURLs((CFArrayRef)fontURLs, kCTFontManagerScopeNone, nil); - } - + if (infoDict) { if (defaultOrientation != UIInterfaceOrientationUnknown) { [uiApplication setStatusBarOrientation:defaultOrientation]; [uiApplication _setInternalOrientation:defaultOrientation];
Fix mobile UI part 1
} #facets_mobile ul{ + width: 100%; margin-top: 2px; padding-left: 8%; border:0px; border-bottom:0px; + box-sizing: border-box; + -moz-box-sizing: border-box; } #facets_mobile li{ #facets_mobile .facet.tableWidget.widget .facetName{ position:relative; width:90%; - padding:5%; + padding: 5px 5% !important; font-size:1.1em; } /**************************************/ /*** >>> Search Bar Widget <<< ***/ - .searchBarWidget { clear: both; margin: 5% 2%; ; width: 95%; height:3em; position:relative; } + .searchBarWidget { clear: both; margin: 5% 2%; ; width: 100%; height:3em; position:relative; } .searchBarWidget img{ width:3em; .searchBarWidget .searchMode { display:none; } - .searchBarWidget #sortMode {display:none;} + .searchBarWidget #sortMode {display:none !important;} /**************************************/ /*** >>> Collection Widget <<< ***/ .resultWidget .doc .connector { float: left; height: 100%; width: 5%; } - .resultWidget .doc .res { float: left; height: 100%; padding-left: 10px; width: 98%; position:relative; text-align:justify; + .resultWidget .doc .res { + float: left; + height: 100%; + padding-left: 10px; + width: 100% !important; + position: relative; + text-align:justify; line-height:20px; } /**************************************/ .ui-resizable-handle { height: 10px; } + + #commonLinks{ display: none !important; } + + #results_div{ margin-top: 20px; } + + #searchBar #logo_desktop{ display: none; } + + #searchBar > div.searchBar{ margin-top: 35px; } + + #connectionLink{ + margin-top: 5px !important; + text-align: center; + } + + #connectionLink #logo_mobile{ + display: inline-block !important; + } + + #connectionLink #loginLink{ + position: absolute; + top: 5px; + right: 20px; + } } @media all and (max-width : 430px){ } .searchModeLink { width: 250px; } + +#connectionLink #logo_desktop{ display: none; }
BugID:19249628:fix gatewayapp build error
@@ -167,7 +167,7 @@ int gateway_cloud_publish(udata_type_e type, void* pdata, uint32_t len) } switch (type) { - + #ifdef PT_SENSOR case UDATA_SERVICE_ACC: { accel_data_t *acc = (accel_data_t *)pdata; ret = sprintf(param, PROP_POST_FORMAT_ACC, ((float)acc->data[0]/1000), ((float)acc->data[1]/1000), ((float)acc->data[2]/1000)); @@ -198,7 +198,7 @@ int gateway_cloud_publish(udata_type_e type, void* pdata, uint32_t len) rtc->hours, rtc->minutes, rtc->seconds); break; } - + #endif default: return -1; } @@ -242,7 +242,7 @@ int gateway_sample(void) LOG("%s %s %s %d\n", uDATA_STR, __func__, ERROR_LINE, __LINE__); return ret; } - + #ifdef PT_SENSOR ret = udata_subscribe(UDATA_SERVICE_ACC); if (unlikely(ret != 0)) { LOG("%s %s %s %d\n", uDATA_STR, __func__, ERROR_LINE, __LINE__); @@ -267,7 +267,7 @@ int gateway_sample(void) if (unlikely(ret != 0)) { LOG("%s %s %s %d\n", uDATA_STR, __func__, ERROR_LINE, __LINE__); } - + #endif return 0; }
Cirrus: Enable Network plugin on FreeBSD
@@ -11,8 +11,7 @@ task: script: - mkdir build && cd build - # - The test for the network plugin fails on FreeBSD: https://issues.libelektra.org/2322 - - cmake -GNinja -DPLUGINS='ALL;-network' -DTARGET_PLUGIN_FOLDER="" -DCMAKE_SKIP_INSTALL_RPATH=ON .. + - cmake -GNinja -DPLUGINS='ALL' -DTARGET_PLUGIN_FOLDER="" -DCMAKE_SKIP_INSTALL_RPATH=ON .. - ninja - output="$(ninja install 2>&1)" || printf '%s' "$output"
HLS Sponge: Redo RETC
@@ -138,15 +138,19 @@ void action_wrapper(snap_membus_t *din_gmem, #pragma HLS INTERFACE s_axilite port=Action_Output offset=0x104 bundle=ctrl_reg #pragma HLS INTERFACE s_axilite port=return bundle=ctrl_reg - snapu32_t ReturnCode = 0; + snapu32_t ReturnCode = RET_CODE_OK; uint64_t checksum = 0; uint32_t slice = 0; uint32_t pe, nb_pe; - uint64_t timer_ticks = 4711; + uint64_t timer_ticks = 42; pe = Action_Input->Data.pe; nb_pe = Action_Input->Data.nb_pe; + /* Intermediate result display */ + write_results(Action_Output, Action_Input, ReturnCode, checksum, + timer_ticks); + do { /* Check if the data alignment matches the expectations */ if (Action_Input->Control.action != SPONGE_ACTION_TYPE) { @@ -155,21 +159,21 @@ void action_wrapper(snap_membus_t *din_gmem, } for (slice = 0; slice < NB_SLICES; slice++) { + if (pe == (slice % nb_pe)) + checksum ^= sponge(slice); + /* Intermediate result display */ write_results(Action_Output, Action_Input, ReturnCode, - checksum, (uint64_t)slice); + checksum, timer_ticks); - if (pe == (slice % nb_pe)) { - checksum ^= sponge(slice); - } } timer_ticks += 42; } while (0); /* Final output register writes */ - write_results(Action_Output, Action_Input, ReturnCode, - checksum, timer_ticks); + write_results(Action_Output, Action_Input, ReturnCode, checksum, + timer_ticks); } #ifdef NO_SYNTH
Added one more missing "fall through" comment in tests.
@@ -72,6 +72,7 @@ nxt_lvlhsh_unit_test_add(nxt_lvlhsh_t *lh, const nxt_lvlhsh_proto_t *proto, case NXT_DECLINED: nxt_thread_log_alert("lvlhsh unit test failed: " "key %p is already in hash", key); + /* Fall through. */ default: return NXT_ERROR; }
Fix errors in EVP_PKEY_fromdata examples The EVP_PKEY_fromdata man page has some code examples with various errors in them. This fixes those errors.
@@ -138,6 +138,7 @@ TODO Write a set of cookbook documents and link to them. #include <openssl/evp.h> #include <openssl/param_build.h> + #include <openssl/ec.h> /* * Fixed data to represent the private and public key. @@ -160,12 +161,6 @@ TODO Write a set of cookbook documents and link to them. 0x8f, 0xb9, 0x33, 0x6e, 0xcf, 0x12, 0x16, 0x2f, 0x5c, 0xcd, 0x86, 0x71, 0xa8, 0xbf, 0x1a, 0x47 }; - const OSSL_PARAM params[] = { - OSSL_PARAM_utf8_string("group", "prime256v1", 10), - OSSL_PARAM_BN("priv", priv, sizeof(priv)), - OSSL_PARAM_BN("pub", pub, sizeof(pub)), - OSSL_PARAM_END - }; int main() { @@ -181,15 +176,15 @@ TODO Write a set of cookbook documents and link to them. param_bld = OSSL_PARAM_BLD_new(); if (priv != NULL && param_bld != NULL && OSSL_PARAM_BLD_push_utf8_string(param_bld, "group", - "prime256v1", 0); - && OSSL_PARAM_BLD_push_BN(param_bld, "priv", priv); + "prime256v1", 0) + && OSSL_PARAM_BLD_push_BN(param_bld, "priv", priv) && OSSL_PARAM_BLD_push_octet_string(param_bld, "pub", pub_data, sizeof(pub_data))) params = OSSL_PARAM_BLD_to_param(param_bld); ctx = EVP_PKEY_CTX_new_from_name(NULL, "EC", NULL); if (ctx == NULL - || params != NULL + || params == NULL || EVP_PKEY_fromdata_init(ctx) <= 0 || EVP_PKEY_fromdata(ctx, &pkey, EVP_PKEY_KEYPAIR, params) <= 0) { exitcode = 1; @@ -209,12 +204,13 @@ TODO Write a set of cookbook documents and link to them. =head2 Finding out params for an unknown key type #include <openssl/evp.h> + #include <openssl/core.h> /* Program expects a key type as first argument */ int main(int argc, char *argv[]) { EVP_PKEY_CTX *ctx = EVP_PKEY_CTX_new_from_name(NULL, argv[1], NULL); - const *OSSL_PARAM *settable_params = NULL; + const OSSL_PARAM *settable_params = NULL; if (ctx == NULL) exit(1); @@ -247,9 +243,9 @@ TODO Write a set of cookbook documents and link to them. } printf("%s : %s ", settable_params->key, datatype); if (settable_params->data_size == 0) - printf("(unlimited size)"); + printf("(unlimited size)\n"); else - printf("(maximum size %zu)", settable_params->data_size); + printf("(maximum size %zu)\n", settable_params->data_size); } }
Bump build.sbt
@@ -313,6 +313,7 @@ lazy val firechip = (project in file("generators/firechip")) ) lazy val fpga_shells = (project in file("./fpga/fpga-shells")) .dependsOn(rocketchip, sifive_blocks) + .settings(libraryDependencies ++= rocketLibDeps.value) .settings(commonSettings) lazy val fpga_platforms = (project in file("./fpga"))
feat: add a check to make sure fast_init is called only once
@@ -40,12 +40,24 @@ init(char token[]) client* fast_init(const char config_file[]) { - // This will be returned from this function - // it has to be static. It also means we can - // only have one setting per main. + /* + * settings will be returned from this function, + * it has to be static. It also means we can + * only have one settings per bot. + */ static struct orka_settings settings; memset(&settings, 0, sizeof(orka_settings)); + /* + * set a flag to make sure this function is called only once. + */ + static int called = 0; + if (0 == called) + called = 1; + else + ERR("fast_init has been called, it can only be called once in each bot\n"); + + orka_settings_init(&settings, config_file); client *client;
Enable CFG builds
<TreatWarningAsError>true</TreatWarningAsError> <MultiProcessorCompilation>true</MultiProcessorCompilation> <EnableEnhancedInstructionSet>StreamingSIMDExtensions</EnableEnhancedInstructionSet> + <ControlFlowGuard>Guard</ControlFlowGuard> </ClCompile> <Link> <AdditionalDependencies>aclui.lib;comctl32.lib;iphlpapi.lib;noarg.obj;noenv.obj;ntdll.lib;phlib.lib;uxtheme.lib;version.lib;windowscodecs.lib;winsta.lib;ws2_32.lib;%(AdditionalDependencies)</AdditionalDependencies> <CallingConvention>StdCall</CallingConvention> <TreatWarningAsError>true</TreatWarningAsError> <MultiProcessorCompilation>true</MultiProcessorCompilation> + <ControlFlowGuard>Guard</ControlFlowGuard> </ClCompile> <Link> <AdditionalDependencies>aclui.lib;comctl32.lib;iphlpapi.lib;noarg.obj;noenv.obj;ntdll.lib;phlib.lib;uxtheme.lib;version.lib;windowscodecs.lib;winsta.lib;ws2_32.lib;%(AdditionalDependencies)</AdditionalDependencies>
VOM: memset DHCP hostname in VPP API
@@ -48,6 +48,7 @@ bind_cmd::issue(connection& con) payload.pid = getpid(); payload.want_dhcp_event = 1; + memset(payload.hostname, 0, sizeof(payload.hostname)); memcpy(payload.hostname, m_hostname.c_str(), std::min(sizeof(payload.hostname), m_hostname.length()));
fix phy init memory leak
@@ -352,6 +352,7 @@ const esp_phy_init_data_t* esp_phy_get_init_data(void) PHY_INIT_MAGIC, sizeof(phy_init_magic_post)) != 0) { #ifndef CONFIG_ESP32_PHY_DEFAULT_INIT_IF_INVALID ESP_LOGE(TAG, "failed to validate PHY data partition"); + free(init_data_store); return NULL; #else ESP_LOGE(TAG, "failed to validate PHY data partition, restoring default data into flash..."); @@ -855,6 +856,12 @@ esp_err_t esp_phy_update_country_info(const char *country) { #if CONFIG_ESP32_SUPPORT_MULTIPLE_PHY_INIT_DATA_BIN uint8_t phy_init_data_type_map = 0; + + if (!s_multiple_phy_init_data_bin) { + ESP_LOGD(TAG, "Does not support multiple PHY init data bins"); + return ESP_FAIL; + } + //if country equal s_phy_current_country, return; if (!memcmp(country, s_phy_current_country, sizeof(s_phy_current_country))) { return ESP_OK; @@ -862,11 +869,6 @@ esp_err_t esp_phy_update_country_info(const char *country) memcpy(s_phy_current_country, country, sizeof(s_phy_current_country)); - if (!s_multiple_phy_init_data_bin) { - ESP_LOGD(TAG, "Does not support multiple PHY init data bins"); - return ESP_FAIL; - } - phy_init_data_type_map = phy_find_bin_type_according_country(country); if (phy_init_data_type_map == s_phy_init_data_type) { return ESP_OK;
add luat_wlan.md
"path": "." } ], - "settings": {} + "settings": { + "files.associations": { + "algorithm": "c", + "concepts": "c", + "cstddef": "c", + "cstdio": "c", + "cstdlib": "c", + "cstring": "c", + "cwchar": "c", + "initializer_list": "c", + "new": "c", + "type_traits": "c", + "utility": "c", + "xmemory": "c", + "xutility": "c" + } + } } \ No newline at end of file
Validate ethereum pool extra config
@@ -27,7 +27,9 @@ using System.Reactive.Threading.Tasks; using System.Threading.Tasks; using Autofac; using AutoMapper; +using MiningCore.Blockchain.Ethereum.Configuration; using MiningCore.Configuration; +using MiningCore.Extensions; using MiningCore.JsonRpc; using MiningCore.Mining; using MiningCore.Notifications; @@ -35,6 +37,7 @@ using MiningCore.Persistence; using MiningCore.Persistence.Repositories; using MiningCore.Stratum; using MiningCore.Time; +using MiningCore.Util; using Newtonsoft.Json; namespace MiningCore.Blockchain.Ethereum @@ -324,6 +327,16 @@ namespace MiningCore.Blockchain.Ethereum blockchainStats = manager.BlockchainStats; } + public override void Configure(PoolConfig poolConfig, ClusterConfig clusterConfig) + { + base.Configure(poolConfig, clusterConfig); + + // validate mandatory extra config + var extraConfig = poolConfig.PaymentProcessing.Extra.SafeExtensionDataAs<EthereumPoolPaymentProcessingConfigExtra>(); + if (string.IsNullOrEmpty(extraConfig?.CoinbasePassword)) + logger.ThrowLogPoolStartupException("\"paymentProcessing.coinbasePassword\" pool-configuration property missing or empty (required for unlocking wallet during payment processing)"); + } + #endregion // Overrides } }