message
stringlengths 6
474
| diff
stringlengths 8
5.22k
|
---|---|
changed option | #define QUERY_RETRIES 2
#define EXPENSIVE_RAM 1
-#define OPENSSL 2 // 0 disactivate, 1 activated, 2 test openssl vs secp256k1
+#define OPENSSL 0 // 0 disactivate, 1 activated, 2 test openssl vs secp256k1
enum bi_flags {
BI_MAIN = 0x01,
|
Also disable shared memory test, issue | @@ -65,7 +65,8 @@ def sharedmem_transact(memory, value):
return read_shared_memory(memory, VALUE_ADDR)
-@test_harness.test(['emulator'])
+# Disabled because of bug #141
+#@test_harness.test(['emulator'])
def shared_memory(*unused):
"""See coprocessor.c for an explanation of this test"""
|
Docs - add information about -with-gpbackup option | @@ -7,7 +7,7 @@ This tool collects Greenplum and system log files, along with the relevant confi
```
gpmt gp_log_collector [-failed-segs | -c <ID1,ID2,...>| -hostfile <file> | -h <host1, host2,...>]
[ -start <YYYY-MM-DD> ] [ -end <YYYY-MM-DD> ]
-[ -dir <path> ] [ -segdir <path> ] [ -a ] [-skip-master] [-with-gptext] [-with-gptext-only] [-with-pxf] [-with-pxf-only] [-with-gpupgrade]
+[ -dir <path> ] [ -segdir <path> ] [ -a ] [-skip-master] [-with-gpbackup] [-with-gptext] [-with-gptext-only] [-with-pxf] [-with-pxf-only] [-with-gpupgrade]
```
## <a id="opts"></a>Options
@@ -45,6 +45,27 @@ gpmt gp_log_collector [-failed-segs | -c <ID1,ID2,...>| -hostfile <file> | -h <h
-skip-master
: When running `gp_log_collector`, the generated tarball can be very large. Use this option to skip Greenplum Master log collection when only Greenplum Segment logs are required.
+-with-gpbackup
+: Beginning with Greenplum 6.22, this option enables you to collect logs related to backup and restore.
+
+With this option, `gpmt` collects these log files from `$GPADMIN_HOME/gpAdminLogs`:
+
+- `gpbackup_.log`
+- `gpbackup_helper_.log`
+- `gpbackup_ plugin .log`
+- `gprestore_.log`
+
+These are collected from the provided `--backup-dir` or default backup directory:
+
+- `gpbackup__config.yaml`
+- `gpbackup__metadata.sql`
+- `gpbackup__report`
+- `gpbackup__toc.yaml`
+- `gprestore___report`
+- `gpbackup___report`
+
+Also, the `pg_log` file is collected from the master and segment hosts.
+
-with-gptext
: Collect all GPText logs along with Greenplum logs.
|
randomx set fork time bug fixing | #include <string.h>
#include <stdio.h>
#include <unistd.h>
-#include <limits.h>
+//#include <limits.h>
#include <pthread.h>
#include <randomx.h>
#include "utils/log.h"
@@ -74,7 +74,8 @@ inline void rx_set_fork_time(struct block_internal *m) {
next_rx_mem->seed_height = m->height;
xdag_info("*#*from %llu,%llx, set switch time to %llx", m->height, m->time,
next_rx_mem->switch_time);
- if (xdag_cmphash(next_rx_mem->seed, block_by_height(m->height - g_rx_fork_lag)->hash) != 0) {
+ memcpy(hash, block_by_height(m->height - g_rx_fork_lag)->hash, sizeof(xdag_hashlow_t));
+ if (xdag_cmphash(next_rx_mem->seed, hash) != 0) {
// to avoid main block roll back, get prior 128 height hash as seed
memcpy(next_rx_mem->seed, hash, sizeof(xdag_hashlow_t));
rx_pool_update_seed(next_mem_index);
@@ -535,9 +536,9 @@ void rx_pool_release_mem(void) {
}
void rx_loading_fork_time(void) { // node start height greater than g_rx_fork_seed_height
- xdag_hashlow_t hash = {0};
+// xdag_hashlow_t hash = {0};
struct block_internal* b;
- xdag_hashlow_t hash_seed = {0};
+// xdag_hashlow_t hash_seed = {0};
if (g_xdag_stats.nmain >= g_rx_fork_seed_height) {
b = block_by_height(g_rx_fork_seed_height);
|
dpdk: avoid false sharing of dpdk_buffer_per_thread_data | @@ -81,6 +81,7 @@ STATIC_ASSERT (VLIB_BUFFER_PRE_DATA_SIZE == RTE_PKTMBUF_HEADROOM,
typedef struct
{
+ CLIB_CACHE_LINE_ALIGN_MARK (cacheline0);
struct rte_mbuf ***mbuf_pending_free_list;
/* cached last pool */
|
coreboot: restore the debug print state | #include <if/acpi_defs.h>
#endif
-#define DEBUG_CPUBOOT 1
+
#ifdef DEBUG_CPUBOOT
-#define DEBUG(x...) if (1) debug_printf(x)
+#define DEBUG(x...) if (debug_flag) debug_printf(x)
#else
#define DEBUG(x...) ((void)0)
#endif
|
sys/reboot; if fcb_init() sees data it does not recognize in
the flash area allocated to it, erase that area. | @@ -96,10 +96,14 @@ reboot_init_handler(int log_store_type, uint8_t entries)
reboot_log_fcb.fl_entries = entries;
+ rc = fcb_init(fcbp);
+ if (rc) {
+ flash_area_erase(ptr, 0, ptr->fa_size);
rc = fcb_init(fcbp);
if (rc) {
return rc;
}
+ }
reboot_log_handler = (struct log_handler *)&log_fcb_handler;
if (rc) {
return rc;
|
Resolved changes | @@ -31,7 +31,6 @@ assert(Math.max(1,0.5,-1,0) == 1);
assert(Math.average(1, 2, 3) == 2);
assert(Math.average([1, 2, 3]) == 2);
-// assert(Math.average(1, 6, 1.2, -19, -98) == -21.76);
assert(Math.sum(1, 2, 3) == 6);
assert(Math.sum([1, 2, 3]) == 6);
|
framework/st_things: use presentative config for ARTIK board
ARTIK053, 053s, 055s are ARTIK05X series and it has
ARCH_BOARD_ARTIK05X_FAMILY config.
Let's use it instead of all of list of ARTIK board. | @@ -25,7 +25,7 @@ comment "ST_Things Config Parameters"
config ST_THINGS_ARTIK_HW_CERT_KEY
bool "Enable Artik H/W Certificate & Key"
- depends on ARCH_BOARD_ARTIK053 || ARCH_BOARD_ARTIK053S || ARCH_BOARD_ARTIK055 || ARCH_BOARD_ARTIK055S
+ depends on ARCH_BOARD_ARTIK05X_FAMILY
select TLS_WITH_SSS
select SUPPORT_FULL_SECURITY
select HW_RNG
|
readme: fix typo in code example | @@ -624,7 +624,7 @@ Stream Reader API
``io.RawIOBase`` interface for reading decompressed output as a stream::
with open(path, 'rb') as fh:
- dctx = zstd.ZstdDecpmpressor()
+ dctx = zstd.ZstdDecompressor()
with dctx.stream_reader(fh) as reader:
while True:
chunk = reader.read(16384)
|
Add docs & start get_ip command with DHCP config | @@ -156,6 +156,7 @@ esp_sta_getip(esp_ip_t* ip, esp_ip_t* gw, esp_ip_t* nm, uint8_t def,
ESP_MSG_VAR_ALLOC(msg, blocking);
ESP_MSG_VAR_SET_EVT(msg, evt_fn, evt_arg);
ESP_MSG_VAR_REF(msg).cmd_def = ESP_CMD_WIFI_CIPSTA_GET;
+ ESP_MSG_VAR_REF(msg).cmd = ESP_CMD_WIFI_CWDHCP_GET;
ESP_MSG_VAR_REF(msg).msg.sta_ap_getip.ip = ip;
ESP_MSG_VAR_REF(msg).msg.sta_ap_getip.gw = gw;
ESP_MSG_VAR_REF(msg).msg.sta_ap_getip.nm = nm;
@@ -166,7 +167,14 @@ esp_sta_getip(esp_ip_t* ip, esp_ip_t* gw, esp_ip_t* nm, uint8_t def,
/**
* \brief Set station IP address
- * \note DHCP is automatically disabled when setting IP address manually
+ *
+ * Application may manually set IP address.
+ * When this happens, stack will check for DHCP settings and will read actual IP address from device.
+ * Once procedure is finished, \ref ESP_EVT_WIFI_IP_ACQUIRED event will be sent to application where
+ * user may read the actual new IP and DHCP settings.
+ *
+ * \note DHCP is automatically disabled when using static IP address
+ *
* \param[in] ip: Pointer to IP address
* \param[in] gw: Pointer to gateway address. Set to `NULL` to use default gateway
* \param[in] nm: Pointer to netmask address. Set to `NULL` to use default netmask
|
Rewrite JWM_PKGCONFIG_EXISTS macro to support crossbuilding | @@ -93,17 +93,7 @@ AC_FUNC_ALLOCA()
# Check for pkg-config.
############################################################################
-AC_DEFUN([JWM_PKGCONFIG_EXISTS],
-[
- AC_MSG_CHECKING([for pkg-config])
- if which pkg-config >/dev/null ; then
- PKGCONFIG=pkg-config
- AC_MSG_RESULT($PKGCONFIG)
- else
- PKGCONFIG=""
- AC_MSG_RESULT([no])
- fi
-])
+AC_DEFUN([JWM_PKGCONFIG_EXISTS],[AC_PATH_TOOL(PKGCONFIG,pkg-config)])
AC_DEFUN([JWM_PKGCONFIG],
[
|
sse2: update indenting format
I've been trying to avoid this because I know it will destroy the
usefulness of git blame, but new code keeps getting added using the old
style, so I think I need to go through and apply the new style
consistently. | @@ -2309,7 +2309,6 @@ simde_mm_cmpunord_sd (simde__m128d a, simde__m128d b) {
#if defined(simde_math_isnan)
r_.u64[0] = (simde_math_isnan(a_.f64[0]) || simde_math_isnan(b_.f64[0])) ? ~UINT64_C(0) : UINT64_C(0);
r_.u64[1] = a_.u64[1];
-
#else
HEDLEY_UNREACHABLE();
#endif
@@ -2653,7 +2652,6 @@ simde_mm_cvtsi128_si64 (simde__m128i a) {
SIMDE_FUNCTION_ATTRIBUTES
simde__m128d
simde_mm_cvtsi32_sd (simde__m128d a, int32_t b) {
-
#if defined(SIMDE_X86_SSE2_NATIVE)
return _mm_cvtsi32_sd(a, b);
#else
@@ -4396,7 +4394,6 @@ simde_mm_set_sd (simde_float64 a) {
return vsetq_lane_f64(a, vdupq_n_f64(SIMDE_FLOAT64_C(0.0)), 0);
#else
return simde_mm_set_pd(SIMDE_FLOAT64_C(0.0), a);
-
#endif
}
#if defined(SIMDE_X86_SSE2_ENABLE_NATIVE_ALIASES)
|
Have example/jsonetc read and write extra commas | @@ -157,6 +157,8 @@ static const char* g_usage =
" -s -strict-json-pointer-syntax\n"
" -t -tabs\n"
" -fail-if-unsandboxed\n"
+ " -input-json-extra-comma\n"
+ " -output-json-extra-comma\n"
"\n"
"The input.json filename is optional. If absent, it reads from stdin.\n"
"\n"
@@ -174,6 +176,14 @@ static const char* g_usage =
"on its own line. Configure this with the -c / -compact-output, -i=NUM /\n"
"-indent=NUM (for NUM ranging from 0 to 8) and -t / -tabs flags.\n"
"\n"
+ "The -input-json-extra-comma flag allows input like \"[1,2,]\", with a\n"
+ "comma after the final element of a JSON list or dictionary.\n"
+ "\n"
+ "The -output-json-extra-comma flag writes extra commas, regardless of\n"
+ "whether the input had it. Extra commas are non-compliant with the JSON\n"
+ "specification but many parsers accept it and it can produce simpler\n"
+ "line-based diffs. This flag is ignored when -compact-output is set.\n"
+ "\n"
"----\n"
"\n"
"The -q=STR or -query=STR flag gives an optional JSON Pointer query, to\n"
@@ -559,7 +569,9 @@ struct {
bool compact_output;
bool fail_if_unsandboxed;
size_t indent;
+ bool input_json_extra_comma;
uint32_t max_output_depth;
+ bool output_json_extra_comma;
char* query_c_string;
bool strict_json_pointer_syntax;
bool tabs;
@@ -623,6 +635,14 @@ parse_flags(int argc, char** argv) {
}
return g_usage;
}
+ if (!strcmp(arg, "input-json-extra-comma")) {
+ g_flags.input_json_extra_comma = true;
+ continue;
+ }
+ if (!strcmp(arg, "output-json-extra-comma")) {
+ g_flags.output_json_extra_comma = true;
+ continue;
+ }
if (!strncmp(arg, "q=", 2) || !strncmp(arg, "query=", 6)) {
while (*arg++ != '=') {
}
@@ -692,6 +712,10 @@ initialize_globals(int argc, char** argv) {
TRY(g_dec.initialize(sizeof__wuffs_json__decoder(), WUFFS_VERSION, 0)
.message());
+ if (g_flags.input_json_extra_comma) {
+ g_dec.set_quirk_enabled(WUFFS_JSON__QUIRK_ALLOW_EXTRA_COMMA, true);
+ }
+
// Consume an optional whitespace trailer. This isn't part of the JSON spec,
// but it works better with line oriented Unix tools (such as "echo 123 |
// jsonptr" where it's "echo", not "echo -n") or hand-edited JSON files which
@@ -869,7 +893,11 @@ handle_token(wuffs_base__token t, bool start_of_token_chain) {
if ((g_ctx != context::in_list_after_bracket) &&
(g_ctx != context::in_dict_after_brace) &&
!g_flags.compact_output) {
+ if (g_flags.output_json_extra_comma) {
+ TRY(write_dst(",\n", 2));
+ } else {
TRY(write_dst("\n", 1));
+ }
for (uint32_t i = 0; i < g_depth; i++) {
TRY(write_dst(
g_flags.tabs ? INDENT_TAB_STRING : INDENT_SPACES_STRING,
|
jenkins: doc specific build functions | @@ -334,6 +334,7 @@ def generateFullBuildStages() {
return tasks
}
+/* Stage for analysing open Tasks and running sloccount */
def buildTodo() {
def stageName = "todo"
def openTaskPatterns = '''\
@@ -356,6 +357,7 @@ def buildTodo() {
}]
}
+/* Stage checking if release notes have been updated */
def buildCheckReleaseNotes() {
def stageName = "check-release-notes"
return [(stageName): {
@@ -368,6 +370,7 @@ def buildCheckReleaseNotes() {
}]
}
+/* Stage running Icheck to see if the API has been modified */
def buildIcheck() {
def stageName = "icheck"
return [(stageName): {
@@ -380,6 +383,7 @@ def buildIcheck() {
}]
}
+/* Stage building and uploading the documentation */
def buildDoc() {
def stageName = "doc"
cmakeFlags = [
|
apps/kernel_sample: fix async io test
aio.c compiles only when CONFIG_EXAMPLES_KERNEL_SAMPLE_AIO is enable,
so in order to use it's functions we need to check whether
CONFIG_EXAMPLES_KERNEL_SAMPLE_AIO is enabled. | @@ -323,7 +323,7 @@ static int user_main(int argc, char *argv[])
check_test_memory_usage();
#endif
-#ifdef CONFIG_FS_AIO
+#if defined(CONFIG_FS_AIO) && defined(CONFIG_EXAMPLES_KERNEL_SAMPLE_AIO)
/* Check asynchronous I/O */
printf("\nuser_main: AIO test\n");
|
doc: add graphviz installation instructions | @@ -122,13 +122,14 @@ Depending on your Linux version, install the needed tools:
.. code-block:: bash
- sudo apt-get install doxygen python3-pip python3-wheel make
+ sudo apt-get install doxygen python3-pip \
+ python3-wheel make graphviz
* For Fedora use:
.. code-block:: bash
- sudo dnf install doxygen python3-pip python3-wheel make
+ sudo dnf install doxygen python3-pip python3-wheel make graphviz
And for either Linux environment, install the remaining python-based
tools:
|
Fixed processing Unix listening socket failures.
This is related to issue on GitHub. | @@ -1116,11 +1116,9 @@ nxt_main_listening_socket(nxt_sockaddr_t *sa, nxt_listening_socket_t *ls)
break;
}
- goto next;
- }
-
+ } else
#endif
-
+ {
switch (err) {
case EACCES:
@@ -1135,6 +1133,7 @@ nxt_main_listening_socket(nxt_sockaddr_t *sa, nxt_listening_socket_t *ls)
ls->error = NXT_SOCKET_ERROR_NOADDR;
break;
}
+ }
ls->end = nxt_sprintf(ls->start, ls->end, "bind(\\\"%*s\\\") failed %E",
(size_t) sa->length, nxt_sockaddr_start(sa), err);
@@ -1143,8 +1142,6 @@ nxt_main_listening_socket(nxt_sockaddr_t *sa, nxt_listening_socket_t *ls)
#if (NXT_HAVE_UNIX_DOMAIN)
-next:
-
if (sa->u.sockaddr.sa_family == AF_UNIX) {
char *filename;
mode_t access;
|
Re-re-re fix message.c ifup test | @@ -1903,11 +1903,13 @@ send_request_resend(const unsigned char *prefix, unsigned char plen,
id, neigh->ifp, resend_delay);
} else {
struct interface *ifp;
- FOR_ALL_INTERFACES(ifp)
+ FOR_ALL_INTERFACES(ifp) {
+ if(!if_up(ifp)) continue;
send_multihop_request(&ifp->buf, prefix, plen, src_prefix, src_plen,
seqno, id, 127);
}
}
+}
void
handle_request(struct neighbour *neigh, const unsigned char *prefix,
|
linker.cpp: let llvm::Function::setName() make the name unique
.... don't need the random generator | #include <iostream>
#include <set>
-#include <random>
#include "config.h"
#include "pocl.h"
@@ -87,15 +86,17 @@ find_called_functions(llvm::Function *F,
Callee->setCallingConv(llvm::CallingConv::C);
CI->setCallingConv(llvm::CallingConv::C);
}
+ if (!Callee->hasName())
+ Callee->setName("__anonymous_internal_func__");
+ const char* Name = Callee->getName().data();
DB_PRINT("search: %s calls %s\n",
- F->getName().data(), Callee->getName().data());
+ F->getName().data(), Name);
if (FNameSet.count(Callee->getName()) > 0)
continue;
else {
- DB_PRINT("inserting %s\n", Callee->getName().data());
+ DB_PRINT("inserting %s\n", Name);
FNameSet.insert(Callee->getName());
- DB_PRINT("search: recursing into %s\n",
- Callee->getName().data());
+ DB_PRINT("search: recursing into %s\n", Name);
find_called_functions(Callee, FNameSet);
}
}
@@ -300,9 +301,6 @@ int link(llvm::Module *Program, const llvm::Module *Lib, std::string &log,
assert(Lib);
ValueToValueMapTy vvm;
llvm::StringSet<> DeclaredFunctions;
- std::random_device RandomDevice;
- std::mt19937 Mersenne{RandomDevice()};
- std::uniform_int_distribution<unsigned long> UniDist{(1UL<<30), (1UL<<31)};
#ifndef LLVM_OLDER_THAN_10_0
// LLVM 9 misses some of the APIs needed by this function. We don't support
@@ -330,11 +328,9 @@ int link(llvm::Module *Program, const llvm::Module *Lib, std::string &log,
// anonymous functions have no name, which breaks the algorithm later
// when it searches for undefined functions in the kernel library.
- // assign a randomized name here
- std::string temp = std::to_string(UniDist(Mersenne));
+ // assign a name here, this should be made unique by setName()
if (!fi->hasName()) {
- fi->setName(Twine("__anonymous_internal_func__",
- StringRef(temp)));
+ fi->setName("__anonymous_internal_func__");
}
DB_PRINT("Function '%s' is defined\n", fi->getName().data());
// Find all functions the program source calls
|
Preliminary support for MetalANGLE for Xamarin iOS | @@ -95,10 +95,25 @@ def buildIOSFatLib(args, archs):
baseDir = getBaseDir()
buildDir = getBuildDir('xamarin_ios_unified')
- return execute('lipo', baseDir,
+ libFilePaths = []
+ for platform, arch in platformArchs:
+ libFilePath = "%s/%s-%s/libcarto_mobile_sdk.%s" % (getBuildDir('xamarin_ios', '%s-%s' % (platform, arch)), args.configuration, 'iphoneos' if arch.startswith("arm") else 'iphonesimulator', 'a')
+ if args.metalangle:
+ mergedLibFilePath = '%s_merged.%s' % tuple(libFilePath.rsplit('.', 1))
+ angleLibFilePath = "%s/libs-external/angle-metal/%s/libangle.a" % (baseDir, arch)
+ if not execute('libtool', baseDir,
+ '-o', mergedLibFilePath, libFilePath, angleLibFilePath
+ ):
+ return False
+ libFilePath = mergedLibFilePath
+ libFilePaths.append(libFilePath)
+
+ if not execute('lipo', baseDir,
'-output', '%s/libcarto_mobile_sdk.a' % buildDir,
- '-create', *["%s/%s-%s/libcarto_mobile_sdk.a" % (getBuildDir('xamarin_ios', '%s-%s' % (platform, arch)), args.configuration, 'iphoneos' if arch.startswith("arm") else "iphonesimulator") for platform, arch in platformArchs]
- )
+ '-create', *libFilePaths
+ ):
+ return False
+ return True
def buildXamarinDLL(args, target):
baseDir = getBaseDir()
@@ -164,6 +179,7 @@ parser.add_argument('--configuration', dest='configuration', default='Release',
parser.add_argument('--build-number', dest='buildnumber', default='', help='Build sequence number, goes to version str')
parser.add_argument('--build-version', dest='buildversion', default='%s-devel' % SDK_VERSION, help='Build version, goes to distributions')
parser.add_argument('--build-nuget', dest='buildnuget', default=False, action='store_true', help='Build Nuget package')
+parser.add_argument('--metalangle', dest='metalangle', default=False, action='store_true', help='Use MetalANGLE instead of Apple GL')
parser.add_argument(dest='target', choices=['android', 'ios'], help='Target platform')
args = parser.parse_args()
@@ -183,7 +199,9 @@ if args.androidndkpath == 'auto' and args.target == 'android':
if args.androidndkpath is None:
args.androidndkpath = os.path.join(args.androidsdkpath, 'ndk-bundle')
args.defines += ';' + getProfile(args.profile).get('defines', '')
-args.defines += ';TARGET_XAMARIN'
+args.defines += ';' + 'TARGET_XAMARIN'
+if args.metalangle and args.target == 'ios':
+ args.defines += ';' + '_CARTO_USE_METALANGLE'
args.cmakeoptions += ';' + getProfile(args.profile).get('cmake-options', '')
args.nativeconfiguration = args.configuration
|
fix: small regression that causes memory leak | @@ -66,11 +66,9 @@ discord_modify_current_user(struct discord *client,
/* @todo this is a temporary solution for wrapping with JS */
static void
-sized_buffer_from_json(char *json, size_t len, void *pp)
+sized_buffer_from_json(char *json, size_t len, void *data)
{
- if (!*(struct sized_buffer **)pp)
- *(struct sized_buffer **)pp = calloc(1, sizeof(struct sized_buffer));
- struct sized_buffer *p = *(struct sized_buffer **)pp;
+ struct sized_buffer *p = data;
p->size = asprintf(&p->start, "%.*s", (int)len, json);
}
|
docs/library/machine.I2C.rst: Clarify availability of primitive I2C ops. | @@ -79,18 +79,16 @@ The following methods implement the primitive I2C master bus operations and can
be combined to make any I2C transaction. They are provided if you need more
control over the bus, otherwise the standard methods (see below) can be used.
+These methods are available on software I2C only.
+
.. method:: I2C.start()
Generate a START condition on the bus (SDA transitions to low while SCL is high).
- Availability: ESP8266.
-
.. method:: I2C.stop()
Generate a STOP condition on the bus (SDA transitions to high while SCL is high).
- Availability: ESP8266.
-
.. method:: I2C.readinto(buf, nack=True)
Reads bytes from the bus and stores them into *buf*. The number of bytes
@@ -99,16 +97,12 @@ control over the bus, otherwise the standard methods (see below) can be used.
is true then a NACK will be sent, otherwise an ACK will be sent (and in this
case the slave assumes more bytes are going to be read in a later call).
- Availability: ESP8266.
-
.. method:: I2C.write(buf)
Write the bytes from *buf* to the bus. Checks that an ACK is received
after each byte and stops transmitting the remaining bytes if a NACK is
received. The function returns the number of ACKs that were received.
- Availability: ESP8266.
-
Standard bus operations
-----------------------
|
Makefile.am: don't install resources
Those resources are converted to C and embedded into the final binary
during the build. There is no point in also installing them to
$(PREFIX)/share/doc/goaccess/ | bin_PROGRAMS = goaccess
AUTOMAKE_OPTIONS = subdir-objects
-dist_html_DATA = \
+dist_noinst_DATA = \
resources/tpls.html \
resources/css/app.css \
resources/css/bootstrap.min.css \
|
fix MLNDevTool podspec | @@ -29,7 +29,7 @@ Pod::Spec.new do |s|
# s.social_media_url = 'https://twitter.com/<TWITTER_USERNAME>'
s.ios.deployment_target = '8.0'
- s.libraries = 'z'
+ s.libraries = 'z', 'c++'
s.requires_arc = true
s.public_header_files = 'MLN-iOS/MLNDevTool/Classes/*.h'
s.dependency 'ArgoUI'
|
sasuke : enable pull-down of GPIOB4,GPIOB5
Enable pull-down of GPIOB4 & GPIOB5
BRANCH=None
TEST=make -j BOARD=sasuke | @@ -41,8 +41,8 @@ GPIO(EC_I2C_EEPROM_SCL, PIN(B, 3), GPIO_INPUT)
GPIO(EC_I2C_EEPROM_SDA, PIN(B, 2), GPIO_INPUT)
GPIO(EC_I2C_BATTERY_SCL, PIN(3, 3), GPIO_INPUT)
GPIO(EC_I2C_BATTERY_SDA, PIN(3, 6), GPIO_INPUT)
-GPIO(EC_I2C_SENSOR_SCL, PIN(B, 5), GPIO_INPUT)
-GPIO(EC_I2C_SENSOR_SDA, PIN(B, 4), GPIO_INPUT)
+GPIO(EC_I2C_SENSOR_SCL, PIN(B, 5), GPIO_INPUT | GPIO_PULL_DOWN)
+GPIO(EC_I2C_SENSOR_SDA, PIN(B, 4), GPIO_INPUT | GPIO_PULL_DOWN)
GPIO(EC_I2C_USB_C0_SCL, PIN(9, 0), GPIO_INPUT)
GPIO(EC_I2C_USB_C0_SDA, PIN(8, 7), GPIO_INPUT)
GPIO(EC_I2C_SUB_C1_SCL_HDMI_EN_ODL, PIN(9, 2), GPIO_INPUT) /* C1 I2C SCL OR HDMI en */
|
vere: Wrap tank dump priority escape codes with terminal check | @@ -2038,11 +2038,20 @@ u3_pier_tank(c3_l tab_l, c3_w pri_w, u3_noun tac)
fil_u = stderr;
}
+ if ( c3n == u3_Host.ops_u.tem ) {
switch ( pri_w ) {
case 3: fprintf(fil_u, "\033[31m>>> "); break;
case 2: fprintf(fil_u, "\033[33m>> "); break;
case 1: fprintf(fil_u, "\033[32m> "); break;
}
+ }
+ else {
+ switch ( pri_w ) {
+ case 3: fprintf(fil_u, ">>> "); break;
+ case 2: fprintf(fil_u, ">> "); break;
+ case 1: fprintf(fil_u, "> "); break;
+ }
+ }
// if we have no arvo kernel and can't evaluate nock
// only print %leaf tanks
@@ -2062,7 +2071,10 @@ u3_pier_tank(c3_l tab_l, c3_w pri_w, u3_noun tac)
_pier_wall(fil_u, wol);
}
+ if ( c3n == u3_Host.ops_u.tem ) {
fprintf(fil_u, "\033[0m");
+ }
+
u3_term_io_loja(0);
u3z(blu);
u3z(tac);
|
Add documentation for vectorize_fn3 | @@ -160,9 +160,17 @@ def _vectorize_fn2(fn, fn_vec, cosmo, x, z, returns_status=True):
return f
def _vectorize_fn3(fn, fn_vec, cosmo, x, n, returns_status=True):
- """
- Generic wrapper to allow vectorized (1D array) access to CCL functions with
- one vector argument and one integer argument.
+ """Generic wrapper to allow vectorized (1D array) access to CCL functions with
+ one vector argument and one integer argument, with a cosmology dependence.
+
+ Args:
+ fn (callable): Function with a single argument.
+ fn_vec (callable): Function that has a vectorized implementation in a .i file.
+ cosmo (ccl_cosmology or Cosmology): The input cosmology which gets converted to a ccl_cosmology.
+ x (float or array_like): Argument to fn.
+ n (int): Integer argument to fn.
+ returns_stats (bool): Indicates whether fn returns a status.
+
"""
# Access ccl_cosmology object
cosmo = _cosmology_obj(cosmo)
|
options/ansi: Properly handle the base argument in strtoumax and strtoimax | @@ -20,19 +20,29 @@ imaxdiv_t imaxdiv(intmax_t, intmax_t) {
template <class T> T strtoxmax(const char *it, char **out, int base) {
T v = 0;
bool negate = false;
-
- // TODO: In this case we have to detect the base based on the prefix.
- __ensure(base);
+ const unsigned char *s = (const unsigned char *)it;
+ int c;
if(std::is_signed<T>::value) {
- if(*it == '+') {
- it++;
- }else if(*it == '-') {
+ if(*s == '+') {
+ s++;
+ }else if(*s == '-') {
negate = true;
- it++;
+ s++;
}
}
+ do {
+ c = *s++;
+ } while (isspace(c));
+ if ((base == 0 || base == 16) && c == '0' && (*s == 'x' || *s == 'X')) {
+ c = s[1];
+ s += 2;
+ base = 16;
+ }
+ if (base == 0)
+ base = c == '0' ? 8 : 10;
+
if(base == 8) {
if(*it != 0)
goto parse_digits;
|
apps/graphics/traveler/tools: Fix linkage issue. The -lm should come after -o binname | @@ -114,7 +114,7 @@ endif
# mktrig - Regenerate trigonometry look-up tables
mktrig$(HOSTEXEEXT): $(MKTRIG_OBJS)
- $(Q) $(HOSTCC) $(HOSTCFLAGS) -lm $< -o $@
+ $(Q) $(HOSTCC) $(HOSTCFLAGS) $< -o $@ -lm
ifdef HOSTEXEEXT
mktrig: mktrig$(HOSTEXEEXT)
|
Turn off clobbered warning for longjmp for UT'S | @@ -65,6 +65,11 @@ function(ADD_CMOCKA_TEST _TARGET_NAME)
add_executable(${_TARGET_NAME} ${_add_cmocka_test_SOURCES})
+ # Suppress clobber warning for longjmp
+ if(CMAKE_C_COMPILER_ID MATCHES "GNU")
+ target_compile_options(${_TARGET_NAME} PRIVATE -Wno-clobbered)
+ endif()
+
if (DEFINED _add_cmocka_test_COMPILE_OPTIONS)
target_compile_options(${_TARGET_NAME}
PRIVATE ${_add_cmocka_test_COMPILE_OPTIONS}
|
VCL: add event registration to listen session in select() | @@ -460,7 +460,7 @@ vce_connect_request_handler_fn (void *arg)
}
/**
- * @brief vce_epoll_wait_connect_request_handler_fn
+ * @brief vce_poll_wait_connect_request_handler_fn
* - used by vppcom_epoll_xxxx() for listener sessions
* - when a vl_api_accept_session_t_handler() generates an event
* this callback is alerted and sets the fields that vppcom_epoll_wait()
@@ -469,7 +469,7 @@ vce_connect_request_handler_fn (void *arg)
* @param arg - void* to be cast to vce_event_handler_reg_t*
*/
void
-vce_epoll_wait_connect_request_handler_fn (void *arg)
+vce_poll_wait_connect_request_handler_fn (void *arg)
{
vce_event_handler_reg_t *reg = (vce_event_handler_reg_t *) arg;
vce_event_t *ev;
@@ -3462,7 +3462,29 @@ vppcom_select (unsigned long n_bits, unsigned long *read_map,
bits_set = VPPCOM_EBADFD;
goto select_done;
}
+ if (session->state & STATE_LISTEN)
+ {
+ vce_event_handler_reg_t *reg = 0;
+ vce_event_key_t evk;
+ /* Check if handler already registered for this
+ * event.
+ * If not, register handler for connect_request event
+ * on listen_session_index
+ */
+ evk.session_index = session_index;
+ evk.eid = VCL_EVENT_CONNECT_REQ_ACCEPTED;
+ reg = vce_get_event_handler (&vcm->event_thread, &evk);
+ if (!reg)
+ reg = vce_register_handler (&vcm->event_thread, &evk,
+ vce_poll_wait_connect_request_handler_fn);
+ rv = vppcom_session_read_ready (session, session_index);
+ if (rv > 0)
+ {
+ vce_unregister_handler (&vcm->event_thread, reg);
+ }
+ }
+ else
rv = vppcom_session_read_ready (session, session_index);
clib_spinlock_unlock (&vcm->sessions_lockp);
if (except_map && vcm->ex_bitmap &&
@@ -3774,7 +3796,7 @@ vppcom_epoll_ctl (uint32_t vep_idx, int op, uint32_t session_index,
evk.eid = VCL_EVENT_CONNECT_REQ_ACCEPTED;
vep_session->poll_reg =
vce_register_handler (&vcm->event_thread, &evk,
- vce_epoll_wait_connect_request_handler_fn);
+ vce_poll_wait_connect_request_handler_fn);
}
if (VPPCOM_DEBUG > 1)
clib_warning ("VCL<%d>: EPOLL_CTL_ADD: vep_idx %u, "
|
sdl/surface: implement Set() for RGB444 | @@ -531,6 +531,8 @@ func (surface *Surface) ColorModel() color.Model {
return color.RGBAModel
case PIXELFORMAT_RGB888:
return color.RGBAModel
+ case PIXELFORMAT_RGB444:
+ return RGB444Model
default:
panic("Not implemented yet")
}
@@ -589,6 +591,13 @@ func (surface *Surface) Set(x, y int, c color.Color) {
pix[i+2] = col.R
pix[i+1] = col.G
pix[i+0] = col.B
+ case PIXELFORMAT_RGB444:
+ col := surface.ColorModel().Convert(c).(color.RGBA)
+ buf := (*uint32)(unsafe.Pointer(&pix[i]))
+ r := uint32(col.R) >> 4 & 0x0F
+ g := uint32(col.G) >> 4 & 0x0F
+ b := uint32(col.B) >> 4 & 0x0F
+ *buf = r << 8 | g << 4 | b
default:
panic("Unknown pixel format!")
}
|
[finsh] Fix formatting issues | @@ -145,18 +145,17 @@ void finsh_set_prompt_mode(rt_uint32_t prompt_mode)
int finsh_getchar(void)
{
#ifdef RT_USING_DEVICE
+ char ch = 0;
#ifdef RT_USING_POSIX
- int c;
- if(read(STDIN_FILENO,&c,1)>0)
+ if(read(STDIN_FILENO, &ch, 1) > 0)
{
- return c;
+ return ch;
}
else
{
return -1; /* EOF */
}
#else
- char ch = 0;
rt_device_t device;
RT_ASSERT(shell != RT_NULL);
|
Comment change: exclude error() role handler from coverage | @@ -1292,6 +1292,26 @@ declClose(PROLOG_STATE *state,
return common(state, tok);
}
+/* This function will only be invoked if the internal logic of the
+ * parser has broken down. It is used in two cases:
+ *
+ * 1: When the XML prolog has been finished. At this point the
+ * processor (the parser level above these role handlers) should
+ * switch from prologProcessor to contentProcessor and reinitialise
+ * the handler function.
+ *
+ * 2: When an error has been detected (via common() below). At this
+ * point again the processor should be switched to errorProcessor,
+ * which will never call a handler.
+ *
+ * The result of this is that error() can only be called if the
+ * processor switch failed to happen, which is an internal error and
+ * therefore we shouldn't be able to provoke it simply by using the
+ * library. It is a necessary backstop, however, so we merely exclude
+ * it from the coverage statistics.
+ *
+ * LCOV_EXCL_START
+ */
static int PTRCALL
error(PROLOG_STATE *UNUSED_P(state),
int UNUSED_P(tok),
@@ -1301,6 +1321,7 @@ error(PROLOG_STATE *UNUSED_P(state),
{
return XML_ROLE_NONE;
}
+/* LCOV_EXCL_STOP */
static int FASTCALL
common(PROLOG_STATE *state, int tok)
|
Correct error message where dimm id was getting labeled as socket. | @@ -6266,6 +6266,7 @@ SetObjStatusForDimmWithErase(
EraseObjStatus(pCommandStatus, pDimm->DeviceHandle.AsUint32, DimmUid, MAX_DIMM_UID_LENGTH);
}
+ pCommandStatus->ObjectType = ObjectTypeDimm;
SetObjStatus(pCommandStatus, pDimm->DeviceHandle.AsUint32, DimmUid, MAX_DIMM_UID_LENGTH, Status);
}
|
Suicide prevention with corrupt Lockfile | @@ -1356,7 +1356,7 @@ u3_unix_acquire(c3_c* pax_c)
kill(getpid(), SIGTERM);
sleep(1); c3_assert(0);
}
- else {
+ else if (pid_w != getpid()) {
c3_w i_w;
if ( -1 != kill(pid_w, SIGTERM) ) {
|
testbench - Enable split setup. | @@ -25,6 +25,7 @@ pkg.homepage: "http://mynewt.apache.org/"
pkg.keywords:
pkg.deps:
+ - "@apache-mynewt-core/boot/split_app"
- "@apache-mynewt-core/encoding/json/test"
- "@apache-mynewt-core/kernel/os"
- "@apache-mynewt-core/kernel/os/test"
@@ -32,7 +33,7 @@ pkg.deps:
- "@apache-mynewt-core/mgmt/newtmgr"
- "@apache-mynewt-core/mgmt/newtmgr/transport/nmgr_shell"
- "@apache-mynewt-core/sys/config"
- - "@apache-mynewt-core/sys/console/stub"
+ - "@apache-mynewt-core/sys/console/full"
- "@apache-mynewt-core/sys/flash_map"
- "@apache-mynewt-core/sys/flash_map/test"
- "@apache-mynewt-core/sys/id"
|
slist: fix position check when splitting a string | @@ -95,7 +95,7 @@ int flb_slist_split_string(struct mk_list *list, const char *str,
if (end < 0) {
end = len - i;
}
- else if (end == i) {
+ else if ((end + i) == i) {
i++;
continue;
}
@@ -103,7 +103,7 @@ int flb_slist_split_string(struct mk_list *list, const char *str,
p_init = (char *) str + i;
p_end = p_init + end - 1;
- /* Remove empty spaces */
+ /* Skip empty spaces */
while (*p_init == ' ') {
p_init++;
}
@@ -123,7 +123,7 @@ int flb_slist_split_string(struct mk_list *list, const char *str,
val_len = 1;
}
else {
- val_len = p_end - p_init + 1;
+ val_len = (p_end - p_init) + 1;
}
if (val_len == 0) {
|
FIX: Do not decrease refcount after allocating an element. | @@ -3920,7 +3920,6 @@ static ENGINE_ERROR_CODE do_btree_elem_update(btree_meta_info *info,
}
do_btree_elem_replace(info, &posi, new_elem);
- do_btree_elem_release(new_elem);
}
return ENGINE_SUCCESS;
@@ -4728,8 +4727,8 @@ static ENGINE_ERROR_CODE do_btree_elem_arithmetic(btree_meta_info *info,
if (ret != ENGINE_SUCCESS) {
assert(ret != ENGINE_ELEM_EEXISTS);
/* ENGINE_ENOMEM || ENGINE_BKEYOOR || ENGINE_OVERFLOW */
+ do_btree_elem_free(elem);
}
- do_btree_elem_release(elem);
*result = initial;
} else {
real_nbkey = BTREE_REAL_NBKEY(elem->nbkey);
@@ -4767,7 +4766,6 @@ static ENGINE_ERROR_CODE do_btree_elem_arithmetic(btree_meta_info *info,
memcpy(new_elem->data + real_nbkey + new_elem->neflag, nbuf, nlen);
do_btree_elem_replace(info, &posi, new_elem);
- do_btree_elem_release(new_elem);
}
ret = ENGINE_SUCCESS;
*result = value;
@@ -9206,7 +9204,6 @@ static ENGINE_ERROR_CODE do_map_elem_update(map_meta_info *info,
/* replace the element */
do_map_elem_replace(info, &pinfo, new_elem);
- do_map_elem_release(new_elem);
}
return ENGINE_SUCCESS;
|
Fix failing test
Add a bit more slack to tests to account for natural variance. | @@ -53,7 +53,16 @@ def profile(*unused):
profile_lines = profile_output.decode().split('\n')
profile_tuples = [line.split(' ') for line in profile_lines if line]
profile_map = {func: int(count) for count, _, func in profile_tuples}
- test_harness.assert_greater(profile_map['loop10000'], profile_map['loop5000'] * 1.9)
- test_harness.assert_greater(profile_map['loop20000'], profile_map['loop10000'] * 1.9)
+
+ # These tests don't end up being exactly 2x the number of samples. Because
+ # the system samples randomly, it can vary. I could have ran the test longer
+ # to get more samples, but this is really just a smoke test and I didn't want
+ # to bloat the test time unnecessarily.
+ loop5k = profile_map['loop5000']
+ loop10k = profile_map['loop10000']
+ loop20k = profile_map['loop20000']
+ test_harness.assert_greater(loop5k, 0)
+ test_harness.assert_greater(loop10k, loop5k * 1.75)
+ test_harness.assert_greater(loop20k, loop10k * 1.75)
test_harness.execute_tests()
|
Use the client app traffic secret for PHA Finished message
The TLSv1.3 spec requires us to use the client application traffic secret
during generation of the Finished message following a post handshake
authentication.
Fixes | @@ -247,12 +247,23 @@ size_t tls13_final_finish_mac(SSL *s, const char *str, size_t slen,
goto err;
}
- if (str == s->method->ssl3_enc->server_finished_label)
+ if (str == s->method->ssl3_enc->server_finished_label) {
key = EVP_PKEY_new_raw_private_key(EVP_PKEY_HMAC, NULL,
s->server_finished_secret, hashlen);
- else
+ } else if (SSL_IS_FIRST_HANDSHAKE(s)) {
key = EVP_PKEY_new_raw_private_key(EVP_PKEY_HMAC, NULL,
s->client_finished_secret, hashlen);
+ } else {
+ unsigned char finsecret[EVP_MAX_MD_SIZE];
+
+ if (!tls13_derive_finishedkey(s, ssl_handshake_md(s),
+ s->client_app_traffic_secret,
+ finsecret, hashlen))
+ goto err;
+
+ key = EVP_PKEY_new_raw_private_key(EVP_PKEY_HMAC, NULL, finsecret,
+ hashlen);
+ }
if (key == NULL
|| ctx == NULL
|
YAML Smith: Use shorter code for initialization | @@ -54,8 +54,8 @@ extern "C" {
/** @see elektraDocGet */
int elektraYamlsmithGet (Plugin * handle ELEKTRA_UNUSED, KeySet * returned, Key * parentKey)
{
- auto parent = CppKey{ parentKey };
- auto keys = CppKeySet{ returned };
+ CppKey parent{ parentKey };
+ CppKeySet keys{ returned };
if (parent.getName () == "system/elektra/modules/yamlsmith")
{
|
board/jinlon/board.h: Format with clang-format
BRANCH=none
TEST=none | @@ -147,12 +147,7 @@ enum sensor_id {
SENSOR_COUNT,
};
-enum pwm_channel {
- PWM_CH_KBLIGHT,
- PWM_CH_FAN,
- PWM_CH_FAN2,
- PWM_CH_COUNT
-};
+enum pwm_channel { PWM_CH_KBLIGHT, PWM_CH_FAN, PWM_CH_FAN2, PWM_CH_COUNT };
enum fan_channel {
FAN_CH_0 = 0,
|
[DPOS] change all type fields of consensus info to string | @@ -10,6 +10,7 @@ import (
"errors"
"fmt"
"math"
+ "strconv"
"sync"
"github.com/aergoio/aergo-lib/log"
@@ -125,10 +126,10 @@ func (c *Cluster) BPs() []string {
bps := make([]string, c.Size())
for i, bp := range c.member {
p := &struct {
- Index int
+ Index string
BP string
}{
- Index: int(i),
+ Index: strconv.FormatUint(uint64(i), 10),
BP: bp.id.Pretty(),
}
|
OcTimerLib: Fix wrong method used on MMIO address | @@ -89,7 +89,7 @@ RecalculateTSC (
AsmCpuid (CPUID_SIGNATURE, NULL, &CpuVendor, NULL, NULL);
if (CpuVendor == CPUID_VENDOR_AMD) {
- TimerAddr = IoRead32 (
+ TimerAddr = MmioRead32 (
R_AMD_ACPI_MMIO_BASE + R_AMD_ACPI_MMIO_PMIO_BASE + R_AMD_ACPI_PM_TMR_BLOCK
);
}
|
out_s3: store: detect Travis environment, if so, use fstore memory backend | #include "s3.h"
#include "s3_store.h"
+static int s3_store_under_travis_ci()
+{
+
+ if (getenv("CI") != NULL && getenv("TRAVIS") != NULL) {
+ return FLB_TRUE;
+ }
+
+ return FLB_FALSE;
+}
+
/*
* Simple and fast hashing algorithm to create keys in the local buffer
*/
@@ -216,14 +226,23 @@ static int set_files_context(struct flb_s3 *ctx)
/* Initialize filesystem storage for S3 plugin */
int s3_store_init(struct flb_s3 *ctx)
{
+ int type;
time_t now;
char tmp[64];
struct tm *tm;
struct flb_fstore *fs;
struct flb_fstore_stream *fs_stream;
+ if (s3_store_under_travis_ci() == FLB_TRUE) {
+ type = FLB_FSTORE_MEM;
+ flb_plg_warn(ctx->ins, "Travis CI test, using s3 store memory backend");
+ }
+ else {
+ type = FLB_FSTORE_FS;
+ }
+
/* Initialize the storage context */
- fs = flb_fstore_create(ctx->buffer_dir);
+ fs = flb_fstore_create(ctx->buffer_dir, type);
if (!fs) {
return -1;
}
|
OcAppleDiskImageLib: Fix potential OOB read. | @@ -53,7 +53,7 @@ OcAppleDiskImageInitializeContext (
// Look for trailer signature.
//
BufferBytes = (UINT8*)Buffer;
- BufferBytesCurrent = BufferBytes + BufferLength - sizeof (UINT32);
+ BufferBytesCurrent = BufferBytes + BufferLength - sizeof (APPLE_DISK_IMAGE_TRAILER);
BufferTrailer = NULL;
while (BufferBytesCurrent >= BufferBytes) {
// Check for trailer signature.
@@ -287,8 +287,7 @@ OcAppleDiskImageRead(
);
if (OutSize != ChunkTotalLength) {
FreePool (ChunkData);
- Status = EFI_DEVICE_ERROR;
- goto DONE;
+ return EFI_DEVICE_ERROR;
}
// Copy to destination buffer.
|
Fix code style of power.h
softtab to hardtab
missing semicolon | @@ -21,7 +21,8 @@ enum{
SCE_POWER_CB_RESUMING = 0x00020000,
/*indicates the unit has finish resuming from suspend mode*/
SCE_POWER_CB_RESUME_COMPLETE = 0x00040000
-}
+};
+
/* Callbacks */
/** Callback function prototype */
|
set cookie header for client | @@ -289,6 +289,16 @@ int http_set_cookie(http_s *h, http_cookie_args_s cookie) {
}
} else
cookie.max_age = -1;
+
+ if (http_settings(h) && http_settings(h)->is_client) {
+ if (!cookie.value) {
+ fiobj_free(c);
+ return -1;
+ }
+ set_header_add(h->private_data.out_headers, HTTP_HEADER_COOKIE, c);
+ return 0;
+ }
+
t.data[len++] = ';';
t.data[len++] = ' ';
|
fix file clash!!! | @@ -45,7 +45,7 @@ dosio_term(void)
FILEH file_open(const OEMCHAR *path) {
#if defined(__LIBRETRO__)
- return(filestream_open(path, RETRO_VFS_FILE_ACCESS_READ_WRITE, RETRO_VFS_FILE_ACCESS_HINT_NONE));
+ return(filestream_open(path, RETRO_VFS_FILE_ACCESS_READ_WRITE | RETRO_VFS_FILE_ACCESS_UPDATE_EXISTING, RETRO_VFS_FILE_ACCESS_HINT_NONE));
#elif defined(_WINDOWS) && defined(OSLANG_UTF8)
wchar_t wpath[MAX_PATH];
MultiByteToWideChar(
|
ci: fix esp_phy_modem_deinit issue | @@ -737,7 +737,7 @@ esp_err_t esp_bt_controller_init(esp_bt_controller_config_t *cfg)
return ESP_OK;
free_phy:
esp_phy_disable();
- esp_phy_pd_mem_deinit();
+ esp_phy_modem_deinit();
#if CONFIG_BT_NIMBLE_ENABLED
ble_npl_eventq_deinit(nimble_port_get_dflt_eventq());
#endif // CONFIG_BT_NIMBLE_ENABLED
|
Fix a bunch of compilation warning regarding end of file | // The purpose of this file is to check that all headers compile
int main(int argc, char **argv) {
+ (void)argc;
+ (void)argv;
clap_version_t m = CLAP_VERSION;
return !clap_version_is_compatible(m);
}
|
fix profile location | @@ -16,7 +16,7 @@ if ! command -v texlua > /dev/null; then
cd install-tl-20*
# Install a minimal system
- ./install-tl --profile=../texlive/texlive.profile
+ ./install-tl --profile=./texlive/texlive.profile
cd ..
fi
|
[CUDA] Remove calls to LLVM initialization functions
This *should* be handled by pocl core before we get to the PTX
backend. | @@ -78,10 +78,6 @@ int pocl_ptx_gen(const char *bc_filename, const char *ptx_filename,
return 1;
}
- llvm::InitializeAllTargets();
- llvm::InitializeAllTargetMCs();
- llvm::InitializeAllAsmPrinters();
-
// Apply transforms to prepare for lowering to PTX
pocl_cuda_fix_printf(module->get());
pocl_gen_local_mem_args(module->get(), kernel_name);
|
Examples: Python script to check BUFR Table B (formatting, isort, flake8 etc) | from __future__ import print_function
-import getopt
import os
import sys
-import traceback
+
import numpy as np
MIN_NUM_COLUMNS = 8
@@ -49,13 +48,11 @@ def verify_table(table, filename):
linenum = 1 + i
numcols = len(a_row)
if numcols < MIN_NUM_COLUMNS:
- print(f"{a_row}")
print(f"Error in line {linenum}: Column count (={numcols}) < required miniumum (={MIN_NUM_COLUMNS})")
return 1
a_code = a_row[0]
a_key = a_row[1]
a_type = a_row[2]
- a_unit = a_row[4]
a_scale = a_row[5]
a_ref = a_row[6]
a_width = a_row[7]
@@ -63,12 +60,8 @@ def verify_table(table, filename):
print(f"Error in line {linenum}: Code '{a_code}' (column 1) is not numeric")
return 1
if len(a_code) != LEN_DESCRIPTOR:
- print(
- f"Error in line {linenum}: Code '{a_code}' (column 1) should be {LEN_DESCRIPTOR} digits long"
- )
- print(
- f"\tAll descriptors have a F-X-Y structure: 1 digit for F, 2 for X and 3 for Y"
- )
+ print(f"Error in line {linenum}: Code '{a_code}' (column 1) should be {LEN_DESCRIPTOR} digits long")
+ print("\tAll descriptor codes (FXY) must have 1 digit for F, 2 for X and 3 for Y")
return 1
if not a_key:
print(f"Error in line {linenum}: Key '{a_key}' (column 2) is not valid")
@@ -77,19 +70,13 @@ def verify_table(table, filename):
print(f"\tPlease choose from: {ALLOWED_TYPES}")
return 1
if not isNumeric(a_scale):
- print(
- f"Error in line {linenum}: Scale '{a_scale}' (column 6) is not numeric"
- )
+ print(f"Error in line {linenum}: Scale '{a_scale}' (column 6) is not numeric")
return 1
if not isNumeric(a_ref):
- print(
- f"Error in line {linenum}: Reference '{a_ref}' (column 7) is not numeric"
- )
+ print(f"Error in line {linenum}: Reference '{a_ref}' (column 7) is not numeric")
return 1
if not isNumeric(a_width):
- print(
- f"Error in line {linenum}: Width '{a_width}' (column 8) is not numeric"
- )
+ print(f"Error in line {linenum}: Width '{a_width}' (column 8) is not numeric")
return 1
print("All OK")
@@ -117,7 +104,7 @@ def main():
assert False, "Invalid option. Specify -B or -D"
filename = sys.argv[2]
- print(f"Processing {filename}")
+ print(f"Processing {filename}: Table{table}")
status = verify_table(table, filename)
return status
|
NetKVM: add DmaRemappingCompatible to INF
Indicate that the driver is fully compatible with DMA remapping. | @@ -209,6 +209,7 @@ ErrorControl = 1 ;%SERVICE_ERROR_NORMAL%
ServiceBinary = %12%\netkvm.sys
LoadOrderGroup = NDIS
AddReg = TextModeFlags.Reg
+AddReg = DmaRemappingCompatible.Reg
[kvmnet6.EventLog]
AddReg = kvmnet6.AddEventLog.Reg
@@ -222,6 +223,9 @@ HKR,,TextModeFlags,0x00010001, 0x0001
HKR,Parameters,DisableMSI,,"0"
HKR,Parameters,EarlyDebug,,"3"
+[DmaRemappingCompatible.Reg]
+HKR,Parameters,DmaRemappingCompatible,0x00010001,1
+
[SourceDisksNames]
1 = %DiskId1%,,,""
|
tcmu: bump version to 1.3.0-rc1
Bump version to 1.3.0-rc1. | cmake_minimum_required (VERSION 2.8 FATAL_ERROR)
project (tcmu-runner C)
-set(VERSION 1.2.0)
+set(VERSION 1.3.0-rc1)
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall -Wdeclaration-after-statement -std=c99")
include(GNUInstallDirs)
|
Pointed Zone installation instructions to GH repo. | @@ -221,35 +221,7 @@ family pcks for your target device need to be installed on your computer.
The CMSIS-Zone utility is part of the <a href="https://github.com/ARM-software/cmsis-pack-eclipse/releases/latest" target="_blank"><b>CMSIS-Pack Eclipse Plug-ins</b></a>.
-The following steps explain the setup of an Eclipse enviornment with CMSIS-Zone:
-
- 1. Download and install Java SE version 13.0.2 or later on your machine. You can use one of the following installers:
- - Oracle SE JDK (note the license terms for commercial usage)
- - OpenJDK
- .
- Make sure that the path to the \\bin folder in the Java installation is added to the \c PATH environment variable.
-
- 2. <a href="https://github.com/ARM-software/cmsis-pack-eclipse/releases/latest" target="_blank"><b>Download</b></a> the latest <b>CmsisPackPlugIn#.#.#.zip</b> file, for example CmsisPackPlugIn2.5.0.zip
-
- 3. Get <a href="https://www.eclipse.org/downloads/" target="_blank"><b>Eclipse IDE (Download 64 bit)</b></a> and install <b>Eclipse IDE for C/C++ Developers</b>
-
-<b>Launch Eclipse</b> and
- - Open the dialog <b>Help - Install New Software...</b>.
- - Choose \b Add and click \b Archive. The \b Open the file <b>CmsisPackPlugIn#.#.#.zip</b> and click \b Add.
- - In the dialog <b>Available Software</b> select the <b>CMSIS Eclipse plug-ins</b> as shown below. The click \b Next and accept the license agreement.
-
- \image html InstallPlugIns.png
-
- - \b Restart Eclipse.
-
-Setup <b>CMSIS Pack root folder</b> in Eclipse
- - Open the dialog <b>Window - Preferences</b> and select directory for the <b>CMSIS Packs</b> repository on your computer:
-
- \image html CMSISPacksPreferences.png
-
- The standard setting is \c C:\\users\\username\\AppData\\Local\\Arm\\Packs, but you may use the same directory as for MDK and select: \c C:\\Keil_v5\\MDK\\ARM\\PACK.
-
- - Click <b>Apply and Close</b>. This concludes the setup of the Eclipse environment.
+Follow the instructions on the release page to install the tool.
*/
|
Examples shouldn't leak memory... | @@ -40,6 +40,7 @@ static void handle_websocket_messages(ws_s *ws, char *data, size_t size,
if (data[0] == 'b') {
FIOBJ msg = fiobj_str_new(data, size);
pubsub_publish(.channel = CHANNEL_BINARY, .message = msg);
+ fiobj_free(msg);
// fwrite(".", 1, 1, stderr);
data[0] = 'r';
websocket_write(ws, data, size, 0);
@@ -47,6 +48,7 @@ static void handle_websocket_messages(ws_s *ws, char *data, size_t size,
// fwrite(".", 1, 1, stderr);
FIOBJ msg = fiobj_str_new(data, size);
pubsub_publish(.channel = CHANNEL_TEXT, .message = msg);
+ fiobj_free(msg);
/* send result */
size = size + (25 - 19);
void *buff = malloc(size);
|
netutils/thttpd: fix compile break
change NSOCKET_DESCRIPTORS to NFILE_DESCRIPTORS | @@ -696,7 +696,7 @@ int thttpd_main(int argc, char **argv)
* socket descriptors
*/
- fw = fdwatch_initialize(CONFIG_NSOCKET_DESCRIPTORS);
+ fw = fdwatch_initialize(CONFIG_NFILE_DESCRIPTORS);
if (!fw)
{
nerr("ERROR: fdwatch initialization failure\n");
|
minor change due to change in rescomp | BITMAP sgdk_logo "image/sgdk_logo.png" -1
-TILESET font_default "image/font_default.png" -1
+TILESET font_default "image/font_default.png" BEST NONE
PALETTE font_pal_default "image/font_default.png"
BIN stop_xgm "sound/stop_xgm.bin" 2 2 0 NONE FALSE
|
hw/phys-map: Add missing newline in log output
The call to prlog() here is missing a \n. | @@ -184,7 +184,7 @@ void phys_map_get(uint64_t gcid, enum phys_map_type type,
error:
/* Something has gone really wrong */
- prlog(PR_EMERG, "ERROR: Failed to lookup BAR type:%i index:%i",
+ prlog(PR_EMERG, "ERROR: Failed to lookup BAR type:%i index:%i\n",
type, index);
assert(0);
}
|
Update comment.c
might fix | @@ -277,10 +277,12 @@ static void comment_erase(t_comment *x){
}
static void comment_redraw(t_comment *x){ // <= improve, not necessary for all cases
+ if(glist_isvisible(x->x_glist) && gobj_shouldvis((t_gobj *)x, x->x_glist)){
comment_erase(x);
comment_draw(x);
comment_update(x); // ???????
}
+}
static void comment_grabbedkey(void *z, t_floatarg f){
z = NULL, f = 0; // LATER think about replacing #key binding to float method with "grabbing"
|
Update INSTALL.md - Fix broken links
Fix broken links for Amazon installation. | - [Gentoo](#gentoo---portage)
- [openSUSE](#opensuse---binary)
- [RHEL](#rhel---binary)
- - [Amazon Linux 1](#Amazon-Linux-1---Binary)
- - [Amazon Linux 2](#Amazon-Linux-2---Binary)
+ - [Amazon Linux 1](#amazon-linux-1---binary)
+ - [Amazon Linux 2](#amazon-linux-2---binary)
- [Alpine](#alpine---binary)
* [Source](#source)
- [Debian](#debian---source)
- [Fedora](#fedora---source)
- [openSUSE](#opensuse---source)
- [Centos](#centos---source)
- - [Amazon Linux](#amazon-linux---source)
+ - [Amazon Linux 1](#amazon-linux-1---source)
+ - [Amazon Linux 2](#amazon-linux-2---source)
- [Alpine](#alpine---source)
- [Arch](#arch---source)
* [Older Instructions](#older-instructions)
|
Address Use ldconfig alternative on macos.
update_dyld_shared_cache seems to work on macos. | @@ -41,10 +41,14 @@ CFLAGS=-std=c99 -Wall -Wextra -Isrc/include -Isrc/conf -fpic -O2 -fvisibility=hi
-DJANET_BUILD=$(JANET_BUILD)
LDFLAGS=-rdynamic
+# For installation
+LDCONFIG:=ldconfig
+
# Check OS
UNAME:=$(shell uname -s)
ifeq ($(UNAME), Darwin)
CLIBS:=$(CLIBS) -ldl
+ LDCONFIG:=update_dyld_shared_cache
else ifeq ($(UNAME), Linux)
CLIBS:=$(CLIBS) -lrt -ldl
endif
@@ -307,7 +311,7 @@ install: $(JANET_TARGET) build/janet.pc
cp jpm.1 '$(MANPATH)'
mkdir -p '$(PKG_CONFIG_PATH)'
cp build/janet.pc '$(PKG_CONFIG_PATH)/janet.pc'
- -ldconfig $(LIBDIR)
+ -$(LDCONFIG) $(LIBDIR)
uninstall:
-rm '$(BINDIR)/janet'
|
dojo: add command to lookup doccords
syntax: `# foo` to look up foo. this is not the final form - it does not
support `# foo:bar` yet. the dprint library needs some changes first. | :: :: ::
/? 309 :: arvo kelvin
/- *sole, lens :: console structures
-/+ sole, pprint, ::
+/+ sole, pprint, dprint, ::
auto=language-server-complete, ::
easy-print=language-server-easy-print ::
:: :: ::
r=@t
==
[%poke p=goal] :: poke app
+ [%help p=term] :: doccords
[%show p=?(%0 %1 %2 %3 %4 %5)] :: val/type/hoon/xray
[%verb p=term] :: store variable
== ::
(parse-variable (cold %lib lus) ;~(pfix gap parse-cables))
==
==
+ ::
+ ;~ pfix hax
+ ;~ pose
+ ;~ pfix ace
+ %+ cook
+ |= a=term
+ [[%help a] 0 %ex [%cnts p=~[[%.y p=1]] q=~]]
+ sym :: should be (most col sym) once i switch to (list term)
+ ==
+ (easy [[%help %$] 0 %ex [%cnts p=~[[%.y p=1]] q=~]])
+ ==
+ ==
::
;~((glue ace) parse-sink parse-source)
(stag [%show %0] parse-source)
++ maar ?: =(%noun p.cay) ~
[[%rose [~ " " ~] >p.cay< ~] ~]
--
+ ::
+ %help
+ (dy-inspect p.p.mad p.q.cay)
==
::
++ dy-show |=(cay=cage (dy-print cay ~))
:- i=""
t=(turn `wain`?~(r.hit ~ (to-wain:format q.u.r.hit)) trip)
==
+ ::
+ ++ dy-inspect
+ |= [topic=term sut=type]
+ %+ dy-rash %tan
+ =+ to-display=(find-item-in-type:dprint topic sut)
+ ?~ to-display
+ [%leaf "Could not find help"]~
+ (print-item:dprint u.to-display)
+ ::
++ dy-show-type-noun
|= a=type ^- tank
=- >[-]<
|
Test: Fix minor spelling mistake in CMake code | # Elektra Test Suite
#
# This file is responsible for generating all tests
-# regarding elektra's core.
+# regarding Elektra's core.
#
# Backends and Bindings specific tests might be in
# their folders.
|
Date: Disable plugin if GCC version is too old | include (LibAddMacros)
+if (DEPENDENCY_PHASE)
+ # The plugin does not work correctly if we compile it with GCC 4.7
+ if (CMAKE_CXX_COMPILER_ID MATCHES "GNU" AND CMAKE_CXX_COMPILER_VERSION VERSION_LESS 4.8)
+ remove_plugin (date "gcc version too old (gcc -dumpversion < 4.8)")
+ endif (CMAKE_CXX_COMPILER_ID MATCHES "GNU" AND CMAKE_CXX_COMPILER_VERSION VERSION_LESS 4.8)
+endif (DEPENDENCY_PHASE)
+
add_plugin (date
SOURCES
date.h
|
io-libs/adios: newer adios version looks to require libcurl now | @@ -30,7 +30,7 @@ Source0: http://users.nccs.gov/~pnorbert/adios-%{version}.tar.gz
Source1: OHPC_macros
AutoReq: no
-BuildRequires: zlib-devel glib2-devel
+BuildRequires: zlib-devel glib2-devel libcurl
Requires: zlib
# libm.a from CMakeLists
|
Fix sign issue; | @@ -890,7 +890,7 @@ static void lovrGpuBindShader(Shader* shader) {
}
}
-static void lovrGpuSetViewports(float* viewport, int count) {
+static void lovrGpuSetViewports(float* viewport, uint32_t count) {
if (state.viewportCount != count || memcmp(state.viewports, viewport, count * 4 * sizeof(float))) {
memcpy(state.viewports, viewport, count * 4 * sizeof(float));
state.viewportCount = count;
@@ -1056,23 +1056,23 @@ void lovrGpuDiscard(Canvas* canvas, bool color, bool depth, bool stencil) {
}
void lovrGpuDraw(DrawCommand* draw) {
- int viewCount = 1 + draw->stereo;
- int drawCount = state.features.singlepass ? 1 : viewCount;
- int viewsPerDraw = state.features.singlepass ? viewCount : 1;
- int instances = MAX(draw->instances, 1) * viewsPerDraw;
+ uint32_t viewCount = 1 + draw->stereo;
+ uint32_t drawCount = state.features.singlepass ? 1 : viewCount;
+ uint32_t viewsPerDraw = state.features.singlepass ? viewCount : 1;
+ uint32_t instances = MAX(draw->instances, 1) * viewsPerDraw;
float w = draw->width / (float) viewCount;
float h = draw->height;
float viewports[2][4] = { { 0, 0, w, h }, { w, 0, w, h } };
- lovrShaderSetInts(draw->shader, "lovrViewportCount", &viewCount, 0, 1);
+ lovrShaderSetInts(draw->shader, "lovrViewportCount", &(int) { viewCount }, 0, 1);
lovrGpuBindCanvas(draw->canvas, true);
lovrGpuBindPipeline(&draw->pipeline);
lovrGpuBindMesh(draw->mesh, draw->shader, viewsPerDraw);
- for (int i = 0; i < drawCount; i++) {
+ for (uint32_t i = 0; i < drawCount; i++) {
lovrGpuSetViewports(&viewports[i][0], viewsPerDraw);
- lovrShaderSetInts(draw->shader, "lovrViewportIndex", &i, 0, 1);
+ lovrShaderSetInts(draw->shader, "lovrViewportIndex", &(int) { i }, 0, 1);
lovrGpuBindShader(draw->shader);
Mesh* mesh = draw->mesh;
|
doc/man7/provider.pod: updates providers to use EVP_MD_free() and EVP_CIPHER_free()
instead of EVP_MD_meth_free() and EVP_CIPHER_meth_free() respectively which are used mostly by the engine (legacy) code. | @@ -324,34 +324,34 @@ Fetch any available implementation of SHA2-256 in the default context:
EVP_MD *md = EVP_MD_fetch(NULL, "SHA2-256", NULL);
...
- EVP_MD_meth_free(md);
+ EVP_MD_free(md);
Fetch any available implementation of AES-128-CBC in the default context:
EVP_CIPHER *cipher = EVP_CIPHER_fetch(NULL, "AES-128-CBC", NULL);
...
- EVP_CIPHER_meth_free(cipher);
+ EVP_CIPHER_free(cipher);
Fetch an implementation of SHA2-256 from the default provider in the default
context:
EVP_MD *md = EVP_MD_fetch(NULL, "SHA2-256", "provider=default");
...
- EVP_MD_meth_free(md);
+ EVP_MD_free(md);
Fetch an implementation of SHA2-256 that is not from the default provider in the
default context:
EVP_MD *md = EVP_MD_fetch(NULL, "SHA2-256", "provider!=default");
...
- EVP_MD_meth_free(md);
+ EVP_MD_free(md);
Fetch an implementation of SHA2-256 from the default provider in the specified
context:
EVP_MD *md = EVP_MD_fetch(ctx, "SHA2-256", "provider=default");
...
- EVP_MD_meth_free(md);
+ EVP_MD_free(md);
Load the legacy provider into the default context and then fetch an
implementation of WHIRLPOOL from it:
@@ -361,7 +361,7 @@ implementation of WHIRLPOOL from it:
EVP_MD *md = EVP_MD_fetch(NULL, "WHIRLPOOL", "provider=legacy");
...
- EVP_MD_meth_free(md);
+ EVP_MD_free(md);
Note that in the above example the property string "provider=legacy" is optional
since, assuming no other providers have been loaded, the only implementation of
@@ -376,8 +376,8 @@ other providers:
EVP_MD *md_whirlpool = EVP_MD_fetch(NULL, "whirlpool", NULL);
EVP_MD *md_sha256 = EVP_MD_fetch(NULL, "SHA2-256", NULL);
...
- EVP_MD_meth_free(md_whirlpool);
- EVP_MD_meth_free(md_sha256);
+ EVP_MD_free(md_whirlpool);
+ EVP_MD_free(md_sha256);
=head1 SEE ALSO
|
edit diff BUGFIX accept nested delete operations | @@ -2083,12 +2083,11 @@ sr_diff_merge_create(struct lyd_node *diff_match, enum edit_op cur_op, int cur_o
} else {
/* but the operation of its children should remain DELETE */
LY_TREE_FOR(sr_lyd_child(diff_match, 1), child) {
- /* there should not be any operation on the children */
- assert(!sr_edit_find_oper(child, 0, NULL));
-
- if ((err_info = sr_edit_set_oper(child, "delete"))) {
+ if (!sr_edit_find_oper(child, 0, NULL) && (err_info = sr_edit_set_oper(child, "delete"))) {
return err_info;
}
+ /* if there was any operation, it must have been delete */
+ assert(sr_edit_find_oper(child, 0, NULL) == EDIT_DELETE);
}
}
break;
|
update readme for 1.7.2/2.0.2 | @@ -12,8 +12,8 @@ is a general purpose allocator with excellent [performance](#performance) charac
Initially developed by Daan Leijen for the run-time systems of the
[Koka](https://koka-lang.github.io) and [Lean](https://github.com/leanprover/lean) languages.
-Latest release tag: `v2.0.1` (beta, 2021-04-06).
-Latest stable tag: `v1.7.1` (2021-04-06).
+Latest release tag: `v2.0.2` (beta, 2021-06-17).
+Latest stable tag: `v1.7.2` (2021-06-17).
mimalloc is a drop-in replacement for `malloc` and can be used in other programs
without code changes, for example, on dynamically linked ELF-based systems (Linux, BSD, etc.) you can use it as:
@@ -73,7 +73,10 @@ Enjoy!
### Releases
-* 2021-04-06, `v1.7.1`, `v2.0.1` (beta): fix bug in arena allocation for huge pages, improved aslr on large allocations, improved M1 support (still experimental).
+* 2021-06-17, `v1.7.2`, `v2.0.2` (beta): support M1, better installation layout on Linux, fix
+ thread_id on Android, prefer 2-6TiB area for aligned allocation to work better on pre-window 8, various small fixes.
+
+* 2021-04-06, `v1.7.1`, `v2.0.1` (beta): fix bug in arena allocation for huge pages, improved aslr on large allocations, initial M1 support (still experimental).
* 2021-01-31, `v2.0.0`: beta release 2.0: new algorithm for managing internal mimalloc pages that tends to use reduce memory usage
and fragmentation compared to mimalloc v1 (especially for large workloads). Should otherwise have similar performance
|
Fix Svace issue in iperf_util.c: use snprintf instead of sprintf
1. use snprintf instead of sprintf | @@ -85,7 +85,7 @@ void make_cookie(char *cookie)
/* Generate a string based on hostname, time, randomness, and filler. */
(void)gethostname(hostname, sizeof(hostname));
#else
- sprintf(hostname, "tinyara");
+ snprintf(hostname, sizeof(hostname), "tinyara");
#endif
(void)gettimeofday(&tv, 0);
(void)snprintf(temp, sizeof(temp), "%s.%ld.%06ld.%08lx%08lx.%s", hostname, (unsigned long int)tv.tv_sec, (unsigned long int)tv.tv_usec, (unsigned long int)rand(), (unsigned long int)rand(), "1234567890123456789012345678901234567890");
|
Encrypted Extensions: Change extensions length check | @@ -1432,7 +1432,7 @@ static int ssl_tls13_process_encrypted_extensions( mbedtls_ssl_context *ssl )
/* Process the message contents */
MBEDTLS_SSL_PROC_CHK(
- ssl_tls13_parse_encrypted_extensions( ssl, buf, ( buf + buf_len ) ) );
+ ssl_tls13_parse_encrypted_extensions( ssl, buf, buf + buf_len ) );
mbedtls_ssl_tls1_3_add_hs_msg_to_checksum(
ssl, MBEDTLS_SSL_HS_ENCRYPTED_EXTENSION, buf, buf_len );
@@ -1458,14 +1458,17 @@ static int ssl_tls13_parse_encrypted_extensions( mbedtls_ssl_context *ssl,
int ret = 0;
size_t extensions_len;
const unsigned char *p = buf;
+ const unsigned char *extensions_end;
MBEDTLS_SSL_CHK_BUF_READ_PTR( p, end, 2 );
extensions_len = MBEDTLS_GET_UINT16_BE( p, 0 );
p += 2;
MBEDTLS_SSL_DEBUG_BUF( 3, "encrypted extensions", p, extensions_len );
+ extensions_end = p + extensions_len;
+ MBEDTLS_SSL_CHK_BUF_READ_PTR( p, end, extensions_len );
- while( p < end )
+ while( p < extensions_end )
{
unsigned int extension_type;
size_t extension_data_len;
@@ -1476,12 +1479,12 @@ static int ssl_tls13_parse_encrypted_extensions( mbedtls_ssl_context *ssl,
* opaque extension_data<0..2^16-1>;
* } Extension;
*/
- MBEDTLS_SSL_CHK_BUF_READ_PTR( p, end, 4 );
+ MBEDTLS_SSL_CHK_BUF_READ_PTR( p, extensions_end, 4 );
extension_type = MBEDTLS_GET_UINT16_BE( p, 0 );
extension_data_len = MBEDTLS_GET_UINT16_BE( p, 2 );
p += 4;
- MBEDTLS_SSL_CHK_BUF_READ_PTR( p, end, extension_data_len );
+ MBEDTLS_SSL_CHK_BUF_READ_PTR( p, extensions_end, extension_data_len );
/* The client MUST check EncryptedExtensions for the
* presence of any forbidden extensions and if any are found MUST abort
@@ -1501,18 +1504,17 @@ static int ssl_tls13_parse_encrypted_extensions( mbedtls_ssl_context *ssl,
MBEDTLS_SSL_ALERT_MSG_UNSUPPORTED_EXT, \
MBEDTLS_ERR_SSL_UNSUPPORTED_EXTENSION );
return ( MBEDTLS_ERR_SSL_UNSUPPORTED_EXTENSION );
- break;
}
p += extension_data_len;
}
/* Check that we consumed all the message. */
- if( p != end )
+ if( p != extensions_end )
{
MBEDTLS_SSL_DEBUG_MSG( 1, ( "EncryptedExtension lengths misaligned" ) );
- MBEDTLS_SSL_PEND_FATAL_ALERT( MBEDTLS_SSL_ALERT_MSG_DECODE_ERROR, \
- MBEDTLS_ERR_SSL_DECODE_ERROR );
+ MBEDTLS_SSL_PEND_FATAL_ALERT( MBEDTLS_SSL_ALERT_MSG_ILLEGAL_PARAMETER, \
+ MBEDTLS_ERR_SSL_ILLEGAL_PARAMETER );
return( MBEDTLS_ERR_SSL_DECODE_ERROR );
}
|
Forced no inlining on memset / memcpy methods to fix wrong LTO removing | @@ -220,7 +220,7 @@ void MEM_dump();
*
* Sets the first num bytes of the block of memory pointed by to with the specified value.
*/
-void memset(void *to, u8 value, u16 len);
+void __attribute__ ((noinline, used)) memset(void *to, u8 value, u16 len);
#endif // ENABLE_NEWLIB
/**
@@ -267,7 +267,7 @@ void memsetU32(u32 *to, u32 value, u16 len);
* Copies the values of len long from the location pointed by from directly to the memory block pointed by to.
* The underlying type of the objects pointed by both the source and destination pointers are irrelevant for this function; The result is a binary copy of the data.
*/
-void memcpy(void *to, const void *from, u16 len);
+void __attribute__ ((noinline, used)) memcpy(void *to, const void *from, u16 len);
#endif // ENABLE_NEWLIB
/**
|
Update thread registers struct | @@ -879,7 +879,7 @@ SceUID ksceKernelGetProcessMainThread(SceUID pid);
int ksceKernelGetThreadIdList(SceUID pid, SceUID *ids, int n, int *copy_count);
/** Structure representing all ARM registers */
-typedef struct ArmCpuRegisters
+typedef struct SceArmCpuRegisters
{
uint32_t r0;
uint32_t r1;
@@ -898,18 +898,29 @@ typedef struct ArmCpuRegisters
uint32_t lr;
uint32_t pc;
uint32_t cpsr;
- uint32_t unk;
-} ArmCpuRegisters;
+ uint32_t fpscr;
+} SceArmCpuRegisters;
+
+/* Typedef for compatibility */
+typedef SceArmCpuRegisters ArmCpuRegisters;
/** Structure containing a threads register states. */
-typedef struct ThreadCpuRegisters
+typedef struct SceThreadCpuRegisters
{
+ union {
+ struct { // These are wrong. Please use "entry[2]"
/** Set of registers used for user mode. */
- ArmCpuRegisters user;
+ SceArmCpuRegisters user;
/** Set of registers used for kernel mode. */
- ArmCpuRegisters kernel;
-} ThreadCpuRegisters;
+ SceArmCpuRegisters kernel;
+ };
+ SceArmCpuRegisters entry[2];
+ };
+} SceThreadCpuRegisters;
+
+/* Typedef for compatibility */
+typedef SceThreadCpuRegisters ThreadCpuRegisters;
/**
* @brief Query the state of the registers for a suspended thread.
@@ -922,7 +933,7 @@ typedef struct ThreadCpuRegisters
* @param[out] registers The set of registers belonging to the thread.
* @return Zero on success, else < 0 on error.
*/
-int ksceKernelGetThreadCpuRegisters(SceUID thid, ThreadCpuRegisters *registers);
+int ksceKernelGetThreadCpuRegisters(SceUID thid, SceThreadCpuRegisters *registers);
/**
|
VERSION bump to version 1.4.135 | @@ -46,7 +46,7 @@ endif()
# micro version is changed with a set of small changes or bugfixes anywhere in the project.
set(SYSREPO_MAJOR_VERSION 1)
set(SYSREPO_MINOR_VERSION 4)
-set(SYSREPO_MICRO_VERSION 134)
+set(SYSREPO_MICRO_VERSION 135)
set(SYSREPO_VERSION ${SYSREPO_MAJOR_VERSION}.${SYSREPO_MINOR_VERSION}.${SYSREPO_MICRO_VERSION})
# Version of the library
|
plug alien queue space leak | ?. ?=([~ %known *] sndr-state)
%+ enqueue-alien-todo sndr.packet
|= todos=pending-requests
+ :: only enqueue one packet from an alien, to plug space leak
+ ::
+ ?. =(~ rcv-packets.todos)
+ todos
todos(rcv-packets [[lane packet] rcv-packets.todos])
:: decrypt packet contents using symmetric-key.channel
::
|
Added guards around allocator_overrides
Most of the features used in allocator_overrides are specific to glibc,
so build can fail on some other compilers and platforms. In particular
it was failing with XCode compiler on MacOS. | #include <dlfcn.h>
#include <string.h>
+
+/* Overrides will work only if RTLD_NEXT is defined */
+#ifdef RTLD_NEXT
+
+/* if we use glibc, include malloc.h for malloc_usable_size */
+#ifdef __GLIBC__
#include <malloc.h>
+#define HAVE_MALLOC_USABLE_SIZE
+#endif
typedef int (*posix_memalign_fn)(void **memptr, size_t alignment, size_t size);
typedef void *(*realloc_fn)(void *ptr, size_t size);
@@ -52,7 +60,6 @@ void *realloc(void *ptr, size_t size)
/* Override original realloc to fill allocated memory with some data to
* catch errors due to missing initialization */
void *p;
- size_t ptr_alloc_size;
if (orig_realloc == NULL) {
/* C99 forbids converting void * to function pointers, so direct
@@ -63,14 +70,31 @@ void *realloc(void *ptr, size_t size)
*(void **) &orig_realloc = dlsym(RTLD_NEXT, "realloc");
}
- ptr_alloc_size = malloc_usable_size(ptr);
p = orig_realloc(ptr, size);
+#ifdef HAVE_MALLOC_USABLE_SIZE
+ /* If malloc_usable_size is availible, we can get the size of previously
+ * allocated buffer, to find out how many new bytes we've allocated */
+ size_t ptr_alloc_size;
+ size_t p_alloc_size;
+
+ ptr_alloc_size = malloc_usable_size(ptr);
+ p_alloc_size = malloc_usable_size(p);
+
/* If call succeeded and we're enlarging memory, fill the extension with
- * some random data */
- if (p && size > ptr_alloc_size) {
- memset((char *) p + ptr_alloc_size, 0xff, size - ptr_alloc_size);
+ * non-zero data */
+ if (p && p_alloc_size > ptr_alloc_size) {
+ memset((char *) p + ptr_alloc_size, 0xff, p_alloc_size - ptr_alloc_size);
}
+#else
+ /* If we're allocating new buffer and the call succeeded, fill the buffer
+ * with non-zero data*/
+ if (p && !ptr) {
+ memset(p, 0xff, size);
+ }
+#endif
return p;
}
+
+#endif
|
BugID:19760206:allocate http request buffer space in app | @@ -348,10 +348,14 @@ static int32_t httpc_ota(const char *uri)
}
#define RSP_BUF_SIZE 2048
+#define REQ_BUF_SIZE 1024
uint8_t rsp_buf[RSP_BUF_SIZE];
+uint8_t req_buf[REQ_BUF_SIZE];
static void httpc_delayed_action(void *arg)
{
+#if CONFIG_HTTP_SECURE
char device_id[64];
+#endif
int fd;
int32_t ret = HTTPC_FAIL;
@@ -385,6 +389,8 @@ static void httpc_delayed_action(void *arg)
#endif
settings.rsp_buf = rsp_buf;
settings.rsp_buf_size = RSP_BUF_SIZE;
+ settings.req_buf = req_buf;
+ settings.req_buf_size = REQ_BUF_SIZE;
httpc_handle = httpc_init(&settings);
if (httpc_handle == 0) {
LOG("http session init fail\n");
|
Update regular expressions in gen-magic-strings.py
In their past form, they could not recognize preprocessor directives,
if they didn't start on column 0. Updated them to fix this problem.
JerryScript-DCO-1.0-Signed-off-by: Bela Toth | @@ -119,10 +119,10 @@ def extract_magic_string_refs(debug=False):
guard_stack = []
for line in fileinput.input(fname):
- if_match = re.match('^# *if(.*)', line)
- elif_match = re.match('^# *elif(.*)', line)
- else_match = re.match('^# *else', line)
- endif_match = re.match('^# *endif', line)
+ if_match = re.match('^ *# *if(.*)', line)
+ elif_match = re.match('^ *# *elif(.*)', line)
+ else_match = re.match('^ *# *else', line)
+ endif_match = re.match('^ *# *endif', line)
if if_match is not None:
guard_stack.append([process_guard(if_match.group(1))])
elif elif_match is not None:
|
vere: make uv_cancel return code check explicit | @@ -693,7 +693,7 @@ u3_disk_exit(u3_disk* log_u)
// shortcircuit cleanup if we cannot
//
if ( (c3y == log_u->ted_o)
- && uv_cancel(&log_u->req_u) )
+ && (0 > uv_cancel(&log_u->req_u)) )
{
// u3l_log("disk: unable to cleanup\r\n");
return;
|
Do not emit process start messages when we are not scoping a process. The thread is still started at this point. | @@ -1703,9 +1703,6 @@ init(void)
g_cfg.staticfg = g_staticfg;
g_cfg.blockconn = DEFAULT_PORTBLOCK;
- reportProcessStart(g_ctl, TRUE, CFG_WHICH_MAX);
- doProcStartMetric();
-
// replaces atexit(handleExit); Allows events to be reported before
// the TLS destructors are run. This mechanism is used regardless
// of whether TLS is actually configured on any transport.
@@ -1713,6 +1710,21 @@ init(void)
initHook(attachedFlag, scopedFlag);
+ /*
+ * If we are interposing (scoping) this process, then proceed
+ * with start messages. Else, we need the periodic thread to
+ * remain mute.
+ *
+ * We start the thread for now so that we can respond to
+ * dynamic and remote commands. This allows a re-attach
+ * command, for example, to be executed on a process that
+ * was previously not scoped.
+ */
+ if (g_cfg.funcs_attached == TRUE) {
+ reportProcessStart(g_ctl, TRUE, CFG_WHICH_MAX);
+ doProcStartMetric();
+ }
+
if (checkEnv("SCOPE_APP_TYPE", "go")) {
threadNow(0);
} else if (g_ismusl == FALSE) {
|
fix coverity warning in mactime plugin
Add missing VALIDATE_SW_IF_INDEX macro / check.
Net of this fix, a spurious warning will probably recur. Coverity will
complain that sw_if_index is tainted. Please dismiss the warning. | @@ -177,9 +177,11 @@ static void vl_api_mactime_enable_disable_t_handler
mactime_main_t *mm = &mactime_main;
int rv;
+ VALIDATE_SW_IF_INDEX (mp);
+
rv = mactime_enable_disable (mm, ntohl (mp->sw_if_index),
(int) (mp->enable_disable));
-
+ BAD_SW_IF_INDEX_LABEL;
REPLY_MACRO (VL_API_MACTIME_ENABLE_DISABLE_REPLY);
}
|
Add a few files to .gitignore
.traceconfig (WaveView trace settings)
Randomly generated test files in cosimulation directory
[ci skip] | statetrace.txt
a.out
output.png
+*.traceconfig
CLASSDIR
bin/
@@ -21,4 +22,6 @@ obj/
hardware/fpga/de2-115/db/
hardware/fpga/de2-115/incremental_db/
hardware/fpga/de2-115/output_files/
+tests/cosimulation/random*
+
|
Also use assertion when parsing decimal escape sequences. | @@ -128,7 +128,7 @@ function Lexer:read_short_string(delimiter)
then table.insert(parts, "\n")
elseif self:try(string_dec_number) then
- local n = tonumber(self.matched)
+ local n = assert(tonumber(self.matched, 10))
if n < 256 then
table.insert(parts, string.char(n))
else
|
A few test harness fixes
Fix render test to put intermediate files in work directory
Test failure count was reporting incorrect numbers. For the total test count,
it wasn't counting when a test was run on multiple targets. | @@ -215,7 +215,7 @@ def run_program(
or 'emulator'.
block_device: Relative path to a file that contains a filesystem image.
If passed, contents will appear as a virtual SDMMC device.
- dump_file: Relative path to a file to write memory contents into after
+ dump_file: Path to a file to write memory contents into after
execution completes.
dump_base: if dump_file is specified, base physical memory address to start
writing mempry from.
@@ -497,6 +497,8 @@ def execute_tests():
else:
tests_to_run = registered_tests
+ test_run_count = 0
+ test_pass_count = 0
failing_tests = []
for func, param, targets in tests_to_run:
for target in targets:
@@ -510,9 +512,11 @@ def execute_tests():
shutil.rmtree(path=WORK_DIR, ignore_errors=True)
os.makedirs(WORK_DIR)
+ test_run_count += 1
sys.stdout.flush()
func(param, target)
print(COLOR_GREEN + 'PASS' + COLOR_NONE)
+ test_pass_count += 1
except KeyboardInterrupt:
sys.exit(1)
except TestException as exc:
@@ -529,8 +533,8 @@ def execute_tests():
print(name)
print(output)
- print(str(len(failing_tests)) + '/' +
- str(len(tests_to_run)) + ' tests failed')
+ print('{}/{} tests failed'.format(test_run_count - test_pass_count,
+ test_run_count))
if failing_tests != []:
sys.exit(1)
@@ -719,6 +723,9 @@ def register_render_test(name, source_files, expected_hash, targets=None):
# This closure captures parameters source_files and
# expected_checksum.
def run_render_test(_, target):
+ RAW_FB_DUMP_FILE = WORK_DIR + '/fb.bin'
+ PNG_DUMP_FILE = WORK_DIR + '/actual-output.png'
+
render_cflags = [
'-I' + LIB_INCLUDE_BASE + 'librender',
LIB_DIR + 'librender/librender.a',
@@ -728,11 +735,11 @@ def register_render_test(name, source_files, expected_hash, targets=None):
build_program(source_files=source_files,
cflags=render_cflags)
run_program(target=target,
- dump_file='output.bin',
+ dump_file=RAW_FB_DUMP_FILE,
dump_base=0x200000,
dump_length=0x12c000,
flush_l2=True)
- with open('output.bin', 'rb') as f:
+ with open(RAW_FB_DUMP_FILE, 'rb') as f:
contents = f.read()
sha = hashlib.sha1()
@@ -740,8 +747,8 @@ def register_render_test(name, source_files, expected_hash, targets=None):
actual_hash = sha.hexdigest()
if actual_hash != expected_hash:
subprocess.check_output(['convert', '-depth', '8', '-size',
- '640x480', 'rgba:output.bin', 'actual-output.png'])
+ '640x480', 'rgba:' + RAW_FB_DUMP_FILE, PNG_DUMP_FILE])
raise TestException('render test failed, bad checksum ' + str(actual_hash)
- + ' output image written to actual-output.png')
+ + ' output image written to ' + PNG_DUMP_FILE)
register_tests(run_render_test, [name], targets)
|
build: Remove IMAGES_TO_BUILD var | @@ -97,12 +97,11 @@ stage("Init docker images") {
dockerInit()
}
-IMAGES_TO_BUILD = false
stage("Pull docker images") {
parallel generateDockerPullStages()
}
-maybeStage("Build docker images", IMAGES_TO_BUILD) {
+maybeStage("Build docker images", DOCKER_IMAGES.any {img -> !img.value.exists}) {
lock('docker-images') {
parallel generateDockerBuildStages()
}
@@ -217,7 +216,6 @@ def pullImageStage(image) {
} catch(e) {
echo "Detected changes"
image.exists = false
- IMAGES_TO_BUILD = true
}
}
}
|
Fix EPSG4326 internal coordinate conversion | @@ -24,7 +24,7 @@ namespace carto {
MapPos EPSG4326::fromInternal(const MapPos& mapPosInternal) const {
double x = mapPosInternal.getX() / UNITS_TO_INTERNAL * Const::RAD_TO_DEG;
- double y = 90.0 - Const::DEG_TO_RAD * (2.0 * std::atan(std::exp(-mapPosInternal.getY() / UNITS_TO_INTERNAL)));
+ double y = 90.0 - Const::RAD_TO_DEG * (2.0 * std::atan(std::exp(-mapPosInternal.getY() / UNITS_TO_INTERNAL)));
double z = mapPosInternal.getZ() / UNITS_TO_INTERNAL * EARTH_RADIUS;
return MapPos(x, y, z);
}
|
Missed updating version in a few spots
[ci skip] | @@ -30,8 +30,8 @@ ADD tmp/llvm-ar /usr/local/llvm-nyuzi/bin/
ADD tmp/llvm-ranlib /usr/local/llvm-nyuzi/bin/
ADD tmp/llvm-objdump /usr/local/llvm-nyuzi/bin/
ADD tmp/libclang_rt.builtins-nyuzi.a /usr/local/llvm-nyuzi/lib/clang/7.0.0/
-RUN ln -s /usr/local/llvm-nyuzi/bin/clang-5.0 /usr/local/llvm-nyuzi/bin/clang
-RUN ln -s /usr/local/llvm-nyuzi/bin/clang-5.0 /usr/local/llvm-nyuzi/bin/clang++
+RUN ln -s /usr/local/llvm-nyuzi/bin/clang-7.0 /usr/local/llvm-nyuzi/bin/clang
+RUN ln -s /usr/local/llvm-nyuzi/bin/clang-7.0 /usr/local/llvm-nyuzi/bin/clang++
RUN ln -s /usr/local/llvm-nyuzi/bin/lld /usr/local/llvm-nyuzi/bin/ld.lld
ADD tmp/share_verilator/ /usr/local/share/verilator/
ADD tmp/verilator* /usr/local/bin/
|
OcAfterBootCompatLib: Fix MSVC compiler moaning | /**
Kernel physical base address.
**/
-#define KERNEL_BASE_PADDR ((UINT32) KERNEL_HIB_VADDR)
+#define KERNEL_BASE_PADDR ((UINT32) (KERNEL_HIB_VADDR & MAX_UINT32))
/**
Kernel physical base address.
**/
-#define KERNEL_TEXT_PADDR ((UINT32) KERNEL_TEXT_VADDR)
+#define KERNEL_TEXT_PADDR ((UINT32) (KERNEL_TEXT_VADDR & MAX_UINT32))
/**
Slide offset per slide entry
|
[CUDA] Get maximum memory size from driver | @@ -156,10 +156,6 @@ pocl_cuda_init(cl_device_id device, const char* parameters)
device->double_fp_config = CL_FP_ROUND_TO_NEAREST | CL_FP_ROUND_TO_ZERO
| CL_FP_ROUND_TO_INF | CL_FP_FMA | CL_FP_INF_NAN | CL_FP_DENORM;
- // TODO: Actual maximum size
- device->max_mem_alloc_size = 1024*1024*1024;
- device->global_mem_size = 1024*1024*1024;
-
device->local_mem_type = CL_LOCAL;
device->host_unified_memory = 0;
@@ -180,6 +176,12 @@ pocl_cuda_init(cl_device_id device, const char* parameters)
result = cuCtxCreate(&data->context, CU_CTX_MAP_HOST, data->device);
CUDA_CHECK(result, "cuCtxCreate");
+ // Get global memory size
+ size_t memfree, memtotal;
+ result = cuMemGetInfo(&memfree, &memtotal);
+ device->max_mem_alloc_size = max(memtotal/4, 128*1024*1024);
+ device->global_mem_size = memtotal;
+
device->data = data;
}
|
todor: modify gpio for mb/db typec FRS_EN
Add FRS_EN default low for mb/db typec port.
BRANCH=master
TEST=Check system can power on with AC only. | @@ -89,6 +89,8 @@ GPIO(USB_C0_RT_RST_ODL, PIN(6, 1), GPIO_ODR_LOW) /* USB_C0 Reset */
GPIO(USB_C1_RT_RST_ODL, PIN(8, 3), GPIO_ODR_LOW) /* USB_C1 Reset */
GPIO(USB_C0_OC_ODL, PIN(B, 1), GPIO_ODR_HIGH)
GPIO(USB_C1_OC_ODL, PIN(5, 0), GPIO_ODR_HIGH)
+GPIO(USB_C0_FRS_EN, PIN(6, 0), GPIO_OUT_LOW)
+GPIO(USB_C1_FRS_EN, PIN(9, 4), GPIO_OUT_LOW)
/* Don't have a load switch for retimer */
UNIMPLEMENTED(USB_C0_LS_EN)
|
ci: add system group as codeowners to soc/ | /components/protocomm/ @esp-idf-codeowners/app-utilities
/components/pthread/ @esp-idf-codeowners/system
/components/sdmmc/ @esp-idf-codeowners/storage
-/components/soc/ @esp-idf-codeowners/peripherals
+/components/soc/ @esp-idf-codeowners/peripherals @esp-idf-codeowners/system
/components/spi_flash/ @esp-idf-codeowners/peripherals
/components/spiffs/ @esp-idf-codeowners/storage
/components/tcp_transport/ @esp-idf-codeowners/network
|
out_es: fix data type for json pack | @@ -352,7 +352,7 @@ static int elasticsearch_error_check(struct flb_http_client *c)
int check = FLB_TRUE;
char *out_buf;
size_t off = 0;
- int out_size;
+ size_t out_size;
msgpack_unpacked result;
msgpack_object root;
msgpack_object key;
|
Fixed wrong module resolution name in .line | @@ -167,6 +167,9 @@ class ResourceImporter(object):
# exists on the filesystem.
def get_source(self, fullname):
original_name = self._source_name.get(fullname) or fullname
+ if self.is_package(original_name):
+ original_name += '__init__'
+
relpath = self.get_filename(original_name)
if relpath:
abspath = resfs_resolve(relpath)
|
updated xdagpool IP addresses | 195.24.64.107:3356
77.55.222.85:3355
24.234.35.55:31334
-95.105.233.208:13655
+95.105.233.208:16775
120.79.95.7:12563
139.99.101.187:13655
62.210.130.205:13654
58.218.204.118:13655
39.104.88.224:13655
188.165.178.246:13654
-
+136.243.55.153:16775
|
Exclude unscoped tests which fails on Alpine distro | ],
"exclude_x86_64_tests": [],
"exclude_aarch64_tests": [],
- "exclude_musl_tests": [],
+ "Notes for exclude musl tests" : [
+ "the musl exclusions are tests that fail on musl unscoped",
+ "revisit these to see if we can fix them instead of excluding them"
+ ],
+ "exclude_musl_tests": [
+ "fstatfs02_64",
+ "fstatfs02",
+ "gethostbyname_r01",
+ "open13",
+ "statfs02_64",
+ "statfs02"
+ ],
"exclude_glibc_tests": []
},
{
|
Subsets and Splits
No saved queries yet
Save your SQL queries to embed, download, and access them later. Queries will appear here once saved.