message
stringlengths
6
474
diff
stringlengths
8
5.22k
do log errors in the error log when on invalid request to redirect URI
@@ -2842,6 +2842,10 @@ int oidc_handle_redirect_uri_request(request_rec *r, oidc_cfg *c, oidc_handle_redirect_authorization_response(r, c, session); } + oidc_error(r, + "The OpenID Connect callback URL received an invalid request: %s; returning HTTP_INTERNAL_SERVER_ERROR", + r->args); + /* something went wrong */ return oidc_util_html_send_error(r, c->error_template, "Invalid Request", apr_psprintf(r->pool,
misc: 19.04.2 Release Notes Type: docs
# Release Notes {#release_notes} * @subpage release_notes_1908 +* @subpage release_notes_19042 * @subpage release_notes_19041 * @subpage release_notes_1904 * @subpage release_notes_19013 TBD +@page release_notes_19042 Release notes for VPP 19.04.2 + +This is bug fix release. + +For the full list of fixed issues please refer to: +- fd.io [JIRA](https://jira.fd.io) +- git [commit log](https://git.fd.io/vpp/log/?h=stable/1904) + @page release_notes_19041 Release notes for VPP 19.04.1 This is bug fix release.
Enable debug tests only in windows ci.
@@ -17,7 +17,7 @@ jobs: strategy: matrix: - buildtype: [debug, release] + buildtype: [debug] # [debug, release] # TODO: Enable release when all debug tests pass env: LTTNG_UST_REGISTER_TIMEOUT: 0
Now using ++circle-peer for the creation of /circle peer moves, to ensure consistency.
::> or if we haven't gotten any yet, messages ::> from up to a day ago. =+ num=(~(get by sequence) pan) - =+ old=(sub now.bol ~d1) :: XX full backlog - =+ ini=?^(num (scot %ud u.num) (scot %da old)) + =+ old=(sub now.bol ~d1) ::TODO? full backlog + =+ ini=?^(num [%ud u.num] [%da old]) ?- -.pan $| !! ::< passport partner :: $& ::< circle partner :_ ~ - :* %peer - /circle/[nom]/(scot %p hos.p.pan)/[nom.p.pan] - [hos.p.pan %talk-guardian] - /circle/[nom.p.pan]/[ini] - == + (circle-peer nom p.pan `[ini ~]) == :: ++ sa-abjure ::< unsubscribe us =+ wer=(etch wir) ?>(?=($repeat -.wer) (fun num.wer cir.wer)) :: +++ circle-peer ::< /circle peer card + ::> constructs a %peer move to subscribe {nom} to + ::> {cir}. + :: + |= {nom/cord cir/circle wen/range} + ^- card + :* %peer + /circle/[nom]/(scot %p hos.cir)/[nom.cir] + [hos.cir %talk-guardian] + %+ welp /circle/[nom.cir] + ?~ wen ~ + %+ welp + /(scot -.hed.u.wen +.hed.u.wen) + ?~ tal.u.wen ~ + /(scot -.u.tal.u.wen +.u.tal.u.wen) + == +:: ::> || ::> || %new-events ::> || ^- (quip move +>) %+ etch-circle [%circle wir] |= {nom/knot cir/circle} - ::TODO do better :_ +>.^$ :_ ~ - :* 0 - %peer - /circle/[nom]/(scot %p hos.cir)/[nom.cir] - [hos.cir %hall] - /circle/[nom.cir]/(sub now.bol ~h1) - == + [0 (circle-peer nom cir `[[%da (sub now.bol ~m5)] ~])] :: ++ coup-repeat ::< message n/ack ::> ack from ++ta-transmit. mark the message as
Fix missing new-line in automatic tag description.
@@ -106,7 +106,7 @@ def main(): ) subprocess.check_call( ['git', 'tag', args.tag, '-a', '-m', - '%s\n%s' % (args.tag, changes)] + edit, + '%s\n\n%s' % (args.tag, changes)] + edit, ) subprocess.check_call( ['git', 'push', '--follow-tags'],
new benchmarks (zfill, zsmul)
@@ -537,6 +537,45 @@ static double bench_fftmod(long scale) +static double bench_generic_expand(int typ, long scale) +{ + long dims[DIMS] = { 1, 256 * scale, 256 * scale, 1, 1, 16, 1, 16 }; + + complex float* x = md_alloc(DIMS, dims, CFL_SIZE); + + double tic = timestamp(); + + switch (typ) { + + case 0: + md_zfill(DIMS, dims, x, 1.); + break; + case 1: + md_zsmul(DIMS, dims, x, x, 1.); + break; + default: + assert(0); + } + + double toc = timestamp(); + + md_free(x); + + return toc - tic; +} + + +static double bench_zfill(long scale) +{ + return bench_generic_expand(0, scale); +} + +static double bench_zsmul(long scale) +{ + return bench_generic_expand(1, scale); +} + + enum bench_indices { REPETITION_IND, SCALE_IND, THREADS_IND, TESTS_IND, BENCH_DIMS }; @@ -597,6 +636,8 @@ const struct benchmark_s { { bench_zl1norm, "l1 norm" }, { bench_copy1, "copy 1" }, { bench_copy2, "copy 2" }, + { bench_zfill, "complex fill" }, + { bench_zsmul, "complex scalar multiplication" }, { bench_wavelet, "wavelet soft thresh" }, { bench_mdfft, "(MD-)FFT" }, { bench_fft, "FFT" },
Tests: TestControl refactored.
@@ -2,47 +2,56 @@ import json from unit.http import TestHTTP +def args_handler(conf_func): + def args_wrapper(self, *args): + argcount = conf_func.__code__.co_argcount + url_default = '/config' + conf = None + + if argcount == 2: + url = args[0] if len(args) == 1 else url_default + + elif argcount == 3: + conf = args[0] + + if isinstance(conf, dict) or isinstance(conf, list): + conf = json.dumps(conf) + + url = args[1] if len(args) == 2 else url_default + + url = url if url.startswith('/') else url_default + '/' + url + arguments = (self, url) if conf is None else (self, conf, url) + + return json.loads(conf_func(*arguments)) + + return args_wrapper + + class TestControl(TestHTTP): # TODO socket reuse # TODO http client - def conf(self, conf, path='/config'): - if isinstance(conf, dict) or isinstance(conf, list): - conf = json.dumps(conf) + @args_handler + def conf(self, conf, url): + return self.put(**self._get_args(url, conf))['body'] + + @args_handler + def conf_get(self, url): + return self.get(**self._get_args(url))['body'] + + @args_handler + def conf_delete(self, url): + return self.delete(**self._get_args(url))['body'] + + def _get_args(self, url, conf=None): + args = { + 'url': url, + 'sock_type': 'unix', + 'addr': self.testdir + '/control.unit.sock', + } + + if conf is not None: + args['body'] = conf - if path[:1] != '/': - path = '/config/' + path - - return json.loads( - self.put( - url=path, - body=conf, - sock_type='unix', - addr=self.testdir + '/control.unit.sock', - )['body'] - ) - - def conf_get(self, path='/config'): - if path[:1] != '/': - path = '/config/' + path - - return json.loads( - self.get( - url=path, - sock_type='unix', - addr=self.testdir + '/control.unit.sock', - )['body'] - ) - - def conf_delete(self, path='/config'): - if path[:1] != '/': - path = '/config/' + path - - return json.loads( - self.delete( - url=path, - sock_type='unix', - addr=self.testdir + '/control.unit.sock', - )['body'] - ) + return args
Transform:getMatrix accepts target table;
@@ -33,15 +33,20 @@ int luax_readtransform(lua_State* L, int index, mat4 m, int scaleComponents) { int l_lovrTransformGetMatrix(lua_State* L) { Transform* transform = luax_checktype(L, 1, Transform); + bool table = lua_istable(L, 2); + lua_settop(L, 2); float matrix[16]; lovrTransformGetMatrix(transform, matrix); for (int i = 0; i < 16; i++) { lua_pushnumber(L, matrix[i]); + if (table) { + lua_rawseti(L, 2, i + 1); + } } - return 16; + return table ? 1 : 16; } int l_lovrTransformSetMatrix(lua_State* L) {
esp_modem: Ensure uart_param_config and uart pins are set before uart_driver_install Fixes Guru Meditation Error: Core 0 panic'ed (LoadProhibited) when config with CONFIG_PM_ENABLE=y && CONFIG_PM_DFS_INIT_AUTO=y. Merges
@@ -390,11 +390,6 @@ modem_dte_t *esp_modem_dte_init(const esp_modem_dte_config_t *config) .source_clk = UART_SCLK_REF_TICK, .flow_ctrl = (config->flow_control == MODEM_FLOW_CONTROL_HW) ? UART_HW_FLOWCTRL_CTS_RTS : UART_HW_FLOWCTRL_DISABLE }; - /* Install UART driver and get event queue used inside driver */ - res = uart_driver_install(esp_dte->uart_port, CONFIG_MODEM_UART_RX_BUFFER_SIZE, CONFIG_MODEM_UART_TX_BUFFER_SIZE, - CONFIG_MODEM_UART_EVENT_QUEUE_SIZE, &(esp_dte->event_queue), 0); - MODEM_CHECK(res == ESP_OK, "install uart driver failed", err_uart_config); - MODEM_CHECK(uart_param_config(esp_dte->uart_port, &uart_config) == ESP_OK, "config uart parameter failed", err_uart_config); if (config->flow_control == MODEM_FLOW_CONTROL_HW) { res = uart_set_pin(esp_dte->uart_port, CONFIG_MODEM_UART_MODEM_TX_PIN, CONFIG_MODEM_UART_MODEM_RX_PIN, @@ -411,6 +406,11 @@ modem_dte_t *esp_modem_dte_init(const esp_modem_dte_config_t *config) res = uart_set_sw_flow_ctrl(esp_dte->uart_port, true, 8, UART_FIFO_LEN - 8); } MODEM_CHECK(res == ESP_OK, "config uart flow control failed", err_uart_config); + /* Install UART driver and get event queue used inside driver */ + res = uart_driver_install(esp_dte->uart_port, CONFIG_MODEM_UART_RX_BUFFER_SIZE, CONFIG_MODEM_UART_TX_BUFFER_SIZE, + CONFIG_MODEM_UART_EVENT_QUEUE_SIZE, &(esp_dte->event_queue), 0); + MODEM_CHECK(res == ESP_OK, "install uart driver failed", err_uart_config); + /* Set pattern interrupt, used to detect the end of a line. */ res = uart_enable_pattern_det_baud_intr(esp_dte->uart_port, '\n', 1, MIN_PATTERN_INTERVAL, MIN_POST_IDLE, MIN_PRE_IDLE); /* Set pattern queue size */
Fix Windows builds, which were getting "possible loss of data" "bignum_new.c(61,52): warning C4244: 'function': conversion from 'mbedtls_mpi_uint' to 'unsigned int', possible loss of data"
@@ -49,12 +49,11 @@ void mbedtls_mpi_core_montmul( mbedtls_mpi_uint *X, (void) mbedtls_mpi_core_mla( T, n + 2, N, n, u1 ); } - mbedtls_mpi_uint carry, borrow, fixup; + mbedtls_mpi_uint carry, borrow; carry = T[n]; borrow = mbedtls_mpi_core_sub( X, T, N, n ); - fixup = carry < borrow; - (void) mbedtls_mpi_core_add_if( X, N, n, fixup ); + (void) mbedtls_mpi_core_add_if( X, N, n, ( carry < borrow ) ); } mbedtls_mpi_uint mbedtls_mpi_core_mla( mbedtls_mpi_uint *d, size_t d_len,
iokernel: bug fix
@@ -391,9 +391,11 @@ static struct thread *pick_thread_for_core(int core) /* try to allocate to the process running on the hyperthread pair core */ buddy_core = cpu_to_sibling_cpu(core); + if (core_history[buddy_core].current) { p = core_history[buddy_core].current->p; if (!p->removed && proc_is_overloaded(p)) goto chose_proc; + } /* try to allocate to the process that used this core most recently */ if (core_history[core].prev) {
[fpga] Add debug capabilities
@@ -52,10 +52,10 @@ module mempool_system #( External } axi_slave_target; - axi_tile_req_t [NumAXIMasters - 1:0] axi_mst_req; - axi_tile_resp_t [NumAXIMasters - 1:0] axi_mst_resp; - axi_system_req_t [NumAXISlaves - 1:0] axi_mem_req; - axi_system_resp_t [NumAXISlaves - 1:0] axi_mem_resp; + (* mark_debug = "true" *) axi_tile_req_t [NumAXIMasters - 1:0] axi_mst_req; + (* mark_debug = "true" *) axi_tile_resp_t [NumAXIMasters - 1:0] axi_mst_resp; + (* mark_debug = "true" *) axi_system_req_t [NumAXISlaves - 1:0] axi_mem_req; + (* mark_debug = "true" *) axi_system_resp_t [NumAXISlaves - 1:0] axi_mem_resp; logic [NumCores - 1:0] wake_up; logic [DataWidth - 1:0] eoc; @@ -146,13 +146,13 @@ module mempool_system #( ********/ // Memory - logic mem_req; - logic mem_rvalid; - addr_t mem_addr; - axi_data_t mem_wdata; - axi_strb_t mem_strb; - logic mem_we; - axi_data_t mem_rdata; + (* mark_debug = "true" *) logic mem_req; + (* mark_debug = "true" *) logic mem_rvalid; + (* mark_debug = "true" *) addr_t mem_addr; + (* mark_debug = "true" *) axi_data_t mem_wdata; + (* mark_debug = "true" *) axi_strb_t mem_strb; + (* mark_debug = "true" *) logic mem_we; + (* mark_debug = "true" *) axi_data_t mem_rdata; axi2mem #( .axi_req_t (axi_system_req_t ), @@ -250,10 +250,10 @@ module mempool_system #( * Control Registers * ***********************/ - axi_ctrl_req_t axi_ctrl_req; - axi_ctrl_resp_t axi_ctrl_resp; - axi_lite_slv_req_t axi_lite_ctrl_registers_req; - axi_lite_slv_resp_t axi_lite_ctrl_registers_resp; + (* mark_debug = "true" *) axi_ctrl_req_t axi_ctrl_req; + (* mark_debug = "true" *) axi_ctrl_resp_t axi_ctrl_resp; + (* mark_debug = "true" *) axi_lite_slv_req_t axi_lite_ctrl_registers_req; + (* mark_debug = "true" *) axi_lite_slv_resp_t axi_lite_ctrl_registers_resp; axi_dw_converter #( .AxiMaxReads (1 ), // Number of outstanding reads
in_cpu: validate sscanf() return value (CID 161076)
@@ -124,6 +124,9 @@ static inline double proc_cpu_load(int cpus, struct cpu_stats *cstats) &s->v_system, &s->v_idle, &s->v_iowait); + if (ret < 5) { + return -1; + } } else { fmt = " %s %lu %lu %lu %lu %lu";
clarify h2olog requirements (esp. cmake version)
@@ -19,8 +19,8 @@ EOT <h3>For building h2olog</h3> <ul> -<li>LLVM and clang (&gt;= 3.7.1)</li> -<li>CMake for generating the build files</li> +<li>C++11 compiler</li> +<li>CMake (&gt;= 3.8) for generating the build files</li> <li>pkg-config for detecting dependencies</li> <li>Python 3 for the code generator</li> <li><a href="https://iovisor.github.io/bcc/">BCC (a.k.a. bpfcc)</a>(&gt;= 0.11.0) <a href="https://github.com/iovisor/bcc/blob/master/INSTALL.md">installed</a> on your system</li> @@ -33,6 +33,7 @@ EOT <h3>For running h2olog</h3> <ul> <li>Root privilege to execute the program</li> +<li>Linux kernel (&gt;= 4.9)</li> <li>H2O server built after <a href="https://github.com/h2o/h2o/commit/53e1db428772460534191d1c35c79a6dd94e021f">53e1db42</a> with <code>-DWITH_DTRACE=on</code> cmake option</li> </ul>
Remove unnecessary pstrdup in fetch_table_list. The result of TextDatumGetCString is already palloc'ed so we don't need to allocate memory for it again. We decide not to backpatch it as there doesn't seem to be any case where it can create a meaningful leak. Author: Zhijie Hou Discussion:
@@ -1267,7 +1267,7 @@ fetch_table_list(WalReceiverConn *wrconn, List *publications) relname = TextDatumGetCString(slot_getattr(slot, 2, &isnull)); Assert(!isnull); - rv = makeRangeVar(pstrdup(nspname), pstrdup(relname), -1); + rv = makeRangeVar(nspname, relname, -1); tablelist = lappend(tablelist, rv); ExecClearTuple(slot);
Refactor Insta switch modelId detection, set proper Etag
@@ -2080,13 +2080,16 @@ void DeRestPluginPrivate::checkSensorButtonEvent(Sensor *sensor, const deCONZ::A if (!sensor->modelId().endsWith(QLatin1String("_1"))) { // extract model identifier from mac address 6th byte const quint64 model = (sensor->address().ext() >> 16) & 0xff; - if (model == 0x01) { sensor->setModelId(QLatin1String("HS_4f_GJ_1")); } - else if (model == 0x02) { sensor->setModelId(QLatin1String("WS_4f_J_1")); } - else if (model == 0x03) { sensor->setModelId(QLatin1String("WS_3f_G_1")); } + QString modelId; + if (model == 0x01) { modelId = QLatin1String("HS_4f_GJ_1"); } + else if (model == 0x02) { modelId = QLatin1String("WS_4f_J_1"); } + else if (model == 0x03) { modelId = QLatin1String("WS_3f_G_1"); } - if (model > 0 && model < 4) + if (!modelId.isEmpty() && sensor->modelId() != modelId) { + sensor->setModelId(modelId); sensor->setNeedSaveDatabase(true); + updateSensorEtag(sensor); } } } @@ -2113,6 +2116,7 @@ void DeRestPluginPrivate::checkSensorButtonEvent(Sensor *sensor, const deCONZ::A if (sensor->mode() != Sensor::ModeScenes) // for now all other switches only support scene mode { sensor->setMode(Sensor::ModeScenes); + updateSensorEtag(sensor); } }
Rename write supported_versions ext
@@ -760,13 +760,14 @@ static int ssl_tls13_prepare_server_hello( mbedtls_ssl_context *ssl ) } /* - * ssl_tls13_write_selected_version_ext(): + * ssl_tls13_write_server_hello_supported_versions_ext (): * * struct { * ProtocolVersion selected_version; * } SupportedVersions; */ -static int ssl_tls13_write_selected_version_ext( mbedtls_ssl_context *ssl, +static int ssl_tls13_write_server_hello_supported_versions_ext( + mbedtls_ssl_context *ssl, unsigned char *buf, unsigned char *end, size_t *out_len ) @@ -988,7 +989,7 @@ static int ssl_tls13_write_server_hello_body( mbedtls_ssl_context *ssl, p += 2; /* Add supported_version extension */ - if( ( ret = ssl_tls13_write_selected_version_ext( + if( ( ret = ssl_tls13_write_server_hello_supported_versions_ext( ssl, p, end, &output_len ) ) != 0 ) { MBEDTLS_SSL_DEBUG_RET( 1, "ssl_tls13_write_selected_version_ext",
BugID: add LS Config for uno-91h
@@ -44,6 +44,12 @@ GLOBAL_DEFINES += $$(if $$(NO_CRLF_STDIO_REPLACEMENT),,CRLF_STDIO_REPLACEMENT) GLOBAL_CFLAGS += -DRDA5981X -mcpu=cortex-m4 -mthumb -mfloat-abi=soft GLOBAL_CFLAGS += -DRDA5981A +# Link Security Config +CONFIG_LS_DEBUG := n +CONFIG_LS_ID2_OTP := y +CONFIG_LS_KM_SE := n +CONFIG_LS_KM_TEE := n + GLOBAL_LDFLAGS += -T uno-91h.ld # Extra build target include bootloader, and copy output file to eclipse debug file (copy_output_for_eclipse)
Update DnsQuery flags
@@ -356,7 +356,7 @@ PPH_STRING PhpGetIp4ReverseNameFromAddress( ) { return PhFormatString( - L"%u.%u.%u.%u.%s", + L"%hhu.%hhu.%hhu.%hhu.%s", Address.s_impno, Address.s_lh, Address.s_host, @@ -377,7 +377,7 @@ PPH_STRING PhpGetIp6ReverseNameFromAddress( { PhAppendFormatStringBuilder( &stringBuilder, - L"%x.%x.", + L"%hhx.%hhx.", Address.s6_addr[i] & 0xF, (Address.s6_addr[i] >> 4) & 0xF ); @@ -412,7 +412,7 @@ PPH_STRING PhGetHostNameFromAddressEx( DnsQuery( addressReverse->Buffer, DNS_TYPE_PTR, - DNS_QUERY_BYPASS_CACHE | DNS_QUERY_NO_HOSTS_FILE, + DNS_QUERY_NO_HOSTS_FILE, // DNS_QUERY_BYPASS_CACHE NULL, &addressResults, NULL
autotest/psd: increasing default minimum FFT size for analysis
@@ -268,7 +268,7 @@ int liquid_autotest_validate_psd_signal(float complex * _buf, unsigned int _buf_ autotest_psd_s * _regions, unsigned int num_regions, const char * debug_filename) { // compute signal's power spectral density - unsigned int nfft = 4 << liquid_nextpow2(_buf_len < 8 ? 8 : _buf_len); + unsigned int nfft = 4 << liquid_nextpow2(_buf_len < 64 ? 64 : _buf_len); float complex * buf_time = (float complex*) malloc(nfft*sizeof(float complex)); float complex * buf_freq = (float complex*) malloc(nfft*sizeof(float complex)); float * buf_psd = (float * ) malloc(nfft*sizeof(float ));
Remove superfluous EVP_KDF_CTRL_ defines. These defines were never used and not needed.
@@ -56,31 +56,6 @@ void EVP_KDF_names_do_all(const EVP_KDF *kdf, void (*fn)(const char *name, void *data), void *data); -# define EVP_KDF_CTRL_SET_PASS 0x01 /* unsigned char *, size_t */ -# define EVP_KDF_CTRL_SET_SALT 0x02 /* unsigned char *, size_t */ -# define EVP_KDF_CTRL_SET_ITER 0x03 /* int */ -# define EVP_KDF_CTRL_SET_MD 0x04 /* EVP_MD * */ -# define EVP_KDF_CTRL_SET_KEY 0x05 /* unsigned char *, size_t */ -# define EVP_KDF_CTRL_SET_MAXMEM_BYTES 0x06 /* uint64_t */ -# define EVP_KDF_CTRL_SET_TLS_SECRET 0x07 /* unsigned char *, size_t */ -# define EVP_KDF_CTRL_ADD_TLS_SEED 0x08 /* unsigned char *, size_t */ -# define EVP_KDF_CTRL_RESET_HKDF_INFO 0x09 -# define EVP_KDF_CTRL_ADD_HKDF_INFO 0x0a /* unsigned char *, size_t */ -# define EVP_KDF_CTRL_SET_HKDF_MODE 0x0b /* int */ -# define EVP_KDF_CTRL_SET_SCRYPT_N 0x0c /* uint64_t */ -# define EVP_KDF_CTRL_SET_SCRYPT_R 0x0d /* uint32_t */ -# define EVP_KDF_CTRL_SET_SCRYPT_P 0x0e /* uint32_t */ -# define EVP_KDF_CTRL_SET_SSHKDF_XCGHASH 0x0f /* unsigned char *, size_t */ -# define EVP_KDF_CTRL_SET_SSHKDF_SESSION_ID 0x10 /* unsigned char *, size_t */ -# define EVP_KDF_CTRL_SET_SSHKDF_TYPE 0x11 /* int */ -# define EVP_KDF_CTRL_SET_MAC 0x12 /* EVP_MAC * */ -# define EVP_KDF_CTRL_SET_MAC_SIZE 0x13 /* size_t */ -# define EVP_KDF_CTRL_SET_SSKDF_INFO 0x14 /* unsigned char *, size_t */ -# define EVP_KDF_CTRL_SET_PBKDF2_PKCS5_MODE 0x15 /* int */ -# define EVP_KDF_CTRL_SET_UKM 0x16 /* unsigned char *, size_t */ -# define EVP_KDF_CTRL_SET_CEK_ALG 0x17 /* char * */ -# define EVP_KDF_CTRL_SET_SHARED_INFO EVP_KDF_CTRL_SET_SSKDF_INFO - # define EVP_KDF_HKDF_MODE_EXTRACT_AND_EXPAND 0 # define EVP_KDF_HKDF_MODE_EXTRACT_ONLY 1 # define EVP_KDF_HKDF_MODE_EXPAND_ONLY 2
[GB] Implement LD HL, SP+i8 instruction
@@ -360,10 +360,12 @@ impl Display for AddressingMode { } } -// OpInfo { OpName, Op, DerefMode } - impl CpuState { pub fn new(mmu: Rc<Mmu>) -> Self { + // TODO(PT): Provide an 'operation' flag to instruction decoding + // If the operation is 'decode', print the decoded instruction without running it + // If the operation is 'execute', run the instruction + // This allows us to keep just a single decoding layer let mut operands: BTreeMap<RegisterName, Box<dyn VariableStorage>> = BTreeMap::new(); // 8-bit operands @@ -1251,6 +1253,16 @@ impl CpuState { Some(InstrInfo::seq(2, 4)) } + 0xf8 => { + // LD HL, SP+i8 + let hl = self.reg(RegisterName::HL); + let sp = self.reg(RegisterName::SP); + let offset = self.mmu.read(self.get_pc() + 1) as i8; + let val = self.add16_update_flags(sp.read_u16(&self), offset as u16, &[]); + hl.write_u16(&self, val); + Some(InstrInfo::seq(2, 3)) + // TODO(PT): For this and above do debug + } 0xde => { // SBC A, u8 let a = self.reg(RegisterName::A); @@ -3946,4 +3958,22 @@ mod tests { assert!(cpu.is_flag_set(Flag::Subtract)); assert!(cpu.is_flag_set(Flag::Carry)); } + + /* LD HL, SP+i8 */ + + #[test] + fn test_ld_hl_sp_i8() { + let gb = get_system(); + let mut cpu = gb.cpu.borrow_mut(); + + cpu.set_flags(true, true, true, true); + cpu.reg(RegisterName::SP).write_u16(&cpu, 0xfff8); + gb.get_mmu().write(1, 0x02); + gb.run_opcode_with_expected_attrs(&mut cpu, 0xf8, 2, 3); + assert_eq!(cpu.reg(RegisterName::HL).read_u16(&cpu), 0xfffa); + assert!(!cpu.is_flag_set(Flag::Zero)); + assert!(!cpu.is_flag_set(Flag::HalfCarry)); + assert!(!cpu.is_flag_set(Flag::Subtract)); + assert!(!cpu.is_flag_set(Flag::Carry)); + } }
Fix Buffer copy range calculation;
@@ -278,8 +278,8 @@ static int l_lovrPassCopy(lua_State* L) { const BufferInfo* info = lovrBufferGetInfo(buffer); uint32_t limit = MIN(blob->size - srcOffset, info->length * info->stride - dstOffset); uint32_t extent = luax_optu32(L, 6, limit); - lovrCheck(extent < blob->size - srcOffset, "Buffer copy range exceeds Blob size"); - lovrCheck(extent < info->length * info->stride, "Buffer copy offset exceeds Buffer size"); + lovrCheck(extent <= blob->size - srcOffset, "Buffer copy range exceeds Blob size"); + lovrCheck(extent <= info->length * info->stride - dstOffset, "Buffer copy offset exceeds Buffer size"); lovrPassCopyDataToBuffer(pass, (char*) blob->data + srcOffset, buffer, dstOffset, extent); return 0; }
OpenCoreKernel: Return on arch mismatch error
@@ -1008,7 +1008,7 @@ OcKernelFileOpen ( if (mUse32BitKernel != IsKernel32Bit) { DEBUG ((DEBUG_WARN, "OC: %a kernel architecture is not available, aborting.\n", mUse32BitKernel ? "32-bit" : "64-bit")); FreePool (Kernel); - Status = EFI_INVALID_PARAMETER; + return EFI_INVALID_PARAMETER; } } }
Update GBench for test suite.
if(NOT GBENCH_FOUND OR USE_BUNDLED_GBENCH) if(NOT GBENCH_VERSION OR USE_BUNDLED_GBENCH) - set(GBENCH_VERSION 1.4.1) - set(GBENCH_URL_MD5 482dddb22bec43f5507a000456d6bb88) + set(GBENCH_VERSION 1.6.1) + set(GBENCH_URL_MD5 8c33c51f9b7154e6c290df3750081c87) endif() ExternalProject_Add(google-bench-depends
Added initial support for Sercomm open/close sensor SZ-DWS04
@@ -293,6 +293,7 @@ static const SupportedDevice supportedDevices[] = { { VENDOR_SERCOMM, "SZ-ESW01", emberMacPrefix }, // Sercomm / Telstra smart plug { VENDOR_SERCOMM, "SZ-SRN12N", emberMacPrefix }, // Sercomm siren { VENDOR_SERCOMM, "SZ-SRN12N", energyMiMacPrefix }, // Sercomm siren + { VENDOR_SERCOMM, "SZ-DWS04", emberMacPrefix }, // Sercomm open/close sensor { VENDOR_ALERTME, "MOT003", tiMacPrefix }, // Hive Motion Sensor { VENDOR_SUNRICHER, "4512703", silabs2MacPrefix }, // Namron 4-ch remote controller { VENDOR_SENGLED_OPTOELEC, "E13-", zhejiangMacPrefix }, // Sengled PAR38 Bulbs @@ -6136,7 +6137,8 @@ void DeRestPluginPrivate::updateSensorNode(const deCONZ::NodeEvent &event) i->modelId().startsWith(QLatin1String("1117-S")) || // iris motion sensor v3 i->modelId().startsWith(QLatin1String("3326-L")) || // iris motion sensor v2 i->modelId().startsWith(QLatin1String("3320-L")) || // Centralite contact sensor - i->modelId().startsWith(QLatin1String("lumi.sen_ill")))// Xiaomi ZB3.0 light sensor + i->modelId().startsWith(QLatin1String("lumi.sen_ill")) || // Xiaomi ZB3.0 light sensor + i->modelId().startsWith(QLatin1String("SZ-DWS04"))) // Sercomm open/close sensor { } else {
BugID:18679699: fix 8266 2boot watchdog error
#define WDT_OP_DATA_LSB 0 #define WDT_OP_DATA_MASK 0xf +#define WDT_OP_ND_ADDRESS 0x8 + #define WDT_RST_ADDRESS 0x14 #define PERIPHS_DPORT_BASEADDR 0x3ff00000 #define WDT_EDGE_INT_ENABLE() SET_PERI_REG_MASK(EDGE_INT_ENABLE_REG, BIT0) #define WDT_EDGE_INT_DISABLE() CLEAR_PERI_REG_MASK(EDGE_INT_ENABLE_REG, BIT0) -extern unsigned char pp_soft_wdt_count; -extern unsigned short init_hw_wdt; -extern void pp_soft_wdt_init(); +extern void system_soft_wdt_stop(); +extern void system_soft_wdt_feed(); static unsigned int rec_log2(unsigned int x) { @@ -72,17 +73,17 @@ void rec_wdt_init(unsigned int timeout_ms) WDT_EDGE_INT_ENABLE(); - timeout_bit = rec_log2(timeout_ms*10/8); + timeout_bit = rec_log2(timeout_ms*10/8) + 1; /* (0.8ms x 2^n) timeout for interrupt */ WDT_REG_WRITE(WDT_OP_ADDRESS, timeout_bit); /* (0.8ms x 2^n) timeout for reset after interrupt */ - WDT_REG_WRITE(WDT_OP_ADDRESS, timeout_bit); + WDT_REG_WRITE(WDT_OP_ND_ADDRESS, 11); SET_PERI_REG_BITS(PERIPHS_WDT_BASEADDR + WDT_CTL_ADDRESS, WDT_CTL_RSTLEN_MASK, 7<<WDT_CTL_RSTLEN_LSB, 0); SET_PERI_REG_BITS(PERIPHS_WDT_BASEADDR + WDT_CTL_ADDRESS, WDT_CTL_RSPMOD_MASK, 0<<WDT_CTL_RSPMOD_LSB, 0); SET_PERI_REG_BITS(PERIPHS_WDT_BASEADDR + WDT_CTL_ADDRESS, WDT_CTL_EN_MASK, 1<<WDT_CTL_EN_LSB, 0); - pp_soft_wdt_init(); + system_soft_wdt_feed(); } void rec_wdt_start() @@ -92,15 +93,14 @@ void rec_wdt_start() void rec_wdt_stop() { - pp_soft_wdt_count = 0; + system_soft_wdt_stop(); WDT_REG_WRITE(WDT_RST_ADDRESS, 0x73); CLEAR_WDT_REG_MASK(WDT_CTL_ADDRESS, BIT0); WDT_EDGE_INT_DISABLE(); - } void rec_wdt_feed() { - pp_soft_wdt_count = 0; + system_soft_wdt_feed(); WDT_REG_WRITE(WDT_RST_ADDRESS, 0x73); }
posix env: print call stack in case of BUG()
/* - * Copyright(c) 2019-2021 Intel Corporation + * Copyright(c) 2019-2022 Intel Corporation * SPDX-License-Identifier: BSD-3-Clause */ @@ -67,11 +67,13 @@ typedef uint64_t sector_t; #define ENV_MEM_ATOMIC 0 /* DEBUGING */ +void env_stack_trace(void); + #define ENV_WARN(cond, fmt...) printf(fmt) #define ENV_WARN_ON(cond) ; #define ENV_WARN_ONCE(cond, fmt...) ENV_WARN(cond, fmt) -#define ENV_BUG() assert(0) +#define ENV_BUG() do {env_stack_trace(); assert(0);} while(0) #define ENV_BUG_ON(cond) do { if (cond) ENV_BUG(); } while (0) #define ENV_BUILD_BUG_ON(cond) _Static_assert(!(cond), "static "\ "assertion failure")
HV: Compiling in VCPI code for partition hypervisor V3: Compiling in VCPI code for partition hypervisor Acked-by: Anthony Xu
@@ -95,7 +95,9 @@ INCLUDE_PATH += include/arch/x86 INCLUDE_PATH += include/arch/x86/guest INCLUDE_PATH += include/debug INCLUDE_PATH += include/public -INCLUDE_PATH += include/common +ifeq ($(CONFIG_PARTITION_MODE),y) +INCLUDE_PATH += include/dm/vpci +endif INCLUDE_PATH += bsp/include INCLUDE_PATH += bsp/$(CONFIG_PLATFORM)/include/bsp INCLUDE_PATH += boot/include @@ -171,6 +173,11 @@ ifdef STACK_PROTECTOR C_SRCS += common/stack_protector.c endif +ifeq ($(CONFIG_PARTITION_MODE),y) +C_SRCS += $(wildcard dm/vpci/*.c) +C_SRCS += $(wildcard partition/*.c) +endif + C_SRCS += bsp/$(CONFIG_PLATFORM)/vm_description.c C_SRCS += bsp/$(CONFIG_PLATFORM)/$(CONFIG_PLATFORM).c C_SRCS += bsp/$(CONFIG_PLATFORM)/platform_acpi_info.c
Invert #if check so that ZYAN_UNUSED() is 'called' correctly when ZYDIS_DISABLE_AVX512 and ZYDIS_DISABLE_KNC are both defined
@@ -550,7 +550,7 @@ ZyanStatus ZydisFormatterBasePrintDecorator(const ZydisFormatter* formatter, ZYAN_ASSERT(buffer); ZYAN_ASSERT(context); -#if !defined(ZYDIS_DISABLE_AVX512) && !defined(ZYDIS_DISABLE_KNC) +#if defined(ZYDIS_DISABLE_AVX512) && defined(ZYDIS_DISABLE_KNC) ZYAN_UNUSED(formatter); ZYAN_UNUSED(buffer); ZYAN_UNUSED(context);
NRF53 UART open/close improvments
@@ -132,8 +132,23 @@ static void eventHandler(void *pParam, size_t paramLength) static void uartClose(int32_t handle) { if ((handle >= 0) && - (handle < sizeof(gUartData) / sizeof(gUartData[0]))) { + (handle < sizeof(gUartData) / sizeof(gUartData[0])) && + (gUartData[handle].pBuffer != NULL)) { + + k_free(gUartData[handle].pBuffer); + gUartData[handle].pBuffer = NULL; + uart_irq_rx_disable(gUartData[handle].pDevice); + uart_irq_tx_disable(gUartData[handle].pDevice); + gUartData[handle].bufferRead = 0; + gUartData[handle].bufferWrite = 0; + gUartData[handle].bufferFull = false; + gUartData[handle].eventQueueHandle = -1; + gUartData[handle].eventFilter = 0; + gUartData[handle].pEventCallback = NULL; + gUartData[handle].pEventCallbackParam = NULL; + gUartData[handle].pTxData = NULL; + gUartData[handle].txWritten = 0; } } @@ -254,6 +269,7 @@ int32_t uPortUartInit() if (dev != NULL) { gUartData[x].pDevice = dev; + gUartData[x].pBuffer = NULL; } else { errorCode = U_ERROR_COMMON_NOT_SUPPORTED; } @@ -268,6 +284,10 @@ void uPortUartDeinit() if (gMutex != NULL) { U_PORT_MUTEX_LOCK(gMutex); + for (size_t x = 0; x < sizeof(gUartData) / sizeof(gUartData[0]); x++) { + uartClose(x); + gUartData[x].pDevice = NULL; + } U_PORT_MUTEX_UNLOCK(gMutex); uPortMutexDelete(gMutex); @@ -299,7 +319,8 @@ int32_t uPortUartOpen(int32_t uart, int32_t baudRate, handleOrErrorCode = U_ERROR_COMMON_INVALID_PARAMETER; if ((uart >= 0) && (uart < sizeof(gUartData) / sizeof(gUartData[0])) && - (baudRate > 0) && (pReceiveBuffer == NULL)) { + (baudRate > 0) && (pReceiveBuffer == NULL) && + (gUartData[uart].pBuffer == NULL)) { gUartData[uart].pBuffer = k_malloc(U_PORT_UART_BUFFER_SIZE); @@ -353,21 +374,6 @@ void uPortUartClose(int32_t handle) if ((handle >= 0) && (handle < sizeof(gUartData) / sizeof(gUartData[0]))) { - - k_free(gUartData[handle].pBuffer); - uart_irq_rx_disable(gUartData[handle].pDevice); - uart_irq_tx_disable(gUartData[handle].pDevice); - - gUartData[handle].bufferRead = 0; - gUartData[handle].bufferWrite = 0; - gUartData[handle].bufferFull = false; - gUartData[handle].eventQueueHandle = -1; - gUartData[handle].eventFilter = 0; - gUartData[handle].pEventCallback = NULL; - gUartData[handle].pEventCallbackParam = NULL; - gUartData[handle].pTxData = NULL; - gUartData[handle].txWritten = 0; - uartClose(handle); }
Fix std::min in VmaBlockVector::ProcessDefragmentations Fixes - thanks
@@ -13776,7 +13776,7 @@ uint32_t VmaBlockVector::ProcessDefragmentations( { VmaMutexLockWrite lock(m_Mutex, m_hAllocator->m_UseMutex); - const uint32_t moveCount = std::min(uint32_t(pCtx->defragmentationMoves.size()) - pCtx->defragmentationMovesProcessed, maxMoves); + const uint32_t moveCount = VMA_MIN(uint32_t(pCtx->defragmentationMoves.size()) - pCtx->defragmentationMovesProcessed, maxMoves); for(uint32_t i = 0; i < moveCount; ++ i) {
remove boost and cppnet for swupdate application
@@ -403,7 +403,9 @@ smart_home_server_linux: libiotivity-lite-server.a $(ROOT_DIR)/apps/smart_home_s smart_home_server_with_mock_swupdate: libiotivity-lite-server.a $(ROOT_DIR)/apps/smart_home_server_with_mock_swupdate.cpp @mkdir -p $@_creds - ${CXX} -o $@ ../../apps/smart_home_server_with_mock_swupdate.cpp libiotivity-lite-server.a -DOC_SERVER ${CXXFLAGS} ${LIBS} -lboost_system -lcppnetlib-uri + # old implemenation with boost + #${CXX} -o $@ ../../apps/smart_home_server_with_mock_swupdate.cpp libiotivity-lite-server.a -DOC_SERVER ${CXXFLAGS} ${LIBS} -lboost_system -lcppnetlib-uri + ${CXX} -o $@ ../../apps/smart_home_server_with_mock_swupdate.cpp libiotivity-lite-server.a -DOC_SERVER ${CXXFLAGS} ${LIBS} multi_device_server: libiotivity-lite-server.a $(ROOT_DIR)/apps/multi_device_server_linux.c @mkdir -p $@_creds
bfd: allow IPv6 link-local address as local address Type: fix
#include <vnet/ip/ip4.h> #include <vnet/ip/ip6.h> #include <vnet/ip/ip6_packet.h> +#include <vnet/ip/ip6_neighbor.h> #include <vnet/adj/adj.h> #include <vnet/adj/adj_nbr.h> #include <vnet/dpo/receive_dpo.h> @@ -608,6 +609,19 @@ bfd_udp_validate_api_input (u32 sw_if_index, "IP family mismatch (local is ipv6, peer is ipv4)"); return VNET_API_ERROR_INVALID_ARGUMENT; } + + if (ip6_address_is_link_local_unicast (&local_addr->ip6)) + { + ip6_address_t ll_addr; + ll_addr = ip6_neighbor_get_link_local_address (sw_if_index); + if (ip6_address_is_equal (&ll_addr, &local_addr->ip6)) + { + /* valid address for this interface */ + local_ip_valid = 1; + } + } + else + { ip6_main_t *im = &ip6_main; /* *INDENT-OFF* */ foreach_ip_interface_address ( @@ -624,6 +638,7 @@ bfd_udp_validate_api_input (u32 sw_if_index, })); /* *INDENT-ON* */ } + } if (!local_ip_valid) {
Added missing information to translation templates.
-# SOME DESCRIPTIVE TITLE. -# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER -# This file is distributed under the same license as the PACKAGE package. -# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR. +# This file is distributed under the same license as the GoAccess package. # #, fuzzy msgid "" msgstr "" -"Project-Id-Version: PACKAGE VERSION\n" -"Report-Msgid-Bugs-To: \n" +"Project-Id-Version: goaccess 1.2\n" +"Report-Msgid-Bugs-To: [email protected]\n" "POT-Creation-Date: 2017-04-03 21:03-0500\n" -"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" -"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" -"Language-Team: LANGUAGE <[email protected]>\n" -"Language: \n" +"PO-Revision-Date: 2017-04-03 21:03-0500\n" +"Last-Translator: <[email protected]>\n" +"Language-Team: English\n" +"Language: en\n" "MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=CHARSET\n" +"Content-Type: text/plain; charset=utf-8\n" "Content-Transfer-Encoding: 8bit\n" #. Global UI defaults
Add a fallback definition for __NR_getrandom for ARM linux
@@ -254,6 +254,13 @@ static ssize_t sysctl_random(char *buf, size_t buflen) # endif # if defined(OPENSSL_RAND_SEED_GETRANDOM) + +# if defined(__linux) && !defined(__NR_getrandom) +# if defined(__arm__) && defined(__NR_SYSCALL_BASE) +# define __NR_getrandom (__NR_SYSCALL_BASE+384) +# endif +# endif + /* * syscall_random(): Try to get random data using a system call * returns the number of bytes returned in buf, or < 0 on error.
sockeye: call assert inside the init function of the decoding net
@@ -43,6 +43,7 @@ state_empty(S) :- % initializes the state to be empty init_state :- + assert(current_state(null)), state_empty(S), state_set(S). @@ -53,7 +54,7 @@ state_set(S) :- retract(current_state(_)), assert(current_state(S)). % call the init -:- assert(current_state(null)), init_state. +:- init_state. :- export state_get/1. state_get(S) :- current_state(S).
common: add flash error check. use it for mass erase. only implement it for g0/g4 for now, but this is most probably a must for all chips.
#define STM32Gx_FLASH_CR_LOCK (31) /* FLASH_CR Lock */ // G0/G4 FLASH status register +#define STM32Gx_FLASH_SR_ERROR_MASK (0x3fa) #define STM32Gx_FLASH_SR_BSY (16) /* FLASH_SR Busy */ +#define STM32Gx_FLASH_SR_EOP (0) /* FLASH_EOP End of Operation */ // G4 FLASH option register #define STM32G4_FLASH_OPTR_DBANK (22) /* FLASH_OPTR Dual Bank Mode */ @@ -688,6 +690,22 @@ static void wait_flash_busy_progress(stlink_t *sl) { fprintf(stdout, "\n"); } +static int check_flash_error(stlink_t *sl) +{ + uint32_t res = 0; + if ((sl->flash_type == STLINK_FLASH_TYPE_G0) || + (sl->flash_type == STLINK_FLASH_TYPE_G4)) { + res = read_flash_sr(sl) & STM32Gx_FLASH_SR_ERROR_MASK; + } + + if (res) { + ELOG("Flash programming error : %#010x\n", res); + return -1; + } + + return 0; +} + static inline unsigned int is_flash_eop(stlink_t *sl) { return read_flash_sr(sl) & (1 << FLASH_SR_EOP); } @@ -2018,6 +2036,8 @@ int stlink_erase_flash_mass(stlink_t *sl) { /* wait for completion */ wait_flash_busy_progress(sl); + check_flash_error(sl); + /* relock the flash */ lock_flash(sl);
Fix font encoding when using CLI to export data
import Path from "path"; +import { readJson } from "fs-extra"; import { ImageIndexFunction, IndexedImage, @@ -15,6 +16,7 @@ export interface FontData { data: Uint8Array; isVariableWidth: boolean; is1Bit: boolean; + mapping: Record<string, number>; } interface CharacterData { @@ -46,6 +48,19 @@ export const readFileToFontData = async ( let is1Bit = true; let isVariableWidth = false; + const metadataFilename = filename.replace(/\.png$/i, ".json"); + let mapping: Record<string, number> = {}; + try { + const metadataFile = await readJson(metadataFilename); + if ( + typeof metadataFile === "object" && + metadataFile.mapping && + typeof metadataFile.mapping === "object" + ) { + mapping = metadataFile.mapping; + } + } catch (e) {} + // Determine if font is only using white & black pixels for (let i = 0; i < image.data.length; i++) { if (image.data[i] === Color.Light || image.data[i] === Color.Mid) { @@ -104,6 +119,7 @@ export const readFileToFontData = async ( data, isVariableWidth, is1Bit, + mapping, }; };
tests: wait a lot longer to connect to memcached travis tests are absolutely glacial, causes this to be flaky.
@@ -314,7 +314,7 @@ sub new_memcached { # try to connect / find open port, only if we're not using unix domain # sockets - for (1..20) { + for (1..80) { my $conn; if ($ssl_enabled) { $conn = eval qq{ IO::Socket::SSL->new(PeerAddr => "127.0.0.1:$port",
manifest: Docblocks must be followed by a keyword.
@@ -5620,6 +5620,9 @@ enter_manifest_import:; lily_raise_syn(parser->raiser, "Invalid keyword %s for manifest.", lex->label); } + else if (have_docblock) + lily_raise_syn(parser->raiser, + "Docblock must be followed by a keyword."); else if (lex->token == tk_right_curly) manifest_block_exit(parser); else if (lex->token == tk_eof) {
Bugfix conn metatable method call Here `conn` is net.socket instance, so it should be called as one. Otherwise request is very likely to end up with crash and PANIC. nwf edited in light of
@@ -89,7 +89,7 @@ do local buf = "" local method, url local ondisconnect = function(connection) - connection.on("sent", nil) + connection:on("sent", nil) collectgarbage("collect") end -- header parser
make test: fix failure on centos
@@ -346,7 +346,7 @@ class TestIpIrb(VppTestCase): all_rules = [] for old_acl in orig_acls: for rule in old_acl.r: - all_rules.append(dict(vars(rule))) + all_rules.append(dict(rule._asdict())) # Add a few ACLs made from shuffled rules shuffle(all_rules)
artik053: add how to factory reset guide Introduces the factory reset mode entry method.
@@ -171,6 +171,39 @@ openocd -f artik053.cfg -c ' \ flash_write os ../build/output/bin/tinyara_head.bin; exit' ``` +### Factory Reset + +If you can not boot normally, you can change os to the initial version. This is possible if there is an initialization binary in memory. + +#### How to Download the Initialization Binaries + +You can download it using OpenOCD. You compress the compiled firmware and download it to the board. + +```bash +gzip -c tinyara_head.bin > factoryimage.gz +openocd -f artik05x.cfg -s ../build/configs/artik05x/scripts -c ' \ + flash_write factory ../build/configs/artik053/bin/factoryimage.gz; \ + exit' +``` + +#### How to enter initialization mode + +When you press the RESET button (SW700) to reboot the Starter Kit, press and hold the 'ARDUINO RESET' button (SW701) for 10 seconds. Enter initialization mode as follows. +``` +..... +Factory reset. +Erasing boot partitions... +....................................e +Erased 600 sectors +Flashing factory image... +Uncompressed size: 1258496 = 0x133400 +resetting ... + +........ <RESET>..................... +U-Boot 2017 +..... +``` + ## ROMFS Before executing below steps, execute [generic steps](../../../tools/fs/README_ROMFS.md), step 1 and step 2.
[rtdbg] Add LOG_RAW and dbg_raw API to rtdbg.h .
rt_kprintf("\n"); \ } +#define dbg_raw(...) rt_kprintf(__VA_ARGS__); + #else #define dbg_log(level, fmt, ...) #define dbg_here #define dbg_enter #define dbg_exit #define dbg_log_line(level, ...) +#define dbg_raw(...) #endif #define LOG_D(...) dbg_log_line(DBG_LOG , __VA_ARGS__) #define LOG_I(...) dbg_log_line(DBG_INFO , __VA_ARGS__) #define LOG_W(...) dbg_log_line(DBG_WARNING, __VA_ARGS__) #define LOG_E(...) dbg_log_line(DBG_ERROR , __VA_ARGS__) +#define LOG_RAW(...) dbg_raw(__VA_ARGS__) #endif /* RT_DBG_H__ */
BUFR Test: change width using operator 201YYY
@@ -1479,10 +1479,8 @@ rm -f ${f}.log ${f}.log.ref ${f}.out ${f}.out.out $fLog $fRules cat > $fRules <<EOF set numberOfSubsets=2; set unexpandedDescriptors={310008}; - set #14#brightnessTemperature={266.53,266.53000000001}; set pack=1; - write; EOF @@ -1507,3 +1505,41 @@ EOF diff ${f}.log.ref ${f}.log rm -f ${f}.log ${f}.log.ref ${f}.out $fLog $fRules + +#----------------------------------------------------------- +# Test: change width using operator 201YYY +#----------------------------------------------------------- +HIGH_TEMPERATURE=10000 +cat > $fRules <<EOF + set unpack=1; + set airTemperature=$HIGH_TEMPERATURE; + set pack=1; + write; +EOF +f="bssh_176.bufr" + + # This should fail. Out of Range +set +e +${tools_dir}/bufr_filter -o ${f}.out $fRules $f +status=$? +set -e +[ $status -ne 0 ] + +# Now change the width of airTemperature to allow high value +cat > $fRules <<EOF + set unpack=1; + set edition=4; + set unexpandedDescriptors={301022,12023,201138,12101,201000,12023}; + set airTemperature=$HIGH_TEMPERATURE; + set pack=1; + print "airTemperature=[airTemperature], width=[airTemperature->width]"; + write; +EOF +${tools_dir}/bufr_filter -o ${f}.out $fRules $f > ${f}.log + +cat > ${f}.log.ref <<EOF +airTemperature=$HIGH_TEMPERATURE, width=26 +EOF +diff ${f}.log.ref ${f}.log + +rm -f ${f}.log ${f}.log.ref ${f}.out $fLog $fRules
[numerics] add a function for computing eigenvalues of a 3x3 symmetrix matrix
@@ -874,4 +874,64 @@ static inline int solve_3x3_gepp(const double* restrict a, double* restrict b) return info; } +/** Computation of the eigenvalues of a symmetric 3x3 real matrix + * \param a symmetric column-major matrix (not modified) + * \param b a 3x3 work matrix + * \param[in,out] eig eigenvalie in decreasing order + */ +WARN_RESULT_IGNORED +static inline int eig_3x3(double* restrict a, double* restrict b, double* restrict eig) +{ + SET3X3(a); + SET3X3(b); + double pi = M_PI; + double p1 = *a01* *a01 + *a02* *a02 + *a12* *a12; + if (p1 == 0) + { + /* A is diagonal. */ + eig[0] = *a00; + eig[1] = *a11; + eig[2] = *a22; + } + else + { + double q = ( *a00+ *a11+ *a22)/3.0; + double p2 = ( *a00 - q)*( *a00 - q) + ( *a11 - q)*( *a11 - q) + ( *a22 - q)*( *a22 - q) + 2 * p1; + double p = sqrt(p2 / 6.0); + *b00 = (1 / p) * ( *a00 - q); + *b11 = (1 / p) * ( *a11 - q); + *b22 = (1 / p) * ( *a22 - q); + *b01 = (1 / p) * ( *a01); + *b02 = (1 / p) * ( *a02); + *b10 = (1 / p) * ( *a10); + *b12 = (1 / p) * ( *a12); + *b20 = (1 / p) * ( *a20); + *b21 = (1 / p) * ( *a21); + //B = (1 / p) * ( *A - q * I) % I is the identity matrix + double det = + *b00 * *b11 * *b22 + *b01 * *b12 * *b20 + *b02 * *b10 * *b21 - + *b00 * *b12 * *b21 - *b01 * *b10 * *b22 - *b02 * *b11 * *b20; + double r = det/2.0; + + /* % In exact arithmetic for a symmetric matrix -1 <= r <= 1 */ + /* % but computation error can leave it slightly outside this range. */ + double phi; + if (r <= -1) + phi = pi / 3.0; + else if (r >= 1) + phi = 0.0; + else + phi = acos(r) / 3; + + /* % the eigenvalues satisfy eig3 <= eig2 <= eig1 */ + eig[0] = q + 2 * p * cos(phi); + eig[2] = q + 2 * p * cos(phi + (2*pi/3)); + eig[1] = 3 * q - eig[0] - eig[2]; /* % since trace(A) = eig1 + eig2 + eig3; */ + } + + return 0; +} + + + #endif
analysis workflow, fix.
@@ -48,7 +48,7 @@ jobs: submodules: false - name: install libevent if: ${{ matrix.install_libevent == 'yes' }} - run: apt-get install libevent-dev + run: sudo apt-get install libevent-dev - name: install expat if: ${{ matrix.install_expat == 'yes' }} run: brew install expat
Use arrival_timestamp attribute position found in init_query_state
@@ -1500,8 +1500,8 @@ sync_combine(ContQueryCombinerState *state) PhysicalTuple update = NULL; HeapTuple tup = NULL; HeapTuple os_tup; - Datum os_values[3]; - bool os_nulls[3]; + Datum os_values[4]; + bool os_nulls[4]; int replaces = 0; ExprContext *econtext = estate->es_per_tuple_exprcontext; @@ -1589,8 +1589,7 @@ sync_combine(ContQueryCombinerState *state) PhysicalTuple pt = (PhysicalTuple) e->additional; os_values[DELTA_TUPLE] = heap_copy_tuple_as_datum(pt->tuple, state->desc); os_nulls[DELTA_TUPLE] = false; - - os_nulls[state->output_stream_arrival_ts] = true; + os_nulls[state->output_stream_arrival_ts - 1] = true; os_tup = heap_form_tuple(state->os_slot->tts_tupleDescriptor, os_values, os_nulls); ExecStoreTuple(os_tup, state->os_slot, InvalidBuffer, false); ExecStreamInsert(NULL, osri, state->os_slot, NULL); @@ -1650,7 +1649,7 @@ sync_all(ContExecutor *cont_exec) while ((id = bms_first_member(tmp)) >= 0) { - bool error = false; + volatile bool error = false; ContQueryCombinerState *state = states[id]; if (!state)
Fix 2 byte overflow.
@@ -3736,7 +3736,7 @@ public: else { size_t off = __right_->size(); - if (off > 0 && __size_ > 0) + if (__size_ > 0) off += 2; const_cast<long&>(__cached_size_) = __left_->size() + off; }
Only process server preferred address if ready and if different than default.
@@ -1476,20 +1476,23 @@ int picoquic_prepare_server_address_migration(picoquic_cnx_t* cnx) /* configure an IPv6 sockaddr */ struct sockaddr_in6 * d6 = (struct sockaddr_in6 *)&dest_addr; d6->sin6_family = AF_INET; - d6->sin6_port = cnx->remote_parameters.prefered_address.ipv6Port; + d6->sin6_port = htons(cnx->remote_parameters.prefered_address.ipv6Port); memcpy(&d6->sin6_addr, cnx->remote_parameters.prefered_address.ipv6Address, 16); } else { /* configure an IPv4 sockaddr */ struct sockaddr_in * d4 = (struct sockaddr_in *)&dest_addr; d4->sin_family = AF_INET; - d4->sin_port = cnx->remote_parameters.prefered_address.ipv4Port; + d4->sin_port = htons(cnx->remote_parameters.prefered_address.ipv4Port); memcpy(&d4->sin_addr, cnx->remote_parameters.prefered_address.ipv4Address, 4); } + /* Only send a probe if not already using that address */ + if (picoquic_compare_addr((struct sockaddr *)&dest_addr, (struct sockaddr *)&cnx->path[0]->peer_addr) != 0) { ret = picoquic_create_probe(cnx, (struct sockaddr *)&dest_addr, NULL); } } + } return ret; } @@ -1714,8 +1717,6 @@ int picoquic_prepare_packet_client_init(picoquic_cnx_t* cnx, picoquic_path_t * p cnx->tls_stream[1].send_queue == NULL && cnx->tls_stream[2].send_queue == NULL) { cnx->cnx_state = picoquic_state_client_ready_start; - /* Start migration to server preferred address if present */ - ret = picoquic_prepare_server_address_migration(cnx); if (ret == 0) { /* Signal the application */ if (cnx->callback_fn != NULL) { @@ -2204,6 +2205,12 @@ void picoquic_ready_state_transition(picoquic_cnx_t* cnx, uint64_t current_time) picoquic_implicit_handshake_ack(cnx, picoquic_packet_context_initial, current_time); picoquic_implicit_handshake_ack(cnx, picoquic_packet_context_handshake, current_time); + /* Start migration to server preferred address if present */ + if (cnx->client_mode) { + (void)picoquic_prepare_server_address_migration(cnx); + } + + /* Notify the application */ if (cnx->callback_fn != NULL) { if (cnx->callback_fn(cnx, 0, NULL, 0, picoquic_callback_ready, cnx->callback_ctx) != 0) { picoquic_connection_error(cnx, PICOQUIC_TRANSPORT_INTERNAL_ERROR, 0);
net/ip; fix memory allocation for tcpip stack.
@@ -143,7 +143,7 @@ sys_thread_new(const char *name, void (*thread)(void *arg), void *arg, task = (struct os_task *)os_malloc(sizeof(*task)); assert(task); - stack = (os_stack_t *)os_malloc(stacksize); + stack = (os_stack_t *)os_malloc(stacksize * sizeof(os_stack_t)); assert(stack); if (os_task_init(task, name, thread, arg, prio, OS_WAIT_FOREVER, stack, stacksize)) {
change a strategy set method to WithGuardian In the case of chind actor, WithSupervisor is correct. However if actor is root, then strategy must be set using WithSupervisor
@@ -49,7 +49,7 @@ func resumeDecider(_ interface{}) actor.Directive { func (base *BaseComponent) Start(inheritant IComponent) { skipResumeStrategy := actor.NewOneForOneStrategy(0, 0, resumeDecider) - workerProps := actor.FromInstance(inheritant).WithSupervisor(skipResumeStrategy) + workerProps := actor.FromInstance(inheritant).WithGuardian(skipResumeStrategy) if base.enableDebugMsg { workerProps = workerProps.WithMailbox(newMailBoxLogger(base.hub.Metrics(base.name))) }
Dockerfile: forward arguments to Cooja Make the Cooja script forward its arguments to ant. This makes it possible to quickstart simulations through the cooja script.
@@ -11,6 +11,6 @@ function exit_cleanup() { kill $PID } -ant -e -logger org.apache.tools.ant.listener.SimpleBigProjectLogger -f $HOME/contiki-ng/tools/cooja/build.xml run_bigmem +ant -e -logger org.apache.tools.ant.listener.SimpleBigProjectLogger -f $HOME/contiki-ng/tools/cooja/build.xml run_bigmem "$@" exit_cleanup
Fix OCF example build
@@ -126,7 +126,7 @@ int initialize_cache(ocf_ctx_t ctx, ocf_cache_t *cache) return -ENOMEM; /* Start cache */ - ret = ocf_mngt_cache_start(ctx, cache, &cache_cfg); + ret = ocf_mngt_cache_start(ctx, cache, &cache_cfg, NULL); if (ret) goto err_priv;
sidk_s5jt200: make wlan_init() static wlan_init() is dereferenced by up_wlan_init() only. Let's make it static.
@@ -45,7 +45,7 @@ struct wlanif { * ERR_MEM if private data couldn't be allocated * any other err_t on error */ -err_t wlan_init(struct netif *netif) +static err_t wlan_init(struct netif *netif) { netif->name[0] = IFNAME0; netif->name[1] = IFNAME1;
Added original uuid deinitialization without freeing There is a risk that without uuid.data pointer denitialization it will be freed during original volume deinit, zeroing uuid.data pointer prevents that.
@@ -143,6 +143,7 @@ void ocf_volume_move(ocf_volume_t volume, ocf_volume_t from) */ from->opened = false; from->priv = NULL; + from->uuid.data = NULL; } int ocf_volume_create(ocf_volume_t *volume, ocf_volume_type_t type,
Update epsdb passing list
aomp_mappings +assertok_error atomic atomic_double class @@ -6,21 +7,30 @@ collapse data_enter_issue01 data_issue_59 DeclareSharedMemory +decl_targ +devices +extern_init firstprivate firstprivate2 flags 1 flags 2 flags 3 flags 4 +flags 5 flags 6 +flags 7 flags 8 +function function_overload function_template gdb_teams helloworld +hip_device_compile issue_001 issue_002 +issue_flang_libomp launch_latency +liba_bundled ManyKernels map_zero_bug MasterBarrier @@ -28,24 +38,43 @@ math_flog math_modff math_sqrt_float MaxNumThrds +mem_foot_print nativetests nest_call_par2 nested_loop nested_par3 OmpHipMallocManaged +omp_lock +omp_num_teams_generic +omp_num_teams_SPMD omp_wtime +pfspecifier +pfspecifier_str red_bug_51 reduce reduc_map_prob +reduction +reduction_issue_16 +reduction_team +reduction_teams reduction_teams_distribute_parallel +schedule simd snap_red stream +targ_declare target-in-other-source +targets_in_loop +team_prob teams +teams_nest test +test_offload_macros thread_limit +threads Threads1xxx +unique-kernel-name +use_device_ptr veccopy vmuldemo vmulsum
add: roundps instruction
@@ -515,6 +515,39 @@ void Run660F(x86emu_t *emu) case 0x3A: // these are some SSE3 opcodes opcode = F8; switch(opcode) { + case 0x08: // roundps GX, EX, u8 + nextop = F8; + GET_EX; + tmp8u = F8; + switch((tmp8u & 4) ? ((emu->mxcsr >> 13) & 3) : (tmp8u & 3)) + { + case ROUND_Nearest: + GX.f[0] = nearbyint(EX->f[0]); + GX.f[1] = nearbyint(EX->f[1]); + GX.f[2] = nearbyint(EX->f[2]); + GX.f[3] = nearbyint(EX->f[3]); + break; + case ROUND_Down: + GX.f[0] = floor(EX->f[0]); + GX.f[1] = floor(EX->f[1]); + GX.f[2] = floor(EX->f[2]); + GX.f[3] = floor(EX->f[3]); + break; + case ROUND_Up: + GX.f[0] = ceil(EX->f[0]); + GX.f[1] = ceil(EX->f[1]); + GX.f[2] = ceil(EX->f[2]); + GX.f[3] = ceil(EX->f[3]); + break; + case ROUND_Chop: + GX.f[0] = trunc(EX->f[0]); + GX.f[1] = trunc(EX->f[1]); + GX.f[2] = trunc(EX->f[2]); + GX.f[3] = trunc(EX->f[3]); + break; + } + break; + case 0x0E: /* PBLENDW Gx, Ex, Ib */ nextop = F8; GET_EX;
admin/test-suite: updating version for 2.1
Summary: Integration test suite for OpenHPC Name: test-suite%{PROJ_DELIM} -Version: 2.0.0 +Version: 2.1.0 Release: 1 License: Apache-2.0 Group: %{PROJ_NAME}/admin
crsf: moved rx_lqi_update_fps out of conditional statement
@@ -184,8 +184,9 @@ static void rx_serial_crsf_process_frame() { state.aux[AUX_CHANNEL_10] = (channels[14] > 1100) ? 1 : 0; state.aux[AUX_CHANNEL_11] = (channels[15] > 1100) ? 1 : 0; - if (profile.channel.lqi_source == RX_LQI_SOURCE_PACKET_RATE) { rx_lqi_update_fps(0); + + if (profile.channel.lqi_source == RX_LQI_SOURCE_PACKET_RATE) { rx_lqi_update_rssi_from_lqi(crsf_rf_mode_fps[crsf_rf_mode]); } if (profile.channel.lqi_source == RX_LQI_SOURCE_CHANNEL) {
Fix typo in statem_clnt.c CLA: trivial
@@ -1761,7 +1761,7 @@ static MSG_PROCESS_RETURN tls_process_as_hello_retry_request(SSL *s, return MSG_PROCESS_ERROR; } -/* prepare server cert verificaton by setting s->session->peer_chain from pkt */ +/* prepare server cert verification by setting s->session->peer_chain from pkt */ MSG_PROCESS_RETURN tls_process_server_certificate(SSL *s, PACKET *pkt) { unsigned long cert_list_len, cert_len;
Generate transitions text file for all parsers
import os import re -parser = hlir.parsers[0] - +for parser in hlir.parsers: def fmt_key(key): if key.node_type == 'DefaultExpression': return '_' @@ -96,6 +95,6 @@ def simplify_infos(txts): short_infos = [simplify_infos(info) for info in infos if info != []] if short_infos != []: - with open(os.path.join(targetdir, '..', 'parser_state_transitions.txt'), 'w', encoding='utf8') as file: + with open(os.path.join(targetdir, '..', f'parser_state_transitions_{parser.name}.txt'), 'w', encoding='utf8') as file: for info in short_infos: file.write(' '.join(info) + '\n')
Fix: Comment - xTaskIncrementTick loop - to adhere to demo requirement
@@ -366,12 +366,15 @@ uint64_t xExpectedTicks; /* Tick Increment, accounting for any lost signals or drift in * the timer. */ - xExpectedTicks = (prvGetTimeNs() - prvStartTimeNs) - / (portTICK_RATE_MICROSECONDS * 1000); - do { +/* + * Comment code to adjust timing according to full demo requirements + * xExpectedTicks = (prvGetTimeNs() - prvStartTimeNs) + * / (portTICK_RATE_MICROSECONDS * 1000); + * do { */ xTaskIncrementTick(); - prvTickCount++; - } while (prvTickCount < xExpectedTicks); +/* prvTickCount++; + * } while (prvTickCount < xExpectedTicks); +*/ #if ( configUSE_PREEMPTION == 1 ) /* Select Next Task. */
Check fd value before close call
@@ -535,10 +535,11 @@ nt_free_candidate(struct neat_ctx *ctx, struct neat_he_candidate *candidate) free(candidate->pollable_socket->dst_address); free(candidate->pollable_socket->src_address); + if (candidate->pollable_socket->fd) { close(candidate->pollable_socket->fd); + } if (!TAILQ_EMPTY(&(candidate->sock_opts))) { - TAILQ_FOREACH_SAFE(sockopt, (&candidate->sock_opts), next, tmp) { if (sockopt->type == NEAT_SOCKOPT_STRING) { free(sockopt->value.s_val);
Add information on lockfiles to the man page.
@@ -175,6 +175,18 @@ jpm will attempt to include the dependencies into the generated executable. Load the current project.janet file and start a repl in it's environment. This lets a user better debug the project file, as well as run rules manually. +.TP +.BR make-lockfile\ [\fBfilename\fR] +Create a lockfile. A lockfile is a record that describes what dependencies were installed at the +time of the lockfile's creation, including exact versions. A lockfile can then be later used +to set up that environment on a different machine via load-lockfile. By default, the lockfile +is created at lockfile.jdn, although any path can be used. + +.TP +.BR load-lockfile\ [\fBfilename\fR] +Install dependencies from a lockfile previously created with make-lockfile. By default, will look +for a lockfile at lockfile.jdn, although any path can be used. + .SH ENVIRONMENT .B JANET_PATH
No longer make extra object files.
@@ -124,14 +124,10 @@ build/webinit.gen.c: src/webclient/webinit.janet build/xxd ################### TEST_SOURCES=$(wildcard ctest/*.c) -TEST_OBJECTS=$(patsubst ctest/%.c,build/%.o,$(TEST_SOURCES)) TEST_PROGRAMS=$(patsubst ctest/%.c,build/%.out,$(TEST_SOURCES)) TEST_SCRIPTS=$(wildcard test/suite*.janet) -build/%.o: ctest/%.c $(JANET_HEADERS) - $(CC) $(CFLAGS) -o $@ -c $< - -build/%.out: build/%.o $(JANET_CORE_OBJECTS) +build/%.out: ctest/%.c $(JANET_CORE_OBJECTS) $(CC) $(CFLAGS) -o $@ $^ $(CLIBS) repl: $(JANET_TARGET)
Mac updates vfs size without filename field
@@ -609,8 +609,8 @@ static void transfer_update_file_info(vfs_file_t file, uint32_t start_sector, ui } // Check - stream must be the same - if (stream != file_transfer_state.stream) { - vfs_mngr_printf(" error: changed types during transfer from %i to %i\r\n", stream, file_transfer_state.stream); + if ((stream != STREAM_TYPE_NONE) && (stream != file_transfer_state.stream)) { + vfs_mngr_printf(" error: changed types during transfer from %i to %i\r\n", file_transfer_state.stream, stream); transfer_update_state(ERROR_ERROR_DURING_TRANSFER); return; } @@ -675,7 +675,7 @@ static void transfer_stream_open(stream_type_t stream, uint32_t start_sector) // Check - stream must be the same if (stream != file_transfer_state.stream) { - vfs_mngr_printf(" error: changed types during tranfer from %i to %i\r\n", stream, file_transfer_state.stream); + vfs_mngr_printf(" error: changed types during transfer from %i to %i\r\n", file_transfer_state.stream, stream); transfer_update_state(ERROR_ERROR_DURING_TRANSFER); return; }
update mcpha/server/Makefile
@@ -3,7 +3,7 @@ CFLAGS = -O3 -march=armv7-a -mcpu=cortex-a9 -mtune=cortex-a9 -mfpu=neon -mfloat- all: mcpha-server pha-server mcpha-server: mcpha-server.c - gcc $(CFLAGS) -o $@ $^ + gcc $(CFLAGS) -o $@ $^ -lm -lpthread pha-server: pha-server.c gcc $(CFLAGS) -o $@ $^ -lpthread
Fix memory leaks in archivePushDrop(). A string was leaked for every file processed. Since the list can be quite large it also makes sense to reset the context occasionally.
@@ -66,6 +66,8 @@ archivePushDrop(const String *walPath, const StringList *const processList) uint64_t queueSize = 0; bool result = false; + MEM_CONTEXT_TEMP_RESET_BEGIN() + { for (unsigned int processIdx = 0; processIdx < strLstSize(processList); processIdx++) { queueSize += storageInfoP( @@ -76,7 +78,12 @@ archivePushDrop(const String *walPath, const StringList *const processList) result = true; break; } + + // Reset the memory context occasionally so we don't use too much memory or slow down processing + MEM_CONTEXT_TEMP_RESET(1000); + } } + MEM_CONTEXT_TEMP_END(); FUNCTION_LOG_RETURN(BOOL, result); }
CCode: Simplify function `setDefaultConfig`
@@ -61,27 +61,18 @@ extern "C" { */ void setDefaultConfig (CCodeData * mapping) { - mapping->encode['\b'_uc] = 'b'_uc; - mapping->encode['\t'_uc] = 't'_uc; - mapping->encode['\n'_uc] = 'n'_uc; - mapping->encode['\v'_uc] = 'v'_uc; - mapping->encode['\f'_uc] = 'f'_uc; - mapping->encode['\r'_uc] = 'r'_uc; - mapping->encode['\\'_uc] = '\\'_uc; - mapping->encode['\''_uc] = '\''_uc; - mapping->encode['\"'_uc] = '"'_uc; - mapping->encode['\0'_uc] = '0'_uc; - - mapping->decode['b'_uc] = '\b'_uc; - mapping->decode['t'_uc] = '\t'_uc; - mapping->decode['n'_uc] = '\n'_uc; - mapping->decode['v'_uc] = '\v'_uc; - mapping->decode['f'_uc] = '\f'_uc; - mapping->decode['r'_uc] = '\r'_uc; - mapping->decode['\\'_uc] = '\\'_uc; - mapping->decode['\''_uc] = '\''_uc; - mapping->decode['"'_uc] = '\"'_uc; - mapping->decode['0'_uc] = '\0'_uc; + unsigned char pairs[][2] = { { '\b'_uc, 'b'_uc }, { '\t'_uc, 't'_uc }, { '\n'_uc, 'n'_uc }, { '\v'_uc, 'v'_uc }, + { '\f'_uc, 'f'_uc }, { '\r'_uc, 'r'_uc }, { '\\'_uc, '\\'_uc }, { '\''_uc, '\''_uc }, + { '\"'_uc, '"'_uc }, { '\0'_uc, '0'_uc } }; + + for (size_t pair = 0; pair < sizeof (pairs) / sizeof (pairs[0]); pair++) + { + unsigned char character = pairs[pair][0]; + unsigned char replacement = pairs[pair][1]; + + mapping->encode[character] = replacement; + mapping->decode[replacement] = character; + } } void readConfig (CCodeData * const mapping, KeySet * const config, Key const * const root)
[Kernel] New tasks get fresh/empty address spaces
@@ -184,8 +184,8 @@ static task_small_t* _task_spawn__entry_point_with_args(const char* task_name, v new_task->is_thread = false; // By definition, a task is identical to a thread except it has its own VAS - // The new task's address space is a clone of the task that spawned it - vas_state_t* new_vas = vas_clone(vas_get_active_state()); + // The new task's address space is 'fresh', i.e. only contains kernel mappings + vas_state_t* new_vas = vas_clone(boot_info_get()->vas_kernel); new_task->vas_state = new_vas; task_set_name(new_task, task_name); @@ -468,6 +468,8 @@ void* sbrk(int increment) { uint64_t addr = vas_alloc_range(vas_get_active_state(), current->sbrk_current_page_head, needed_pages * PAGE_SIZE, VAS_RANGE_ACCESS_LEVEL_READ_WRITE, VAS_RANGE_PRIVILEGE_LEVEL_USER); if (addr != current->sbrk_current_page_head) { printf("sbrk failed to allocate requested page 0x%p, current sbrk head 0x%p\n", addr, current->sbrk_current_page_head); + vas_state_dump(vas_get_active_state()); + assert(false, "sbrk fail"); } current->sbrk_current_page_head += needed_pages * PAGE_SIZE; } @@ -489,7 +491,7 @@ void tasking_print_processes(void) { if (!_task_list_head) { return; } - task_small_t* iter = _task_list_head; + task_small_t* iter = _tasking_get_linked_list_head(); for (int i = 0; i < MAX_TASKS; i++) { printk("[%d] %s ", iter->id, iter->name); if (iter == _current_task_small) {
weather: fix api call
@@ -23,7 +23,7 @@ export default class WeatherTile extends React.Component { }, (err) => { console.log(err); }, { maximumAge: Infinity, timeout: 10000 }); - this.props.api.weather(latlng); + this.props.api.launch.weather(latlng); this.setState({ manualEntry: !this.state.manualEntry }); }); }
Update PACKAGE and PACK documentation
@@ -1946,8 +1946,11 @@ PACKED_PACKAGE_ARGS= PACKED_PACKAGE_EXT= ### @usage: PACK(archive_type) ### -### When placed inside the PACKAGE module, packs the build results tree to the archive with specified extension. -### Is not allowed in other module types. +### When placed inside the PACKAGE module, packs the build results tree to the archive with specified extension. Currently supported extensions are `tar` and `tar.gz` +### +### Is not allowed other module types than PACKAGE(). +### +### @see: [PACKAGE()](#module_PACKAGE) macro PACK(Ext) { SET(PACKED_PACKAGE_EXT $Ext) } @@ -1961,10 +1964,13 @@ macro PACKAGE_STRICT() { ### ### Module collects what is described directly inside it, builds and collects all its transitively available PEERDIRs. ### As a result, build directory of the project gets the structure of the accessible part of Arcadia, where the build result of each PEERDIR is placed to relevant Arcadia subpath. +### The data can be optionally packed if macro PACK() is used. ### ### Is only used together with the macros FILES(), PEERDIR(), COPY(), FROM_SANDBOX(), RUN_PROGRAM or BUNDLE(). Don't use SRCS inside a PACKAGE. ### ### Documentation: https://wiki.yandex-team.ru/yatool/large-data/ +### +### @see: [PACK()](#macro_PACK) module PACKAGE: _BASE_UNIT { .CMD=TOUCH_PACKAGE_MF .PEERDIR_POLICY=as_build_from
move numactl to compute node install group
@@ -16,5 +16,5 @@ PKGLIST="basesystem bash chkconfig coreutils e2fsprogs ethtool shadow-utils rsyslog tcp_wrappers tzdata util-linux words zlib tar less gzip which util-linux openssh-clients openssh-server dhclient pciutils vim-minimal shadow-utils - strace cronie crontabs cpio wget centos-release numactl" + strace cronie crontabs cpio wget centos-release" # vim:filetype=sh:syntax=sh:expandtab:ts=4:sw=4:
Document struct API and anonymous struct handling
@@ -131,6 +131,21 @@ glm_mul(T, R, modelMat); glm_inv_tr(modelMat); ``` +### Struct API + +The struct API works as follows, note the `s` suffix on types, the `glms_` prefix on functions and the `GLMS_` prefix on constants: + +```C +#include <cglm/struct.h> + +mat4s mat = GLMS_MAT4_IDENTITY_INIT; +mat4s inv = glms_mat4_inv(mat); +``` + +Struct functions generally take their parameters as *values* and *return* their results, rather than taking pointers and writing to out parameters. That means your parameters can usually be `const`, if you're into that. + +The types used are actually unions that allow access to the same data multiple ways. One of those ways involves anonymous structures, available since C11. MSVC also supports it for earlier C versions out of the box and GCC/Clang do if you enable `-fms-extensions`. To explicitly enable these anonymous structures, `#define CGLM_USE_ANONYMOUS_STRUCT` to `1`, to disable them, to `0`. For backward compatibility, you can also `#define CGLM_NO_ANONYMOUS_STRUCT` (value is irrelevant) to disable them. If you don't specify explicitly, cglm will do a best guess based on your compiler and the C version you're using. + ## Build ### Unix (Autotools)
misc: update obs url
@@ -39,9 +39,11 @@ if [[ ${USE_FACTORY} -eq 1 ]]; then fi for os in ${oses}; do - repobase="http://build.openhpc.community/OpenHPC:/${minor_ver}${colon}/${factory}${os}" + repobase="http://obs.openhpc.community:82/OpenHPC:/%{minor_ver}${colon}/${factory}${os}" +# repobase="http://build.openhpc.community/OpenHPC:/${minor_ver}${colon}/${factory}${os}" if [[ $micro_ver -gt 0 ]];then - repoupdate="http://build.openhpc.community/OpenHPC:/${minor_ver}:/Update${micro_ver}${colon}/${factory}${os}" + #repoupdate="http://build.openhpc.community/OpenHPC:/${minor_ver}:/Update${micro_ver}${colon}/${factory}${os}" + repoupdate="http://obs.openhpc.community:82/OpenHPC:/${minor_ver}:/Update${micro_ver}${colon}/${factory}${os}" fi echo " "
style: fix documentation consistency for describing clipspace
@@ -68,8 +68,7 @@ glm_ortho_lh_zo(float left, float right, /*! * @brief set up orthographic projection matrix using bounding box - * with a left-hand coordinate system and a clip-space with depth - * values from zero to one. + * with a left-hand coordinate system and a clip-space of [0, 1]. * * bounding box (AABB) must be in view space * @@ -87,8 +86,7 @@ glm_ortho_aabb_lh_zo(vec3 box[2], mat4 dest) { /*! * @brief set up orthographic projection matrix using bounding box - * with a left-hand coordinate system and a clip-space with depth - * values from zero to one. + * with a left-hand coordinate system and a clip-space of [0, 1]. * * bounding box (AABB) must be in view space * @@ -107,8 +105,7 @@ glm_ortho_aabb_p_lh_zo(vec3 box[2], float padding, mat4 dest) { /*! * @brief set up orthographic projection matrix using bounding box - * with a left-hand coordinate system and a clip-space with depth - * values from zero to one. + * with a left-hand coordinate system and a clip-space of [0, 1]. * * bounding box (AABB) must be in view space * @@ -126,8 +123,8 @@ glm_ortho_aabb_pz_lh_zo(vec3 box[2], float padding, mat4 dest) { } /*! - * @brief set up unit orthographic projection matrix with a left-hand - * coordinate system and a clip-space of [0, 1]. + * @brief set up unit orthographic projection matrix + * with a left-hand coordinate system and a clip-space of [0, 1]. * * @param[in] aspect aspect ration ( width / height ) * @param[out] dest result matrix @@ -147,8 +144,7 @@ glm_ortho_default_lh_zo(float aspect, mat4 dest) { /*! * @brief set up orthographic projection matrix with given CUBE size - * with a left-hand coordinate system and a clip-space with depth - * values from zero to one. + * with a left-hand coordinate system and a clip-space of [0, 1]. * * @param[in] aspect aspect ratio ( width / height ) * @param[in] size cube size
Test allocation failure handling in DTD elements
@@ -2055,6 +2055,71 @@ START_TEST(test_alloc_internal_entity) } END_TEST + +/* Test the robustness against allocation failure of element handling + * Based on test_dtd_default_handling(). + */ +START_TEST(test_alloc_dtd_default_handling) +{ + XML_Memory_Handling_Suite memsuite = { duff_allocator, realloc, free }; + const char *text = + "<!DOCTYPE doc [\n" + "<!ENTITY e SYSTEM 'http://xml.libexpat.org/e'>\n" + "<!NOTATION n SYSTEM 'http://xml.libexpat.org/n'>\n" + "<!ELEMENT doc EMPTY>\n" + "<!ATTLIST doc a CDATA #IMPLIED>\n" + "<?pi in dtd?>\n" + "<!--comment in dtd-->\n" + "]><doc/>"; + const char *expected = "\n\n\n\n\n\n\n<doc/>"; + CharData storage; + int i; + int repeat = 0; + + allocation_count = 10000; + parser = XML_ParserCreate_MM(NULL, &memsuite, NULL); + if (parser == NULL) + { + fail("Failed to create parser"); + } else { + for (i = 0; i < 10; i++) { + /* Repeat some counts to catch cached allocations */ + if ((repeat < 4 && i == 2) || + (repeat == 4 && i == 3)) { + i--; + repeat++; + } + allocation_count = i; + XML_SetDefaultHandler(parser, accumulate_characters); + XML_SetDoctypeDeclHandler(parser, + dummy_start_doctype_handler, + dummy_end_doctype_handler); + XML_SetEntityDeclHandler(parser, dummy_entity_decl_handler); + XML_SetNotationDeclHandler(parser, dummy_notation_decl_handler); + XML_SetElementDeclHandler(parser, dummy_element_decl_handler); + XML_SetAttlistDeclHandler(parser, dummy_attlist_decl_handler); + XML_SetProcessingInstructionHandler(parser, dummy_pi_handler); + XML_SetCommentHandler(parser, dummy_comment_handler); + CharData_Init(&storage); + XML_SetUserData(parser, &storage); + XML_SetCharacterDataHandler(parser, accumulate_characters); + if (_XML_Parse_SINGLE_BYTES(parser, text, strlen(text), + XML_TRUE) != XML_STATUS_ERROR) + break; + XML_ParserReset(parser, NULL); + } + if (i == 0) { + fail("Default DTD parsed despite allocation failures"); + } else if (i == 10) { + fail("Default DTD not parsed with alloc count 10"); + } else { + CharData_CheckXMLChars(&storage, expected); + } + } +} +END_TEST + + static Suite * make_suite(void) { @@ -2138,6 +2203,7 @@ make_suite(void) tcase_add_test(tc_alloc, test_alloc_external_entity); tcase_add_test(tc_alloc, test_alloc_ns); tcase_add_test(tc_alloc, test_alloc_internal_entity); + tcase_add_test(tc_alloc, test_alloc_dtd_default_handling); return s; }
clear uipbuf including its attributes before creating a packet
@@ -1787,6 +1787,9 @@ input(void) return; } + /* Clear uipbuf and set default attributes */ + uipbuf_clear(); + /* This is default uip_buf since we assume that this is not fragmented */ buffer = (uint8_t *)UIP_IP_BUF; @@ -1821,7 +1824,6 @@ input(void) } buffer = frag_info[frag_context].first_frag; - break; case SICSLOWPAN_DISPATCH_FRAGN: /*
Look for icons with dots in filenames (issue
@@ -356,7 +356,8 @@ IconNode *LoadNamedIconHelper(const char *name, const char *path, image = NULL; if(hasExtension) { image = LoadImage(temp, 0, 0, 1); - } else { + } + if(!image) { for(i = 0; i < EXTENSION_COUNT; i++) { const unsigned len = strlen(ICON_EXTENSIONS[i]); memcpy(&temp[pathLength + nameLength], ICON_EXTENSIONS[i], len + 1);
Update sort documentation.
(sort-help a 0 (- (length a) 1) (or by <))) (defn sort-by - `Returns a new sorted array that compares elements by invoking - a function on each element and comparing the result with <.` + ``Returns `ind` sorted by calling + a function `f` on each element and comparing the result with <.`` [f ind] (sort ind (fn [x y] (< (f x) (f y))))) (sort (array/slice ind) by)) (defn sorted-by - `Returns a new sorted array that compares elements by invoking - a function on each element and comparing the result with <.` + ``Returns a new sorted array that compares elements by invoking + a function `f` on each element and comparing the result with <.`` [f ind] (sorted ind (fn [x y] (< (f x) (f y)))))
Update install instructions; add Raspbian Stretch
@@ -7,17 +7,16 @@ As hardware the [RaspBee](https://www.dresden-elektronik.de/raspbee?L=1&ref=gh) To learn more about the REST API itself please visit the [REST API Documentation](http://dresden-elektronik.github.io/deconz-rest-doc/) page. -License -======= -The plugin is available as open source and licensed under the BSD (3-Clause) license. +Installation +============ -Usage -===== +##### Supported platforms +* Raspbian Jessie +* Raspbian Stretch -Currently the compilation of the plugin is only supported for Raspbian Jessie distribution. -Packages for Qt4 and Raspbian Wheezy are available but not described here. +Raspbian Wheezy and Qt4 is no longer maintained. -##### Install deCONZ +### Install deCONZ 1. Download deCONZ package wget http://www.dresden-elektronik.de/rpi/deconz/beta/deconz-2.04.90-qt5.deb @@ -33,9 +32,9 @@ Packages for Qt4 and Raspbian Wheezy are available but not described here. sudo apt update sudo apt install -f -##### Install deCONZ development package +##### Install deCONZ development package (optional) -The development package is only needed if you wan't to modify the plugin or try the latest commits from master. +The development package is only needed if you wan't to modify the plugin or try the latest commits from master branch. 1. Download deCONZ development package @@ -93,7 +92,7 @@ $ rm -f /home/pi/.config/autostart/deCONZ.desktop Software requirements --------------------- -* Raspbian Jessie or Stretch with Qt5 +* Raspbian Jessie or Raspbian Stretch with Qt5 **Important** The serial port must be configured as follows to allow communication with the RaspBee. @@ -123,3 +122,8 @@ The following libraries are used by the plugin: * [SQLite](http://www.sqlite.org) * [qt-json](https://github.com/lawand/droper/tree/master/qt-json) * [colorspace](http://www.getreuer.info/home/colorspace) + +License +======= +The plugin is available as open source and licensed under the BSD (3-Clause) license. +
Report tuple address in data-corruption error message Most data-corruption reports mention the location of the problem, but this one failed to. Add it. Backpatch all the way back. In 12 and older, also assign the ERRCODE_DATA_CORRUPTED error code as was done in commit for 13 and later. Discussion:
@@ -426,7 +426,13 @@ tuple_lock_retry: /* otherwise xmin should not be dirty... */ if (TransactionIdIsValid(SnapshotDirty.xmin)) - elog(ERROR, "t_xmin is uncommitted in tuple to be updated"); + ereport(ERROR, + (errcode(ERRCODE_DATA_CORRUPTED), + errmsg_internal("t_xmin %u is uncommitted in tuple (%u,%u) to be updated in table \"%s\"", + SnapshotDirty.xmin, + ItemPointerGetBlockNumber(&tuple->t_self), + ItemPointerGetOffsetNumber(&tuple->t_self), + RelationGetRelationName(relation)))); /* * If tuple is being updated by other transaction then we
example/module: update SYMTAB_SRC dependency to fix FSROOT not populated In parallel build, for example maix-bit:module config, it reports: nm: 'a.out': No such file This is caused by FSROOT not populated with chardev when symtab.c generated. So update SYMTAB_SRC dependency to fix it.
@@ -122,14 +122,14 @@ endif # Create the exported symbol table -$(SYMTAB_SRC): build +$(SYMTAB_SRC): populate $(Q) $(DRIVER_DIR)/mksymtab.sh $(FSROOT_DIR) >$@ else # Create the exported symbol table -$(SYMTAB_SRC): build populate +$(SYMTAB_SRC): populate $(Q) $(DRIVER_DIR)/mksymtab.sh $(FSROOT_DIR) >$@ endif
mskmodem/sandbox: removing unused variables, cleaning help()
@@ -45,17 +45,16 @@ void usage() { printf("mskmodem_test -- minimum-shift keying modem example\n"); printf("options:\n"); - printf(" h : print help\n"); - printf(" t : filter type: [square], rcos-full, rcos-half, gmsk\n"); - printf(" k : samples/symbol, default: 8\n"); - printf(" b : bits/symbol, default: 1\n"); - printf(" H : modulation index, default: 0.5\n"); - printf(" B : filter roll-off, default: 0.35\n"); - printf(" n : number of data symbols, default: 20\n"); - printf(" s : SNR [dB], default: 80\n"); - printf(" F : carrier freq. offset, default: 0.0\n"); - printf(" P : carrier phase offset, default: 0.0\n"); - printf(" T : fractional symbol offset, default: 0.0\n"); + printf(" -h : print help\n"); + printf(" -t <type> : filter type: [square], rcos-full, rcos-half, gmsk\n"); + printf(" -k <sps> : samples/symbol, default: 8\n"); + printf(" -b <bps> : bits/symbol, default: 1\n"); + printf(" -H <index> : modulation index, default: 0.5\n"); + printf(" -B <beta> : filter roll-off, default: 0.35\n"); + printf(" -n <num> : number of data symbols, default: 20\n"); + printf(" -s <snr> : SNR [dB], default: 80\n"); + printf(" -F <freq> : carrier freq. offset, default: 0.0\n"); + printf(" -P <phase> : carrier phase offset, default: 0.0\n"); } int main(int argc, char*argv[]) { @@ -67,7 +66,6 @@ int main(int argc, char*argv[]) { float SNRdB = 80.0f; // signal-to-noise ratio [dB] float cfo = 0.0f; // carrier frequency offset float cpo = 0.0f; // carrier phase offset - float tau = 0.0f; // fractional symbol offset enum { TXFILT_SQUARE=0, TXFILT_RCOS_FULL, @@ -77,7 +75,7 @@ int main(int argc, char*argv[]) { float gmsk_bt = 0.35f; // GMSK bandwidth-time factor int dopt; - while ((dopt = getopt(argc,argv,"ht:k:b:H:B:n:s:F:P:T:")) != EOF) { + while ((dopt = getopt(argc,argv,"ht:k:b:H:B:n:s:F:P:")) != EOF) { switch (dopt) { case 'h': usage(); return 0; case 't': @@ -102,7 +100,6 @@ int main(int argc, char*argv[]) { case 's': SNRdB = atof(optarg); break; case 'F': cfo = atof(optarg); break; case 'P': cpo = atof(optarg); break; - case 'T': tau = atof(optarg); break; default: exit(1); }
hv: remove unnecessary ASSERT in vlapic_write vlapic_write handle 'offset' that is valid and ignore all other invalid 'offset'. so ASSERT on this 'offset' input is unnecessary. This patch removes above ASSERT to avoid potential hypervisor crash by guest malicious input when debug build is used.
@@ -1469,9 +1469,6 @@ static int32_t vlapic_write(struct acrn_vlapic *vlapic, uint32_t offset, uint64_ uint32_t data32 = (uint32_t)data; int32_t ret = 0; - ASSERT(((offset & 0xfU) == 0U) && (offset < PAGE_SIZE), - "%s: invalid offset %#x", __func__, offset); - dev_dbg(DBG_LEVEL_VLAPIC, "vlapic write offset %#x, data %#lx", offset, data); if (offset <= sizeof(*lapic)) {
Small documentation addition on bringup
@@ -47,8 +47,13 @@ After the harness is created, the ``BundleBridgeSource``'s must be connected to This is done with harness binders and io binders (see ``fpga/src/main/scala/vcu118/HarnessBinders.scala`` and ``fpga/src/main/scala/vcu118/IOBinders.scala``). For more information on harness binders and io binders, refer to :ref:`IOBinders and HarnessBinders`. -An example of a more complicated design using new ``Overlays`` can be viewed in ``fpga/src/main/scala/vcu118/bringup/``. -This example extends the default test harness and creates new ``Overlays`` to connect to the FMC port. +Introduction to the Bringup Platform +------------------------------------ + +An example of a more complicated design used for Chipyard test chips can be viewed in ``fpga/src/main/scala/vcu118/bringup/``. +This example extends the default test harness and creates new ``Overlays`` to connect to a DUT (connected to the FMC port). +Extensions include another UART (connected over FMC), I2C (connected over FMC), miscellaneous GPIOS (can be connected to anything), and a TSI Host Widget. +The TSI Host Widget is used to interact with the DUT from the prototype over a SerDes link (sometimes called the Low BandWidth InterFace - LBWIF) and provide access to a channel of the FPGA's DRAM. .. Note:: Remember that since whenever a new test harness is created (or the config changes, or the config packages changes, or...), you need to modify the make invocation. For example, ``make SUB_PROJECT=vcu118 CONFIG=MyNewVCU118Config CONFIG_PACKAGE=this.is.my.scala.package bitstream``.
fix dh_test. The issues were introduced by commit
@@ -45,7 +45,7 @@ static int dh_test(void) unsigned char *abuf = NULL; unsigned char *bbuf = NULL; int i, alen, blen, aout, bout; - int ret = 1; + int ret = 0; RAND_seed(rnd_seed, sizeof rnd_seed); @@ -59,12 +59,14 @@ static int dh_test(void) if (!DH_check(a, &i)) goto err; - if (TEST_false(i & DH_CHECK_P_NOT_PRIME) - || TEST_false(i & DH_CHECK_P_NOT_SAFE_PRIME) - || TEST_false(i & DH_UNABLE_TO_CHECK_GENERATOR) - || TEST_false(i & DH_NOT_SUITABLE_GENERATOR)) + if (!TEST_false(i & DH_CHECK_P_NOT_PRIME) + || !TEST_false(i & DH_CHECK_P_NOT_SAFE_PRIME) + || !TEST_false(i & DH_UNABLE_TO_CHECK_GENERATOR) + || !TEST_false(i & DH_NOT_SUITABLE_GENERATOR)) goto err; + DH_get0_pqg(a, &ap, NULL, &ag); + if (!TEST_ptr(b = DH_new())) goto err; @@ -76,23 +78,26 @@ static int dh_test(void) if (!DH_generate_key(a)) goto err; + DH_get0_key(a, &apub_key, NULL); if (!DH_generate_key(b)) goto err; + DH_get0_key(b, &bpub_key, NULL); alen = DH_size(a); if (!TEST_ptr(abuf = OPENSSL_malloc(alen)) - || !TEST_true(aout = DH_compute_key(abuf, bpub_key, a))) + || !TEST_true((aout = DH_compute_key(abuf, bpub_key, a)) != -1)) goto err; blen = DH_size(b); if (!TEST_ptr(bbuf = OPENSSL_malloc(blen)) - || !TEST_true(bout = DH_compute_key(bbuf, apub_key, b))) + || !TEST_true((bout = DH_compute_key(bbuf, apub_key, b)) != -1)) goto err; - if (!TEST_true(aout < 4) + + if (!TEST_true(aout >= 4) || !TEST_mem_eq(abuf, aout, bbuf, bout)) goto err; - ret = 0; + ret = 1; err:
Timing of when the periodic thread starts was commented out in doReset(), affecting child procs.
@@ -1836,7 +1836,7 @@ doReset() { g_cfg.pid = getpid(); g_thread.once = 0; - g_thread.startTime = time(NULL); // + g_thread.interval; + g_thread.startTime = time(NULL) + g_thread.interval; memset(&g_ctrs, 0, sizeof(struct metric_counters_t)); ctlDestroy(&g_ctl); g_ctl = initCtl(g_staticfg);
Fix missing HID mouse destructor call The destructor unregisters the HID mouse, so it was not reported as a leak, but it must still be called.
@@ -598,6 +598,9 @@ end: if (hid_keyboard_initialized) { sc_hid_keyboard_destroy(&s->keyboard_hid); } + if (hid_mouse_initialized) { + sc_hid_mouse_destroy(&s->mouse_hid); + } sc_aoa_stop(&s->aoa); } if (acksync) {
dpdk: support passing log-level Since DPDK 17.05, DPDK logging supports per subsystem dynamic logging. Allow passing this as log-level on EAL command line. dpdk { log-level pmd.net.virtio.*:debug ... }
@@ -49,7 +49,8 @@ _(force-ranks, r) _(huge-dir) \ _(proc-type) \ _(file-prefix) \ -_(vdev) +_(vdev) \ +_(log-level) typedef struct {
Build system: Do not explicitly check for libpoppler-cpp The cups-filters does not contain any code using libpoppler-cpp, therefore we let ./configure not check for it. This makes building distribution packages easier.
@@ -173,9 +173,6 @@ AM_CONDITIONAL([ENABLE_IMAGEFILTERS], [test "x$enable_imagefilters" != "xno"]) AC_ARG_ENABLE(poppler, AS_HELP_STRING([--enable-poppler],[enable Poppler-based filters]), enable_poppler=$enableval,enable_poppler=yes) AM_CONDITIONAL(ENABLE_POPPLER, test x$enable_poppler = xyes) -if test x$enable_poppler = xyes; then - PKG_CHECK_MODULES([POPPLER], [poppler-cpp >= 0.19]) -fi # ===================== # Check for Ghostscript
BugID:17646749:[example]fix productSecret setting absence
@@ -291,9 +291,7 @@ int linkkit_main(void *paras) HAL_SetProductKey(PRODUCT_KEY); HAL_SetDeviceName(DEVICE_NAME); HAL_SetDeviceSecret(DEVICE_SECRET); -#if defined(SUPPORT_ITLS) HAL_SetProductSecret(PRODUCT_SECRET); -#endif /* Choose Login Server */ int domain_type = IOTX_CLOUD_REGION_SHANGHAI; IOT_Ioctl(IOTX_IOCTL_SET_DOMAIN, (void *)&domain_type);
[CLI] Add feature to generate wallet address command keygen generate wallet address to file prefix.addr, if --addr flag is set.
@@ -4,6 +4,7 @@ import ( b64 "encoding/base64" "encoding/json" "fmt" + "github.com/aergoio/aergo/p2p/p2putil" "os" "github.com/aergoio/aergo/account/key" @@ -24,6 +25,7 @@ var ( genPubkey bool genID bool genJSON bool + genAddress bool password string ) @@ -32,6 +34,7 @@ func init() { //keygenCmd.Flags().BoolVar(&genPubkey, "genpubkey", true, "also generate public key") keygenCmd.Flags().BoolVar(&genJSON, "json", false, "output combined json object instead of generating files") keygenCmd.Flags().StringVar(&password, "password", "", "password for encrypted private key in json file") + keygenCmd.Flags().BoolVar(&genAddress, "addr", false, "generate prefix.addr for wallet address") rootCmd.AddCommand(keygenCmd) } @@ -68,6 +71,7 @@ func generateKeyFiles(prefix string) error { pkFile := prefix + ".key" pubFile := prefix + ".pub" idFile := prefix + ".id" + addrFile := prefix + ".addr" // Write private key file pkf, err := os.Create(pkFile) @@ -103,7 +107,21 @@ func generateKeyFiles(prefix string) error { idf.Write(idBytes) idf.Sync() + if genAddress { + addrf, err := os.Create(addrFile) + if err != nil { + return err + } + btPub := p2putil.ConvertPubKeyToBTCEC(pub) + address := key.GenerateAddress(btPub.ToECDSA()) + addrf.WriteString(types.EncodeAddress(address)) + addrf.Sync() + + fmt.Printf("Wrote files %s.{key,pub,id,addr}.\n", prefix) + } else { fmt.Printf("Wrote files %s.{key,pub,id}.\n", prefix) + } + return nil }
Set default item value only on ResourceItem creation
@@ -397,15 +397,16 @@ static bool DEV_InitDeviceFromDescription(Device *device, const DeviceDescriptio { DBG_Printf(DBG_INFO, "sub-device: %s, create item: %s\n", qPrintable(uniqueId), i.descriptor.suffix); item = rsub->addItem(i.descriptor.type, i.descriptor.suffix); - } - DBG_Assert(item); - if (item) - { if (i.defaultValue.isValid()) { item->setValue(i.defaultValue); } + } + + DBG_Assert(item); + if (item) + { item->setParseParameters(i.parseParameters); item->setReadParameters(i.readParameters);
session: add handle to disconnect_session_reply api msg.
@@ -520,7 +520,7 @@ vl_api_disconnect_session_t_handler (vl_api_disconnect_session_t * mp) } done: - REPLY_MACRO (VL_API_DISCONNECT_SESSION_REPLY); + REPLY_MACRO2 (VL_API_DISCONNECT_SESSION_REPLY, rmp->handle = mp->handle); } static void
remove macos code that requires xcode
@@ -56,35 +56,36 @@ struct MHD_Daemon** startHttpServer(const char* redirect_uri, struct MHD_Daemon** oidc_mhd_daemon_ptr = NULL; #ifdef __APPLE__ -void noteProcDeath(CFFileDescriptorRef fdref, CFOptionFlags callBackTypes, - void* info) { - struct kevent kev; - int fd = CFFileDescriptorGetNativeDescriptor(fdref); - kevent(fd, NULL, 0, &kev, 1, NULL); - // take action on death of process here - unsigned int dead_pid = (unsigned int)kev.ident; - - CFFileDescriptorInvalidate(fdref); - CFRelease(fdref); - - int our_pid = getpid(); - exit(EXIT_FAILURE); -} - -void suicide_if_we_become_a_zombie() { - int parent_pid = getppid(); - int fd = kqueue(); - struct kevent kev; - EV_SET(&kev, parent_pid, EVFILT_PROC, EV_ADD | EV_ENABLE, NOTE_EXIT, 0, NULL); - kevent(fd, &kev, 1, NULL, 0, NULL); - CFFileDescriptorRef fdref = CFFileDescriptorCreate(kCFAllocatorDefault, fd, - true, noteProcDeath, NULL); - CFFileDescriptorEnableCallBacks(fdref, kCFFileDescriptorReadCallBack); - CFRunLoopSourceRef source = - CFFileDescriptorCreateRunLoopSource(kCFAllocatorDefault, fdref, 0); - CFRunLoopAddSource(CFRunLoopGetMain(), source, kCFRunLoopDefaultMode); - CFRelease(source); -} +// void noteProcDeath(CFFileDescriptorRef fdref, CFOptionFlags callBackTypes, +// void* info) { +// struct kevent kev; +// int fd = CFFileDescriptorGetNativeDescriptor(fdref); +// kevent(fd, NULL, 0, &kev, 1, NULL); +// // take action on death of process here +// unsigned int dead_pid = (unsigned int)kev.ident; +// +// CFFileDescriptorInvalidate(fdref); +// CFRelease(fdref); +// +// int our_pid = getpid(); +// exit(EXIT_FAILURE); +// } +// +// void suicide_if_we_become_a_zombie() { +// int parent_pid = getppid(); +// int fd = kqueue(); +// struct kevent kev; +// EV_SET(&kev, parent_pid, EVFILT_PROC, EV_ADD | EV_ENABLE, NOTE_EXIT, 0, +// NULL); kevent(fd, &kev, 1, NULL, 0, NULL); CFFileDescriptorRef fdref = +// CFFileDescriptorCreate(kCFAllocatorDefault, fd, +// true, noteProcDeath, +// NULL); +// CFFileDescriptorEnableCallBacks(fdref, kCFFileDescriptorReadCallBack); +// CFRunLoopSourceRef source = +// CFFileDescriptorCreateRunLoopSource(kCFAllocatorDefault, fdref, 0); +// CFRunLoopAddSource(CFRunLoopGetMain(), source, kCFRunLoopDefaultMode); +// CFRelease(source); +// } #endif void http_sig_handler(int signo) { @@ -117,7 +118,7 @@ oidc_error_t fireHttpServer(list_t* redirect_uris, size_t size, } if (pid == 0) { // child #ifdef __APPLE__ - suicide_if_we_become_a_zombie(); + // suicide_if_we_become_a_zombie(); #else prctl(PR_SET_PDEATHSIG, SIGTERM); #endif
BugID:21247578: [WhiteScan] Fix observe null pointer issue
@@ -611,7 +611,7 @@ void observe_step(lwm2m_context_t * contextP, break; } } - if ((watcherP->parameters->toSet & LWM2M_ATTR_FLAG_STEP) != 0) + if (((watcherP->parameters->toSet & LWM2M_ATTR_FLAG_STEP) != 0) && (dataP != NULL)) { lwm2m_log(LOG_DEBUG, "Checking step\n");
Resolve some GPDB_84_MERGE_FIXMEs in bitmap as well as a minor possible memory leak. Author: Xiaoran Wang
@@ -363,26 +363,15 @@ bmendscan(PG_FUNCTION_ARGS) * release the buffers that have been stored for each related * bitmap vector. */ - if (so->bm_currPos->nvec > 1) - { - /* GPDB_84_MERGE_FIXME: does ->bm_batchWords need to be pfree'd? */ - _bitmap_cleanup_batchwords(so->bm_currPos->bm_batchWords); - } - _bitmap_cleanup_scanpos(so->bm_currPos->posvecs, - so->bm_currPos->nvec); + cleanup_pos(so->bm_currPos); pfree(so->bm_currPos); so->bm_currPos = NULL; } if (so->bm_markPos != NULL) { - if (so->bm_markPos->nvec > 1) - { - /* GPDB_84_MERGE_FIXME: does ->bm_batchWords need to be pfree'd? */ - _bitmap_cleanup_batchwords(so->bm_markPos->bm_batchWords); - } - _bitmap_cleanup_scanpos(so->bm_markPos->posvecs, - so->bm_markPos->nvec); + cleanup_pos(so->bm_markPos); + pfree(so->bm_markPos); so->bm_markPos = NULL; } @@ -743,8 +732,7 @@ pull_stream(StreamBMIterator *iterator, PagetableEntry *e) } else if (so->is_done) { - /* GPDB_84_MERGE_FIXME: this doesn't seem right; shouldn't we free at - * end_iterate()? */ + /* Just free opaque state early so that we could short circuit. */ if (iterator->opaque) { stream_free(iterator->opaque); iterator->opaque = NULL;