message
stringlengths 6
474
| diff
stringlengths 8
5.22k
|
---|---|
Add common nonce checking to oneshot encrypt | @@ -136,6 +136,22 @@ static psa_status_t psa_aead_setup(
return( PSA_SUCCESS );
}
+/* Perform common nonce length checks */
+static psa_status_t mbedtls_aead_check_nonce_length(
+ mbedtls_psa_aead_operation_t *operation,
+ size_t nonce_length )
+{
+#if defined(MBEDTLS_PSA_BUILTIN_ALG_CHACHA20_POLY1305)
+ if( operation->alg == PSA_ALG_CHACHA20_POLY1305 )
+ {
+ if( nonce_length != 12 )
+ return( PSA_ERROR_NOT_SUPPORTED );
+ }
+#endif /* MBEDTLS_PSA_BUILTIN_ALG_CHACHA20_POLY1305 */
+
+ return PSA_SUCCESS;
+}
+
psa_status_t mbedtls_psa_aead_encrypt(
const psa_key_attributes_t *attributes,
const uint8_t *key_buffer, size_t key_buffer_size,
@@ -164,6 +180,13 @@ psa_status_t mbedtls_psa_aead_encrypt(
}
tag = ciphertext + plaintext_length;
+ if( mbedtls_aead_check_nonce_length( &operation, nonce_length )
+ != PSA_SUCCESS )
+ {
+ status = PSA_ERROR_NOT_SUPPORTED;
+ goto exit;
+ }
+
#if defined(MBEDTLS_PSA_BUILTIN_ALG_CCM)
if( operation.alg == PSA_ALG_CCM )
{
@@ -195,7 +218,7 @@ psa_status_t mbedtls_psa_aead_encrypt(
#if defined(MBEDTLS_PSA_BUILTIN_ALG_CHACHA20_POLY1305)
if( operation.alg == PSA_ALG_CHACHA20_POLY1305 )
{
- if( nonce_length != 12 || operation.tag_length != 16 )
+ if( operation.tag_length != 16 )
{
status = PSA_ERROR_NOT_SUPPORTED;
goto exit;
@@ -247,21 +270,6 @@ static psa_status_t psa_aead_unpadded_locate_tag( size_t tag_length,
return( PSA_SUCCESS );
}
-static psa_status_t mbedtls_aead_check_nonce_length(
- mbedtls_psa_aead_operation_t *operation,
- size_t nonce_length )
-{
-#if defined(MBEDTLS_PSA_BUILTIN_ALG_CHACHA20_POLY1305)
- if( operation->alg == PSA_ALG_CHACHA20_POLY1305 )
- {
- if( nonce_length != 12 )
- return( PSA_ERROR_NOT_SUPPORTED );
- }
-#endif /* MBEDTLS_PSA_BUILTIN_ALG_CHACHA20_POLY1305 */
-
- return PSA_SUCCESS;
-}
-
psa_status_t mbedtls_psa_aead_decrypt(
const psa_key_attributes_t *attributes,
const uint8_t *key_buffer, size_t key_buffer_size,
|
Keep family when using literals | @@ -877,14 +877,6 @@ neat_resolve(struct neat_resolver *resolver,
if (!request)
return RETVAL_FAILURE;
- is_literal = neat_resolver_helpers_check_for_literal(&(request->family),
- node);
-
- if (is_literal < 0) {
- free(request);
- return RETVAL_FAILURE;
- }
-
request->family = family;
request->dst_port = htons(port);
request->resolver = resolver;
@@ -893,6 +885,14 @@ neat_resolve(struct neat_resolver *resolver,
uv_timer_init(resolver->nc->loop, &(request->timeout_handle));
request->timeout_handle.data = request;
+ is_literal = neat_resolver_helpers_check_for_literal(&(request->family),
+ node);
+
+ if (is_literal < 0) {
+ free(request);
+ return RETVAL_FAILURE;
+ }
+
LIST_INIT(&(request->resolver_pairs));
//HACK: This is just a hack for testing, will be set based on argument later!
|
Add needed default. | q/dojo-build :: general build
== ::
++ dojo-build :: one arvo step
+ $~ [%ex *hoon]
$% {$ur p/(unit knot) q/purl:eyre} :: http GET request
{$ge p/dojo-model} :: generator
{$dv p/path} :: core from source
|
Clarify what variable-length signed integer is | @@ -81,9 +81,11 @@ const uint8_t *ngtcp2_get_uint16be(uint16_t *dest, const uint8_t *p);
const uint8_t *ngtcp2_get_uvarint(uint64_t *dest, const uint8_t *p);
/*
- * ngtcp2_get_varint reads variable-length signed integer from |p|,
- * and stores it in the buffer pointed by |dest| in host byte order.
- * It returns |p| plus the number of bytes read from |p|.
+ * ngtcp2_get_varint reads variable-length unsigned integer from |p|,
+ * and casts it to the signed integer, and stores it in the buffer
+ * pointed by |dest| in host byte order. No information should be
+ * lost in this cast, because the variable-length integer is 62
+ * bits. It returns |p| plus the number of bytes read from |p|.
*/
const uint8_t *ngtcp2_get_varint(int64_t *dest, const uint8_t *p);
|
Dummy --dir flag. Fix | @@ -258,6 +258,10 @@ int main (int i_argc, const char* i_argv[])
return 0;
} else if (!strcmp("--repl", arg)) {
argRepl = true;
+ } else if (!strcmp("--dir", arg)) {
+ const char* argDir;
+ ARGV_SET(argDir);
+ (void)argDir;
} else if (!strcmp("--func", arg) or !strcmp("-f", arg)) {
ARGV_SET(argFunc);
}
|
Fixed wrong cpu function name. | @@ -326,15 +326,15 @@ SceKernelIntrStatus ksceKernelRWSpinlockLowReadLockCpuSuspendIntr(SceKernelRWSpi
* @note Interrupts are only suspended if the acquisition of the spinlock succeeds
* @note It is forbidden to write to data protected by the spinlock after acquiring it with this function.
*/
-SceKernelIntrStatus ksceKernelRWSpinlockLowReadTryLockCpuSuspendIntr(SceKernelRWSpinlock* lock);
+SceKernelIntrStatus ksceKernelRWSpinlockLowTryReadLockCpuSuspendIntr(SceKernelRWSpinlock* lock);
/**
* @brief Release a RWSpinlock previously acquired for reading and resume interrupts if necessary.
*
* @param[in] lock RWSpinlock to release
- * @param[in] intr_status Status value obtained from ::ksceKernelRWSpinlockLowReadLockCpuSuspendIntr/::ksceKernelRWSpinlockLowReadTryLockCpuSuspendIntr.
+ * @param[in] intr_status Status value obtained from ::ksceKernelRWSpinlockLowReadLockCpuSuspendIntr/::ksceKernelRWSpinlockLowTryReadLockCpuSuspendIntr.
*
- * @note This function resumes interrupts only if they were enabled before the call to ::ksceKernelRWSpinlockLowReadLockCpuSuspendIntr/::ksceKernelRWSpinlockLowReadTryLockCpuSuspendIntr.
+ * @note This function resumes interrupts only if they were enabled before the call to ::ksceKernelRWSpinlockLowReadLockCpuSuspendIntr/::ksceKernelRWSpinlockLowTryReadLockCpuSuspendIntr.
*/
void ksceKernelRWSpinlockLowReadUnlockCpuResumeIntr(SceKernelRWSpinlock* lock, SceKernelIntrStatus intr_status);
|
ec: Sort configs in qcom test
No functional change, just sorting.
BRANCH=None
TEST=twister
Tested-by: Jeremy Bettis | # Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
+CONFIG_ASSERT=y
+CONFIG_TEST=y
CONFIG_ZTEST=y
CONFIG_ZTEST_ASSERT_VERBOSE=1
CONFIG_ZTEST_MOCKING=y
CONFIG_ZTEST_NEW_API=y
-CONFIG_TEST=y
-CONFIG_ASSERT=y
# Print logs from Zephyr LOG_MODULE to stdout
CONFIG_NATIVE_UART_0_ON_STDINOUT=y
-CONFIG_PLATFORM_EC=y
CONFIG_CROS_EC=y
-CONFIG_SHIMMED_TASKS=y
-CONFIG_LOG=y
CONFIG_EMUL=y
-CONFIG_GPIO=y
-CONFIG_GPIO_EMUL=y
CONFIG_EMUL_CROS_FLASH=y
CONFIG_FLASH=y
+CONFIG_GPIO=y
+CONFIG_GPIO_EMUL=y
+CONFIG_LOG=y
+CONFIG_PLATFORM_EC=y
+CONFIG_SERIAL=y
CONFIG_SHELL_BACKEND_DUMMY=y
CONFIG_SHELL_BACKEND_DUMMY_BUF_SIZE=2000
CONFIG_SHELL_BACKEND_SERIAL=n
-CONFIG_SERIAL=y
+CONFIG_SHIMMED_TASKS=y
# QCom power sequencing
-CONFIG_PLATFORM_EC_POWERSEQ=y
CONFIG_AP_ARM_QUALCOMM_SC7280=y
-CONFIG_PLATFORM_EC_POWERSEQ_SC7280=y
-CONFIG_PLATFORM_EC_POWERSEQ_HOST_SLEEP=y
+CONFIG_PLATFORM_EC_EXTPOWER=y
+CONFIG_PLATFORM_EC_EXTPOWER_GPIO=y
+CONFIG_PLATFORM_EC_HOSTCMD=y
CONFIG_PLATFORM_EC_LID_SWITCH=y
-CONFIG_PLATFORM_EC_SWITCHCAP_GPIO=y
+CONFIG_PLATFORM_EC_POWERSEQ=y
+CONFIG_PLATFORM_EC_POWERSEQ_HOST_SLEEP=y
+CONFIG_PLATFORM_EC_POWERSEQ_SC7280=y
CONFIG_PLATFORM_EC_POWER_BUTTON=y
-CONFIG_PLATFORM_EC_HOSTCMD=y
-CONFIG_PLATFORM_EC_EXTPOWER_GPIO=y
-CONFIG_PLATFORM_EC_EXTPOWER=y
+CONFIG_PLATFORM_EC_SWITCHCAP_GPIO=y
|
test: add platone test case test_002InitWallet_0011InitPlatoneWalletWithBiggerSize
fix the issue aitos-io#1176
teambition task id: | @@ -773,6 +773,36 @@ START_TEST(test_002InitWallet_0009InitPlatoneWalletWithNullConfig)
}
END_TEST
+START_TEST(test_002InitWallet_0010InitPlatoneWalletWithSmallerSize)
+{
+ BoatPlatoneWallet *rtnVal;
+ BoatPlatoneWalletConfig walletConfig = {0};
+
+ /* 1. execute unit test */
+ rtnVal = BoatPlatoneWalletInit(&walletConfig, sizeof(BoatPlatoneWalletConfig) - 1);
+ /* 2. verify test result */
+ /* 2-1. verify the return value */
+ ck_assert_ptr_eq(rtnVal,NULL);
+
+ /* 2-2. verify the global variables that be affected */
+}
+END_TEST
+
+START_TEST(test_002InitWallet_0011InitPlatoneWalletWithBiggerSize)
+{
+ BoatPlatoneWallet *rtnVal;
+ BoatPlatoneWalletConfig walletConfig = {0};
+
+ /* 1. execute unit test */
+ rtnVal = BoatPlatoneWalletInit(&walletConfig, sizeof(BoatPlatoneWalletConfig) + 1);
+ /* 2. verify test result */
+ /* 2-1. verify the return value */
+ ck_assert_ptr_eq(rtnVal,NULL);
+
+ /* 2-2. verify the global variables that be affected */
+}
+END_TEST
+
Suite *make_wallet_suite(void)
{
/* Create Suite */
@@ -812,6 +842,8 @@ Suite *make_wallet_suite(void)
tcase_add_test(tc_wallet_api, test_002InitWallet_0007SetNodeUrlFailureErrorNodeUrlFormat);
tcase_add_test(tc_wallet_api, test_002InitWallet_0008SetNodeUrlFailureNodeUrlOutOfLimit);
tcase_add_test(tc_wallet_api, test_002InitWallet_0009InitPlatoneWalletWithNullConfig);
+ tcase_add_test(tc_wallet_api, test_002InitWallet_0010InitPlatoneWalletWithSmallerSize);
+ tcase_add_test(tc_wallet_api, test_002InitWallet_0011InitPlatoneWalletWithBiggerSize);
return s_wallet;
}
|
Reuse existing button map for RC-EF-3.0 | "rcv14Map": {
"vendor": "Heiman",
"doc": "Smart controller HS1RC-M and HS1RC-E",
- "modelids": ["RC_V14", "RC-EM"],
+ "modelids": ["RC_V14", "RC-EM", "RC-EF-3.0"],
"map": [
[1, "0x01", "IAS_ACE", "ARM", "1", "S_BUTTON_1", "S_BUTTON_ACTION_SHORT_RELEASED", "Arm day/home zones only"],
[1, "0x01", "IAS_ACE", "ARM", "0", "S_BUTTON_2", "S_BUTTON_ACTION_SHORT_RELEASED", "Disarm"],
|
VERSION bump to version 0.9.21 | @@ -28,7 +28,7 @@ set(CMAKE_C_FLAGS_DEBUG "-g -O0")
# set version
set(LIBNETCONF2_MAJOR_VERSION 0)
set(LIBNETCONF2_MINOR_VERSION 9)
-set(LIBNETCONF2_MICRO_VERSION 20)
+set(LIBNETCONF2_MICRO_VERSION 21)
set(LIBNETCONF2_VERSION ${LIBNETCONF2_MAJOR_VERSION}.${LIBNETCONF2_MINOR_VERSION}.${LIBNETCONF2_MICRO_VERSION})
set(LIBNETCONF2_SOVERSION ${LIBNETCONF2_MAJOR_VERSION}.${LIBNETCONF2_MINOR_VERSION})
|
add link to libgloss-htif README | @@ -23,3 +23,5 @@ To build baremetal RISC-V programs to run in simulation, we use the riscv64-unkn
Hello, World!
For more examples, look at the `tests/ directory <https://github.com/ucb-bar/chipyard/tree/master/tests>`_ in the chipyard repository.
+
+For more information about the libgloss port, take a look at `its README <https://github.com/ucb-bar/libgloss-htif/blob/master/README.md>`_.
|
Added missing startup files for IAR to ARMCM23 and ARMCM33 devices in PDSC. | @@ -2017,7 +2017,8 @@ and 8-bit Java bytecodes in Jazelle state.
<file category="sourceAsm" name="Device/ARM/ARMCM23/Source/ARM/startup_ARMCM23.s" version="1.0.0" attr="config" condition="ARMCC"/>
<file category="sourceAsm" name="Device/ARM/ARMCM23/Source/GCC/startup_ARMCM23.S" version="1.0.0" attr="config" condition="GCC"/>
<file category="linkerScript" name="Device/ARM/ARMCM23/Source/GCC/gcc_arm.ld" version="1.0.0" attr="config" condition="GCC"/>
- <file category="sourceC" name="Device/ARM/ARMCM23/Source/system_ARMCM23.c" version="1.0.0" attr="config" condition="ARMCC GCC"/>
+ <file category="sourceAsm" name="Device/ARM/ARMCM23/Source/IAR/startup_ARMCM23.s" version="1.0.0" attr="config" condition="IAR"/>
+ <file category="sourceC" name="Device/ARM/ARMCM23/Source/system_ARMCM23.c" version="1.0.0" attr="config"/>
<!-- SAU configuration -->
<file category="header" name="Device/ARM/ARMCM23/Include/Template/partition_ARMCM23.h" version="1.0.0" attr="config" condition="ARMv8-M TZ Device"/>
</files>
@@ -2046,7 +2047,8 @@ and 8-bit Java bytecodes in Jazelle state.
<file category="sourceAsm" name="Device/ARM/ARMCM33/Source/ARM/startup_ARMCM33.s" version="1.0.0" attr="config" condition="ARMCC"/>
<file category="sourceAsm" name="Device/ARM/ARMCM33/Source/GCC/startup_ARMCM33.S" version="1.0.0" attr="config" condition="GCC"/>
<file category="linkerScript" name="Device/ARM/ARMCM33/Source/GCC/gcc_arm.ld" version="1.0.0" attr="config" condition="GCC"/>
- <file category="sourceC" name="Device/ARM/ARMCM33/Source/system_ARMCM33.c" version="1.0.0" attr="config" condition="ARMCC GCC"/>
+ <file category="sourceAsm" name="Device/ARM/ARMCM33/Source/IAR/startup_ARMCM33.s" version="1.0.0" attr="config" condition="IAR"/>
+ <file category="sourceC" name="Device/ARM/ARMCM33/Source/system_ARMCM33.c" version="1.0.0" attr="config"/>
<!-- SAU configuration -->
<file category="header" name="Device/ARM/ARMCM33/Include/Template/partition_ARMCM33.h" version="1.1.0" attr="config" condition="ARMv8-M TZ Device"/>
</files>
|
Trying alternate camera clamping | @@ -31,6 +31,7 @@ void MapRepositionCamera_b();
void MapHandleTrigger_b();
void MapUpdateEmotionBubble_b();
void MapUpdateActorMovement_b(UBYTE i);
+UBYTE clampUBYTE(UBYTE v, UBYTE min, UBYTE max);
////////////////////////////////////////////////////////////////////////////////
// Private vars
@@ -197,8 +198,39 @@ void SceneUpdate_b()
void MapRepositionCamera_b()
{
+ // UBYTE snap_left, snap_right, snap_top, snap_bottom, cam_x, cam_y;
+ UBYTE cam_x, cam_y;
+
+ // If camera is locked to player
if ((camera_settings & CAMERA_LOCK_FLAG) == CAMERA_LOCK_FLAG)
{
+ cam_x = clampUBYTE(actors[0].pos.x, SCREEN_WIDTH_HALF, (scene_width << 3) - SCREEN_WIDTH_HALF);
+ camera_dest.x = cam_x - SCREEN_WIDTH_HALF;
+
+ cam_y = clampUBYTE(actors[0].pos.y, SCREEN_HEIGHT_HALF, (scene_height << 3) - SCREEN_HEIGHT_HALF);
+ camera_dest.y = cam_y - SCREEN_HEIGHT_HALF;
+
+ // cam_x = actors[0].pos.x - SCREEN_WIDTH_HALF;
+ // cam_y = actors[0].pos.y - SCREEN_HEIGHT_HALF;
+ // snap_left = (scene_width << 3) - SCREEN_WIDTH_HALF;
+ // snap_right = snap_left - SCREEN_WIDTH_HALF;
+ // snap_top = (scene_height << 3) - SCREEN_HEIGHT_HALF;
+ // snap_bottom = snap_top - SCREEN_HEIGHT_HALF;
+ // camera_dest.x = cam_x > snap_left ? 0 : cam_x > snap_right ? snap_right : cam_x;
+ // camera_dest.y = cam_y > snap_top ? 0 : cam_y > snap_bottom ? snap_bottom : cam_y;
+
+ // cam_p = actors[0].pos.x - SCREEN_WIDTH_HALF;
+ // snap_a = (scene_width << 3) - SCREEN_WIDTH_HALF;
+ // snap_b = snap_a - SCREEN_WIDTH_HALF;
+ // camera_dest.x = cam_p > snap_a ? 0 : cam_p > snap_b ? snap_b : cam_p;
+
+ // cam_p = actors[0].pos.y - SCREEN_HEIGHT_HALF;
+ // snap_a = (scene_height << 3) - SCREEN_HEIGHT_HALF;
+ // snap_b = snap_a - SCREEN_HEIGHT_HALF;
+ // camera_dest.y = cam_p > snap_a ? 0 : cam_p > snap_b ? snap_b : cam_p;
+
+ /*
+ // Quickest version
if (actors[0].pos.x < SCREEN_WIDTH_HALF)
{
camera_dest.x = 0;
@@ -223,6 +255,7 @@ void MapRepositionCamera_b()
{
camera_dest.y = actors[0].pos.y - SCREEN_HEIGHT_HALF;
}
+ */
}
if ((camera_settings & CAMERA_TRANSITION_FLAG) == CAMERA_TRANSITION_FLAG)
@@ -784,4 +817,11 @@ void MapUpdateEmotionBubble_b()
}
}
+UBYTE clampUBYTE(UBYTE v, UBYTE min, UBYTE max)
+{
+ UBYTE t;
+ t = v < min ? min : v;
+ return t > max ? max : t;
+}
+
#pragma endregion
|
proc/msg: check if data pointer belongs to user's pmap before passing it directly | @@ -332,7 +332,7 @@ void *msg_map(int dir, kmsg_t *kmsg, void *data, size_t size, process_t *from, p
srcmap = (from == NULL) ? msg_common.kmap : from->mapp;
dstmap = (to == NULL) ? msg_common.kmap : to->mapp;
- if (srcmap == dstmap)
+ if (srcmap == dstmap && pmap_belongs(&dstmap->pmap, data))
return data;
if ((ml->w = w = vm_mapFind(dstmap, (void *)0, (!!boffs + !!eoffs + n) * SIZE_PAGE, MAP_NOINHERIT, prot)) == NULL)
|
android: travis changes to api 23 | @@ -62,8 +62,8 @@ android:
- extra-google-m2repository
- extra-android-m2repository
- build-tools-26.0.2
- - android-${RHO_ANDROID_LEVEL:-26}
- - addon-google_apis-google-${RHO_ANDROID_LEVEL:-26}
+ - android-${RHO_ANDROID_LEVEL:-19}
+ - addon-google_apis-google-${RHO_ANDROID_LEVEL:-19}
env:
global:
@@ -87,7 +87,7 @@ matrix:
- language: android
os: linux
- env: RHO_TARGET="android" RHO_APP="auto_common_spec" RHO_ANDROID_LEVEL="19"
+ env: RHO_TARGET="android" RHO_APP="auto_common_spec" RHO_ANDROID_LEVEL="23"
#- language: android
# os: linux
@@ -95,7 +95,7 @@ matrix:
- language: android
os: linux
- env: RHO_TARGET="android" RHO_APP="framework_spec" RHO_ANDROID_LEVEL="19"
+ env: RHO_TARGET="android" RHO_APP="framework_spec" RHO_ANDROID_LEVEL="23"
#- language: android
# os: linux
|
Sign txType byte | @@ -41,11 +41,14 @@ void handleSign(uint8_t p1,
tmpContent.txContent.dataPresent = false;
dataContext.tokenContext.pluginStatus = ETH_PLUGIN_RESULT_UNAVAILABLE;
+ initTx(&txContext, &global_sha3, &tmpContent.txContent, customProcessor, NULL);
+
// EIP 2718: TransactionType might be present before the TransactionPayload.
uint8_t txType = *workBuffer;
if (txType >= MIN_TX_TYPE && txType <= MAX_TX_TYPE) {
// Enumerate through all supported txTypes here...
if (txType == EIP2930 || txType == EIP1559) {
+ cx_hash((cx_hash_t *) &global_sha3, 0, workBuffer, 1, NULL, 0);
txContext.txType = txType;
workBuffer++;
dataLength--;
@@ -56,7 +59,6 @@ void handleSign(uint8_t p1,
} else {
txContext.txType = LEGACY;
}
- initTx(&txContext, &global_sha3, &tmpContent.txContent, customProcessor, NULL);
} else if (p1 != P1_MORE) {
THROW(0x6B00);
}
|
chat: pad sigil icon in input | @@ -186,6 +186,7 @@ export default class ChatInput extends Component<ChatInputProps, ChatInputState>
color={`#${color}`}
classes={sigilClass}
icon
+ padded
/>;
return (
|
BugID:16846667: fixed bug that kernel task's ustack member is inaccessible | @@ -412,6 +412,14 @@ kstat_t krhino_utask_stack_min_free(ktask_t *task, size_t *free)
return RHINO_INV_TASK_STATE;
}
+ if (task->task_ustack_base == NULL) {
+ return RHINO_NULL_PTR;
+ }
+
+ if (task->ustack_size == 0u) {
+ return RHINO_TASK_INV_STACK_SIZE;
+ }
+
#if (RHINO_CONFIG_CPU_STACK_DOWN > 0)
task_stack = task->task_ustack_base + RHINO_CONFIG_STK_CHK_WORDS;
while (*task_stack++ == 0u) {
|
feat: support detecting the existence of a key | @@ -648,6 +648,16 @@ parse_value(
act->_.builtin = B_FLOAT;
pos ++;
goto return_true;
+ case 'k': {
+ size_t sz = strlen("key");
+ if (pos + sz <= end_pos && 0 == strncmp(pos, "key", sz)) {
+ act->mem_size.size = sizeof(bool);
+ act->mem_size.tag = SIZE_FIXED;
+ act->_.builtin = B_KEY_EXISTENCE;
+ pos += sz;
+ }
+ goto return_true;
+ }
case 'l':
if (0 == strncmp(pos, "ld", 2)) {
act->mem_size.size = sizeof(long);
@@ -1926,6 +1936,9 @@ static size_t extract_scalar (struct action * a, int i, struct e_info * info)
tokens[i].end - tokens[i].start, json + tokens[i].start);
add_defined(info->E, a->operand);
break;
+ case B_KEY_EXISTENCE:
+ *(bool *)a->operand = true;
+ break;
case B_LONG_LONG:
if (is_null)
*(long long *) a->operand = 0;
|
docs - fixes for gpmovemirrors, gpaddmirrors
* docs - fixes for gpmovemirrors, gpaddmirrors
fix incorrect syntax
fix examples
* docs - fix typo. | line inside the configuration file has the following format (as per attributes in the
<codeph>gp_segment_configuration</codeph> catalog table):</pd>
<pd>
- <codeblock><varname>contentID</varname>|<varname>address</varname>|<varname>port</varname>|<varname>data_dir</varname> <varname>new_address</varname>|<varname>port</varname>|<varname>data_dir</varname></codeblock>
+ <codeblock><old_address>|<port>|<data_dir> <new_address>|<port>|<data_dir></codeblock>
</pd>
- <pd>Where <varname>contentID</varname> is the segment instance content ID,
- <varname>address</varname> is the host name or IP address of the segment host,
- <varname>port</varname> is the communication port, and <codeph>data_dir</codeph> is
- the segment instance data directory.</pd>
+ <pd>Where <codeph><old_address></codeph> and <codeph><new_address></codeph> are the
+ host names or IP addresses of the segment hosts, <codeph><port></codeph> is the
+ communication port, and <codeph><data_dir></codeph> is the segment instance data
+ directory.</pd>
</plentry>
<plentry>
<pt>-l <varname>logfile_directory</varname></pt>
<p>Moves mirrors from an existing Greenplum Database system to a different set of hosts:</p>
<codeblock>$ gpmovemirrors -i move_config_file</codeblock>
<p>Where the <codeph>move_config_file</codeph> looks something like this:</p>
- <codeblock>1|sdw2|50001|/data2/mirror/gpseg1 sdw3|50001|/data/mirror/gpseg1
-2|sdw2|50001|/data2/mirror/gpseg2 sdw4|50001|/data/mirror/gpseg2
-3|sdw3|50001|/data2/mirror/gpseg3 sdw1|50001|/data/mirror/gpseg3
+ <codeblock>sdw2|50000|/data2/mirror/gpseg0 sdw3|50000|/data/mirror/gpseg0
+sdw2|50001|/data2/mirror/gpseg1 sdw4|50001|/data/mirror/gpseg1
+sdw3|50002|/data2/mirror/gpseg2 sdw1|50002|/data/mirror/gpseg2
</codeblock>
</section>
</body>
|
Fix sceKernelSysrootAlloc name | @@ -9534,6 +9534,7 @@ modules:
ksceKernelAddressSpaceSetPhyMemPart: 0x67955EE9
ksceKernelAddressSpaceUnmap: 0xCE72839E
ksceKernelAddressSpaceVAtoPA: 0xF2179820
+ ksceKernelAlloc: 0xC0A4D2F3
ksceKernelAllocSystemCallTable: 0x5FFE4B79
ksceKernelCreateAddressSpace: 0x4A3737F0
ksceKernelCreateUidObj: 0xDF0288D7
@@ -9551,7 +9552,6 @@ modules:
ksceKernelMemcpyToUserRx: 0x67BAD5B4
ksceKernelNameHeapGetInfo: 0xE443253B
ksceKernelRxMemcpyKernelToUserForPid: 0x30931572
- ksceKernelSysrootAlloc: 0xC0A4D2F3
ksceKernelUIDEntryHeapGetInfo: 0x686AA15C
SceSysrootForDriver:
kernel: true
|
VERSION bump to version 2.0.75 | @@ -58,7 +58,7 @@ set (CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR})
# set version of the project
set(LIBYANG_MAJOR_VERSION 2)
set(LIBYANG_MINOR_VERSION 0)
-set(LIBYANG_MICRO_VERSION 74)
+set(LIBYANG_MICRO_VERSION 75)
set(LIBYANG_VERSION ${LIBYANG_MAJOR_VERSION}.${LIBYANG_MINOR_VERSION}.${LIBYANG_MICRO_VERSION})
# set version of the library
set(LIBYANG_MAJOR_SOVERSION 2)
|
build: trivial changes to global header, text alignment, comments | @@ -3744,6 +3744,7 @@ void flexframesync_print(flexframesync _q);
// reset frame synchronizer internal state
void flexframesync_reset(flexframesync _q);
+// has frame been detected?
int flexframesync_is_frame_open(flexframesync _q);
// push samples through frame synchronizer
|
Fix sysinfo graph mouseover regression on Win7 | @@ -1463,17 +1463,17 @@ VOID PhSipDefaultDrawPanel(
{
if (CurrentView == SysInfoSummaryView)
{
- if (Section->GraphHot)
- {
- DrawThemeBackground(
- ThemeData,
- hdc,
- TVP_TREEITEM,
- TREIS_HOT,
- &DrawPanel->Rect,
- &DrawPanel->Rect
- );
- }
+ //if (Section->GraphHot)
+ //{
+ // DrawThemeBackground(
+ // ThemeData,
+ // hdc,
+ // TVP_TREEITEM,
+ // TREIS_HOT,
+ // &DrawPanel->Rect,
+ // &DrawPanel->Rect
+ // );
+ //}
}
else if (CurrentView == SysInfoSectionView)
{
|
Benchmarks: benchmark.c: add workaround for POSIX | @@ -433,17 +433,21 @@ static void benchmarkHashFunctionVs (void)
{
if (!cI && !i)
{
- fprintf (opmphmOut, "%lu", opmphmResults[i * (numberOfShapes * cCount * seeds) +
- s * (cCount * seeds) + cI * seeds + sI]);
- fprintf (foxOut, "%lu", foxResults[i * (numberOfShapes * cCount * seeds) +
- s * (cCount * seeds) + cI * seeds + sI]);
+ fprintf (opmphmOut, "%lu",
+ opmphmResults[i * (numberOfShapes * cCount * seeds) + s * (cCount * seeds) +
+ cI * seeds + sI]);
+ fprintf (foxOut, "%lu",
+ foxResults[i * (numberOfShapes * cCount * seeds) + s * (cCount * seeds) +
+ cI * seeds + sI]);
}
else
{
- fprintf (opmphmOut, ";%lu", opmphmResults[i * (numberOfShapes * cCount * seeds) +
- s * (cCount * seeds) + cI * seeds + sI]);
- fprintf (foxOut, ";%lu", foxResults[i * (numberOfShapes * cCount * seeds) +
- s * (cCount * seeds) + cI * seeds + sI]);
+ fprintf (opmphmOut, ";%lu",
+ opmphmResults[i * (numberOfShapes * cCount * seeds) + s * (cCount * seeds) +
+ cI * seeds + sI]);
+ fprintf (foxOut, ";%lu",
+ foxResults[i * (numberOfShapes * cCount * seeds) + s * (cCount * seeds) +
+ cI * seeds + sI]);
}
}
}
@@ -471,7 +475,8 @@ static void benchmarkHashFunctionVs (void)
*
* trials;n_%luc_%lu;... (each n and c are unique)
*
- * The number of needed seeds for this benchmarks is: nCount * numberOfShapes * keySetsPerShape (KeySets generation) + numberOfSeeds (tested seeds)
+ * The number of needed seeds for this benchmarks is: nCount * numberOfShapes * keySetsPerShape (KeySets generation) + numberOfSeeds (tested
+ * seeds)
*/
static void benchmarkMapping (void)
@@ -923,7 +928,7 @@ static void * shapeCommonStartEndInit (void)
*data = 0;
return data;
}
-static void shapefCommonStartEndDel (void * data)
+static void shapeCommonStartEndDel (void * data)
{
elektraFree (data);
}
@@ -1213,7 +1218,7 @@ static KeySetShape * getKeySetShapes (void)
out[shapeCount].parent = 0;
out[shapeCount].shapeInit = shapeCommonStartEndInit;
out[shapeCount].shapef = shapefCommonStartEnd;
- out[shapeCount].shapeDel = shapefCommonStartEndDel;
+ out[shapeCount].shapeDel = shapeCommonStartEndDel; // remove f
++shapeCount;
// shapefModules
|
cmake: add symlink kdb.1 to kdb-static.1 | @@ -15,7 +15,7 @@ endmacro (copy_file)
# - JAVA: install symlink for Java in share/java
# - otherwise: install symlink for normal libraries
#
-# create_lib_symlink src dest - create a symbolic link from src -> dest
+# create_lib_symlink src dest component - create a symbolic link from src -> dest
# ~~~
macro (create_lib_symlink src dest component)
@@ -68,6 +68,50 @@ macro (create_lib_symlink src dest component)
COMPONENT "${component}")
endmacro (create_lib_symlink src dest component)
+
+# ~~~
+# Create a symlink for man1 files at installation
+#
+# create_lib_symlink src dest component - create a symbolic link from src -> dest
+# ~~~
+macro (create_doc_symlink src dest component)
+
+ cmake_parse_arguments (
+ ARG
+ "" # optional keywords
+ "" # one value keywords
+ "" # multi value keywords
+ ${ARGN})
+
+ set (DOC_INSTALL_DIR "${CMAKE_INSTALL_PREFIX}/share/man/man1")
+
+ install (
+ CODE "
+ message (STATUS \"Installing symlink: \$ENV{DESTDIR}${DOC_INSTALL_DIR}/${dest} -> ${src}\")
+ execute_process (COMMAND \"${CMAKE_COMMAND}\" -E make_directory
+ \"\$ENV{DESTDIR}${DOC_INSTALL_DIR}\"
+ RESULT_VARIABLE RET
+ )
+ if (RET)
+ message (WARNING \"Could not create directory\")
+ endif ()
+ execute_process (COMMAND \"${CMAKE_COMMAND}\" -E create_symlink
+ \"${src}\"
+ \"${dest}\"
+ WORKING_DIRECTORY \"\$ENV{DESTDIR}${DOC_INSTALL_DIR}\"
+ RESULT_VARIABLE RET
+ )
+
+ # for uninstall:
+ file (APPEND \"${CMAKE_BINARY_DIR}/extra_install_manifest.txt\" \"\$ENV{DESTDIR}${DOC_INSTALL_DIR}/${dest}\\n\")
+
+ if (RET)
+ message (WARNING \"Could not install symlink\")
+ endif ()
+ "
+ COMPONENT "${component}")
+endmacro (create_doc_symlink src dest component)
+
# ~~~
# Make a directory
#
@@ -608,6 +652,12 @@ If you do not add this file, then installing Elektra will fail!\n")
FILES ${OUTFILE}
DESTINATION share/man/man${SECTION}
COMPONENT "${ARG_COMPONENT}")
+
+ if (BUILD_STATIC)
+ if (SECTION EQUAL 1)
+ create_doc_symlink("kdb.${SECTION}" "kdb-static.${SECTION}" "${ARG_COMPONENT}")
+ endif()
+ endif ()
endif ()
endif (BUILD_DOCUMENTATION)
endfunction ()
|
api: call oc_notify_observers from delayed callback
Notifying of observers of oc/con resource must be
called from a delayed callback to avoid memory
corruption. | @@ -213,6 +213,15 @@ oc_core_con_handler_get(oc_request_t *request, oc_interface_mask_t iface_mask,
oc_send_response(request, OC_STATUS_OK);
}
+#ifdef OC_SERVER
+static oc_event_callback_retval_t
+oc_core_con_notify_observers_delayed(void *data)
+{
+ oc_notify_observers((oc_resource_t*)data);
+ return OC_EVENT_DONE;
+}
+#endif /* OC_SERVER */
+
static void
oc_core_con_handler_post(oc_request_t *request, oc_interface_mask_t iface_mask,
void *data)
@@ -238,8 +247,9 @@ oc_core_con_handler_post(oc_request_t *request, oc_interface_mask_t iface_mask,
#ifdef OC_SERVER
oc_resource_t* device_resource = oc_core_get_resource_by_index(OCF_D, device);
- oc_notify_observers(device_resource);
-#endif /* OC_SERVER */
+ oc_set_delayed_callback(device_resource, oc_core_con_notify_observers_delayed, 0);
+#endif
+
changed = true;
break;
}
|
adjustemt form PR comments, fix formatting | @@ -85,14 +85,16 @@ apt-get install pdflatex \
For the plugins, please refer to the [README.md](https://www.libelektra.org/plugins/readme) of the respective plugin.
A small subset of plugins to get you started:
-for CentOS:
+* for CentOS:
+
```sh
sudo yum install -y boost-devel libdb-devel GConf2-devel libxml2-devel yajl-devel \
libcurl-devel augeas-devel libgit2-devel lua-devel swig python34-devel python-devel \
java-1.8.0-openjdk-devel jna ruby-devel byacc
```
-for Ubuntu:
+* for Ubuntu:
+
```sh
sudo apt install -y libboost-dev libxerces-c-dev libxml2-dev libyajl-dev \
libcurl4-gnutls-dev libaugeas-dev git git-buildpackage dh-lua liblua5.2-dev \
@@ -225,7 +227,7 @@ To add also experimental plugins, you can use:
-DPLUGINS=ALL
```
-> Note that plugins are only build if their dependencies are satisfied.
+> Note that plugins are only built if their dependencies are satisfied.
> So make sure to install all dependencies you need before you run `cmake`.
> For example, to include the plugin `yajl`, make sure `libyajl-dev` is installed.
|
OpenSSL is now TLSv1.3 draft-21 | @@ -50,9 +50,9 @@ OpenSSL (master branch) as crypto backend:
At the of time writing, choosing crypto backend from them dictates
TLSv1.3 draft version. boringssl implements TLSv1.3 draft-18. On the
-other hand, OpenSSL implements TLSv1.3 draft-20. They are
+other hand, OpenSSL implements TLSv1.3 draft-21. They are
incompatible. If you want TLSv1.3 draft-18, choose boringssl. If you
-want TLSv1.3 draft-20, choose OpenSSL.
+want TLSv1.3 draft-21, choose OpenSSL.
To build boringssl, golang is required:
|
Updates travis cfg. Splits up the matrix so that the env are configured more specifically | sudo: required
-dist: trusty
-#osx_image: xcode8.2
language: c
-os:
- - linux
- # - osx
-
-compiler:
- - gcc
- - clang
-
-services:
- - docker
-
-
env:
global:
- COVERITY_SCAN_BUILD_COMMAND="make"
@@ -32,17 +18,32 @@ env:
matrix:
include:
- os: linux
+ dist: trusty
+ compiler: gcc
+ - os: linux
+ dist: trusty
+ compiler: clang
+ - os: osx
+ osx_image: xcode7.3
+ compiler: gcc
+ env: MACOSX_DEPLOYMENT_TARGET=10.11
+ - os: osx
+ osx_image: xcode7.3
+ compiler: clang
+ env: MACOSX_DEPLOYMENT_TARGET=10.11
+ - os: linux
+ dist: trusty
compiler: gcc
env: SANITIZE=1
- os: linux
+ dist: trusty
compiler: clang
env: ANDROID=1
-
+ services: docker
before_install:
- if [ "$TRAVIS_OS_NAME" = "linux" ] && [ -z "$ANDROID" ]; then sudo add-apt-repository ppa:ubuntu-toolchain-r/test -y && sudo apt-get -qq update && sudo apt-get install -y uuid-dev libxml2-dev lcov libffi-dev gcc-4.8 g++-4.8; fi
- - if [ "$TRAVIS_OS_NAME" = "osx" ]; then brew uninstall cmake; fi
- - if [ "$TRAVIS_OS_NAME" = "osx" ]; then brew update && brew install lcov libffi cmake && brew link --force libffi; fi
+ - if [ "$TRAVIS_OS_NAME" = "osx" ]; then brew update && brew install lcov libffi && brew link --force libffi; fi
before_script:
- wget https://github.com/cpputest/cpputest/releases/download/v3.8/cpputest-3.8.tar.gz -O /tmp/cpputest.tar.gz
@@ -89,7 +90,7 @@ script:
- if [ "$CC" = "gcc" ] && [ "$TRAVIS_OS_NAME" = "linux" ]; then export BUILD_OPTS="${BUILD_OPTS} -DENABLE_CODE_COVERAGE=ON"; fi
- if [ "$TRAVIS_OS_NAME" = "linux" ] && [ -z "$ANDROID" ]; then cmake ${BUILD_OPTIONS} ${BUILD_OPTIONS_LINUX} -DBUILD_FRAMEWORK_TESTS=ON -DBUILD_UTILS-TESTS=ON -DENABLE_TESTING=ON ${BUILD_OPTS} -DCMAKE_INSTALL_PREFIX=../install ..; fi
- if [ "$TRAVIS_OS_NAME" = "osx" ]; then cmake ${BUILD_OPTIONS} ${BUILD_OPTIONS_OSX} -DBUILD_FRAMEWORK_TESTS=ON -DBUILD_UTILS-TESTS=ON -DENABLE_TESTING=ON -DFFI_LIBRARY=/usr/local/opt/libffi/lib/libffi.dylib ${BUILD_OPTS} -DCMAKE_INSTALL_PREFIX=../install ..; fi
- - if [ -z "$ANDROID" ]; then make all && make deploy && make install; else cd .. && docker build -t celixandroid - < Dockerfile.Android ; fi
+ - if [ -z "$ANDROID" ]; then make all && make deploy && sudo make install; else cd .. && docker build -t celixandroid - < Dockerfile.Android ; fi
- if [ -z "$ANDROID" ]; then export LD_LIBRARY_PATH=/usr/local/lib:$LD_LIBRARY_PATH:`pwd`/utils:`pwd`/framework:`pwd`/dfi && make test ARGS="-V"; else docker run celixandroid; fi
after_success:
|
Don't pack ZydisShortString on Darwin | @@ -45,7 +45,9 @@ extern "C" {
/* Enums and types */
/* ============================================================================================== */
+#if !(defined(ZYAN_AARCH64) && defined(ZYAN_APPLE))
# pragma pack(push, 1)
+#endif
/**
* Defines the `ZydisShortString` struct.
@@ -67,7 +69,9 @@ typedef struct ZydisShortString_
ZyanU8 size;
} ZydisShortString;
+#if !(defined(ZYAN_AARCH64) && defined(ZYAN_APPLE))
# pragma pack(pop)
+#endif
/* ============================================================================================== */
/* Macros */
|
Move script actors on frames that only affected player | @@ -456,6 +456,14 @@ void SceneUpdateActors_b()
{
// Else only move player
len = 1;
+
+ // Move script actor
+ if (script_ptr != 0 && script_actor != 0 && actors[script_actor].moving)
+ {
+ // Move actors
+ actors[script_actor].pos.x += actors[script_actor].dir.x;
+ actors[script_actor].pos.y += actors[script_actor].dir.y;
+ }
}
for (i = 0; i != len; ++i)
@@ -791,6 +799,21 @@ void SceneRenderActors_b()
{
// Else only move player
len = 1;
+ // Unless running script on actor
+ if (script_ptr != 0 && script_actor != 0)
+ {
+ sprite_index = MUL_2(script_actor);
+ screen_x = actors[script_actor].pos.x + scx;
+ screen_y = actors[script_actor].pos.y + scy;
+ if (actors[script_actor].enabled && (win_pos_y == MENU_CLOSED_Y || screen_y < win_pos_y + 16))
+ {
+ move_sprite_pair(sprite_index, screen_x, screen_y);
+ }
+ else
+ {
+ hide_sprite_pair(sprite_index);
+ }
+ }
}
for (i = 0; i != len; ++i)
{
|
esp32/network_lan: Make power arg to constructor optional.
A value of None for this argument is already supported, so the argument can
be made optional. | @@ -99,7 +99,7 @@ STATIC mp_obj_t get_lan(size_t n_args, const mp_obj_t *pos_args, mp_map_t *kw_ar
{ MP_QSTR_id, MP_ARG_OBJ, {.u_obj = mp_const_none} },
{ MP_QSTR_mdc, MP_ARG_KW_ONLY | MP_ARG_REQUIRED | MP_ARG_OBJ },
{ MP_QSTR_mdio, MP_ARG_KW_ONLY | MP_ARG_REQUIRED | MP_ARG_OBJ },
- { MP_QSTR_power, MP_ARG_KW_ONLY | MP_ARG_REQUIRED | MP_ARG_OBJ },
+ { MP_QSTR_power, MP_ARG_KW_ONLY | MP_ARG_OBJ, {.u_obj = mp_const_none} },
{ MP_QSTR_phy_addr, MP_ARG_KW_ONLY | MP_ARG_REQUIRED | MP_ARG_INT },
{ MP_QSTR_phy_type, MP_ARG_KW_ONLY | MP_ARG_REQUIRED | MP_ARG_INT },
{ MP_QSTR_clock_mode, MP_ARG_KW_ONLY | MP_ARG_INT, {.u_int = -1} },
|
{AH} add username and secret to .travis.yml | @@ -11,8 +11,8 @@ env:
- CONDA_PY=3.7
global:
- PYSAM_LINKING_TEST=1
- - TWINE_USERNAME=
- - secure: ''
+ - TWINE_USERNAME=grepall
+ - secure: 'OcwwP8/o21+SGW0UVAnnCQwllhGSCq2HJzpI9EhX3kh6J9RTkyx/+drkg45bx1Z5u8zymuAFappEYzlpzqZE886XezkjOYGVa/u+Coqr1oT/BEJHFCkCA4o26yESp7Zy8aNj/juhB7Rfa77pIDXBayqTzbALz/AURMtZapasB18='
_deploy_common: &deploy_common
if: tag IS present
|
FIX: memory leak when getting hostname by address | @@ -1065,7 +1065,7 @@ static int arcus_build_znode_name(char *ensemble_list)
hp = gethostbyaddr((char*)&myaddr.sin_addr.s_addr,
sizeof(myaddr.sin_addr.s_addr), AF_INET);
if (hp) {
- hostp = strdup(hp->h_name);
+ hostp = hp->h_name;
} else {
// if gethostbyaddr() doesn't work, try gethostname
if (gethostname((char *)&hostbuf, sizeof(hostbuf))) {
|
opae-sdk: fix static code analysis issue check buffer boundaries and may overflow buffer
issue: function 'strncpy' may incorrectly check buffer boundaries and may overflow buffer 'dfl_dev_str' of fixed size (256)
fix: replace 'strncpy' with memcpy | @@ -536,7 +536,7 @@ fpga_result get_usrclk_uio(const char *sysfs_path,
res = FPGA_NOT_FOUND;
goto free;
}
- strncpy(dfl_dev_str, p, end - p);
+ memcpy(dfl_dev_str, p, end - p);
*(dfl_dev_str + (end - p)) = '\0';
ret = opae_uio_open(uio, dfl_dev_str);
|
docs/unix/quickref: Remove options not supported in Pycopy. | @@ -82,8 +82,3 @@ Environment variables
not defined, the search path will be ``~/.micropython/lib:/usr/lib/micropython``
or the value of the ``MICROPY_PY_SYS_PATH_DEFAULT`` option if it was set
when MicroPython itself was compiled.
-
-.. envvar:: MICROPYINSPECT
-
- Enables inspection. If ``MICROPYINSPECT`` is set to a non-empty string, it
- has the same effect as setting the :option:`-i` command line option.
|
af_packet: add the missing header-len for packets with checksum offload
Type: fix | @@ -343,6 +343,7 @@ fill_cksum_offload (vlib_buffer_t *b0, vnet_virtio_net_hdr_t *vnet_hdr)
(tcp_header_t *) (b0->data + vnet_buffer (b0)->l4_hdr_offset);
tcp->checksum = ip4_pseudo_header_cksum (ip4);
vnet_hdr->csum_offset = STRUCT_OFFSET_OF (tcp_header_t, checksum);
+ vnet_hdr->hdr_len = l4_hdr_offset + tcp_header_bytes (tcp);
}
else if (oflags & VNET_BUFFER_OFFLOAD_F_UDP_CKSUM)
{
@@ -350,6 +351,7 @@ fill_cksum_offload (vlib_buffer_t *b0, vnet_virtio_net_hdr_t *vnet_hdr)
(udp_header_t *) (b0->data + vnet_buffer (b0)->l4_hdr_offset);
udp->checksum = ip4_pseudo_header_cksum (ip4);
vnet_hdr->csum_offset = STRUCT_OFFSET_OF (udp_header_t, checksum);
+ vnet_hdr->hdr_len = l4_hdr_offset + sizeof (udp_header_t);
}
}
else if (b0->flags & VNET_BUFFER_F_IS_IP6)
@@ -364,6 +366,7 @@ fill_cksum_offload (vlib_buffer_t *b0, vnet_virtio_net_hdr_t *vnet_hdr)
(tcp_header_t *) (b0->data + vnet_buffer (b0)->l4_hdr_offset);
tcp->checksum = ip6_pseudo_header_cksum (ip6);
vnet_hdr->csum_offset = STRUCT_OFFSET_OF (tcp_header_t, checksum);
+ vnet_hdr->hdr_len = l4_hdr_offset + tcp_header_bytes (tcp);
}
else if (oflags & VNET_BUFFER_OFFLOAD_F_UDP_CKSUM)
{
@@ -371,6 +374,7 @@ fill_cksum_offload (vlib_buffer_t *b0, vnet_virtio_net_hdr_t *vnet_hdr)
(udp_header_t *) (b0->data + vnet_buffer (b0)->l4_hdr_offset);
udp->checksum = ip6_pseudo_header_cksum (ip6);
vnet_hdr->csum_offset = STRUCT_OFFSET_OF (udp_header_t, checksum);
+ vnet_hdr->hdr_len = l4_hdr_offset + sizeof (udp_header_t);
}
}
}
|
Fixed mem oob issue | @@ -451,8 +451,8 @@ int DriverRegPlayback(SurviveContext *ctx) {
continue;
}
- char dev[10];
- char command[10];
+ char dev[32];
+ char command[32];
if (sscanf(line, "%lf %s %s", &time, dev, command) != 3) {
free(line);
|
h2olog: add comments | @@ -31,9 +31,13 @@ from pprint import pprint
quicly_probes_d = "deps/quicly/quicly-probes.d"
h2o_probes_d = "h2o-probes.d"
+# An allow-list to gather data from USDT probes.
+# Only fields listed here are handled in BPF.
struct_map = {
# deps/quicly/include/quicly.h
"st_quicly_stream_t": [
+ # ($member_access, $optional_flat_name)
+ # If $optional_flat_name is None, $member_access is used.
("stream_id", None),
],
@@ -51,6 +55,7 @@ struct_map = {
],
}
+# A block list to list useless or secret data fields
block_fields = {
"quicly:crypto_decrypt": set(["decrypted"]),
"quicly:crypto_update_secret": set(["secret"]),
@@ -61,17 +66,21 @@ block_fields = {
"h2o:h3_accept": set(["conn"]), # `h2o_conn_t *conn`
}
+# A block list for quicly-probes.d.
+# USDT probes in quicly-probes.d are handled by default.
quicly_block_probes = set([
"quicly:debug_message",
])
+# An allow list for h2o-probes.d
+# USDT probes in h2o-probes.d are not handled by default.
h2o_allow_probes = set([
"h2o:h3_accept",
"h2o:h3_close",
"h2o:send_response_header",
])
-# convert field names for compatibility with:
+# To rename field names for compatibility with:
# https://github.com/h2o/quicly/blob/master/quictrace-adapter.py
rename_map = {
# common fields
|
WIP Consistent data file whitespace | @@ -138,10 +138,10 @@ export const toStructDataFile = <T extends {}>(
) => `#pragma bank 255
${comment ? "\n" + comment : ""}
-#include "VM.h"
-${
+#include "VM.h"${
+ dependencies
+ ? "\n" +
dependencies
- ? dependencies
.map((dependency) => `#include "data/${dependency}.h"`)
.join("\n")
: ""
@@ -492,7 +492,7 @@ export const compilePalette = (palette: any, paletteIndex: number) =>
toArrayDataFile(
DATA_TYPE,
paletteSymbol(paletteIndex),
- `// Palette: ${paletteIndex}\n`,
+ `// Palette: ${paletteIndex}`,
palette,
8
);
|
er-coap-observe-client: missing 'addr' parameter | @@ -107,7 +107,7 @@ int coap_obs_remove_observee_by_token(uip_ipaddr_t *addr, uint16_t port,
int coap_obs_remove_observee_by_url(uip_ipaddr_t *addr, uint16_t port,
const char *url);
-void coap_handle_notification(uip_ipaddr_t *, uint16_t port,
+void coap_handle_notification(uip_ipaddr_t *addr, uint16_t port,
coap_packet_t *notification);
coap_observee_t *coap_obs_request_registration(uip_ipaddr_t *addr,
|
Add log to node loader destroy event (outside of mutithread environment). | @@ -1324,6 +1324,7 @@ void node_loader_impl_thread(void * data)
if (length == -1 || length == PATH_MAX)
{
+ /* TODO: Make logs thread safe */
/* log_write("metacall", LOG_LEVEL_ERROR, "node loader register invalid working directory path (%s)", exe_path_str); */
return;
}
@@ -1817,12 +1818,14 @@ void node_loader_impl_async_destroy(uv_async_t * async)
/* Destroy node loop */
if (uv_loop_alive(node_impl->thread_loop) != 0)
{
+ /* TODO: Make logs thread safe */
/* log_write("metacall", LOG_LEVEL_ERROR, "NodeJS event loop should not be alive"); */
}
/* TODO: Check how to delete properly all handles */
if (uv_loop_close(node_impl->thread_loop) == UV_EBUSY)
{
+ /* TODO: Make logs thread safe */
/* log_write("metacall", LOG_LEVEL_ERROR, "NodeJS event loop should not be busy"); */
}
@@ -1880,7 +1883,7 @@ int node_loader_impl_destroy(loader_impl impl)
uv_thread_join(&node_impl->thread_id);
/* Print NodeJS execution result */
- /* log_write("metacall", LOG_LEVEL_INFO, "NodeJS execution return status %d", node_impl->result); */
+ log_write("metacall", LOG_LEVEL_INFO, "NodeJS execution return status %d", node_impl->result);
delete node_impl;
|
do no configuration as part of the install process - this breaks debian packaging tools | @@ -3,7 +3,7 @@ CC ?= gcc
CFLAGS ?= -Os -Wall -Wwrite-strings -pedantic
CFLAGS += -std=gnu99 -I/usr/local/include
LFLAGS += -L/usr/local/lib -lc
-FEATURES ?= dns lpd tls bob #cmd debug nss natpmp upnp
+FEATURES ?= dns lpd tls bob cmd debug #nss natpmp upnp
OBJS = build/main.o build/searches.o build/kad.o build/log.o \
build/conf.o build/net.o build/utils.o \
@@ -117,10 +117,10 @@ install:
cp build/kadnode $(DESTDIR)/usr/bin/
-cp build/kadnode-ctl $(DESTDIR)/usr/bin/
-cp build/libnss_kadnode.so.2 $(DESTDIR)/lib/
- -sed -i -e '/kadnode/!s/^\(hosts:.*\)\s\{1,\}dns\(.*\)/\1 kadnode dns\2/' $(DESTDIR)/etc/nsswitch.conf 2> /dev/null
+ #-sed -i -e '/kadnode/!s/^\(hosts:.*\)\s\{1,\}dns\(.*\)/\1 kadnode dns\2/' $(DESTDIR)/etc/nsswitch.conf 2> /dev/null
uninstall:
rm $(DESTDIR)/usr/bin/kadnode
-rm $(DESTDIR)/usr/bin/kadnode-ctl
-rm $(DESTDIR)/lib/libnss_kadnode.so.2
- -sed -i -e 's/^\(hosts:.*\)kadnode \(.*\)/\1\2/' $(DESTDIR)/etc/nsswitch.conf 2> /dev/null
+ #-sed -i -e 's/^\(hosts:.*\)kadnode \(.*\)/\1\2/' $(DESTDIR)/etc/nsswitch.conf 2> /dev/null
|
Doxygen: Fixed references from mq_size to mq_mem in osMessageQueueAttr_t description. | @@ -362,7 +362,7 @@ Default: \token{NULL} to use \ref CMSIS_RTOS_MemoryMgmt_Automatic for the memory
\var osMessageQueueAttr_t::mq_size
\details
-The size (in bytes) of memory block passed with \ref mp_mem. The minimum memory block size is <code>msg_count * msg_size</code> (parameters of the \ref osMessageQueueNew function). The \em msg_size is rounded up to a double even number to ensure 32-bit alignment of the memory blocks.
+The size (in bytes) of memory block passed with \ref mq_mem. The minimum memory block size is <code>msg_count * msg_size</code> (parameters of the \ref osMessageQueueNew function). The \em msg_size is rounded up to a double even number to ensure 32-bit alignment of the memory blocks.
-Default: 0 as the default is no memory provided with \ref mp_mem.
+Default: 0 as the default is no memory provided with \ref mq_mem.
*/
|
dshot: add guard for dma transaction on spi1 | #include "control.h"
#include "defines.h"
#include "drv_motor.h"
+#include "drv_spi.h"
#include "drv_time.h"
#include "profile.h"
#include "project.h"
@@ -271,10 +272,13 @@ void make_packet(uint8_t number, uint16_t value, bool telemetry) {
// make dshot dma packet, then fire
void dshot_dma_start() {
- uint32_t time = gettime();
- while (dshot_dma_phase != 0 && (gettime() - time) < state.looptime * 1e6f) {
- } // wait maximum a LOOPTIME for dshot dma to complete
- if (dshot_dma_phase != 0)
+ uint32_t time = timer_micros();
+
+ // wait maximum a LOOPTIME for dshot dma to complete
+ while ((dshot_dma_phase != 0 || spi_dma_is_ready(SPI_PORT1) == 0) && (timer_micros() - time) < state.looptime * 1e6f)
+ ;
+
+ if (dshot_dma_phase != 0 || spi_dma_is_ready(SPI_PORT1) == 0)
return; // skip this dshot command
// generate dshot dma packet
|
Voema_npcx796fc: Free up flash space
Free up flash space for voema_npcx796fc by removing help strings.
BRANCH=None
TEST=make -j buildall; observe there is now 4.5k free flash | * any unused flash space that can be used to store the .init_rom section.
*/
#undef CONFIG_CHIP_INIT_ROM_REGION
-#endif
+#else
+/* Free up flash space */
+#undef CONFIG_CONSOLE_CMDHELP
+#endif /* BOARD_VOEMA */
#define CONFIG_VBOOT_EFS2
|
cc2500: improve exti handling | extern int liberror;
-static uint8_t gdo0_exti_status = 1;
+static volatile uint8_t gdo0_exti_status = 1;
uint8_t cc2500_read_gdo0() {
uint8_t val = gdo0_exti_status;
@@ -56,6 +56,11 @@ static void cc2500_hardware_init() {
spi_init_pins(CC2500_SPI_PORT, CC2500_NSS);
GPIO_InitTypeDef GPIO_InitStructure;
+ GPIO_InitStructure.GPIO_Mode = GPIO_Mode_OUT;
+ GPIO_InitStructure.GPIO_Speed = GPIO_Speed_50MHz;
+ GPIO_InitStructure.GPIO_OType = GPIO_OType_PP;
+ GPIO_InitStructure.GPIO_PuPd = GPIO_PuPd_NOPULL;
+
#if defined(USE_CC2500_PA_LNA)
GPIO_InitStructure.GPIO_Pin = CC2500_LNA_EN_PIN;
GPIO_Init(CC2500_LNA_EN_PORT, &GPIO_InitStructure);
@@ -79,26 +84,25 @@ static void cc2500_hardware_init() {
// GDO0
GPIO_InitStructure.GPIO_Pin = CC2500_GDO0_PIN;
GPIO_InitStructure.GPIO_Mode = GPIO_Mode_IN;
- GPIO_InitStructure.GPIO_Speed = 0;
- GPIO_InitStructure.GPIO_OType = 0;
+ GPIO_InitStructure.GPIO_Speed = GPIO_Speed_50MHz;
+ GPIO_InitStructure.GPIO_OType = GPIO_OType_PP;
GPIO_InitStructure.GPIO_PuPd = GPIO_PuPd_NOPULL;
GPIO_Init(CC2500_GDO0_PORT, &GPIO_InitStructure);
RCC_APB2PeriphClockCmd(RCC_APB2Periph_SYSCFG, ENABLE);
SYSCFG_EXTILineConfig(CC2500_GDO0_EXTI_PINSOURCE, CC2500_GDO0_PINSOURCE);
- /* PD0 is connected to EXTI_Line0 */
EXTI_InitTypeDef EXTI_InitStruct;
EXTI_InitStruct.EXTI_Line = CC2500_GDO0_EXTI_LINE;
EXTI_InitStruct.EXTI_LineCmd = ENABLE;
EXTI_InitStruct.EXTI_Mode = EXTI_Mode_Interrupt;
- EXTI_InitStruct.EXTI_Trigger = EXTI_Trigger_Rising_Falling;
+ EXTI_InitStruct.EXTI_Trigger = EXTI_Trigger_Rising;
EXTI_Init(&EXTI_InitStruct);
NVIC_InitTypeDef NVIC_InitStruct;
NVIC_InitStruct.NVIC_IRQChannel = EXTI15_10_IRQn;
- NVIC_InitStruct.NVIC_IRQChannelPreemptionPriority = 0x00;
- NVIC_InitStruct.NVIC_IRQChannelSubPriority = 0x00;
+ NVIC_InitStruct.NVIC_IRQChannelPreemptionPriority = 0x0f;
+ NVIC_InitStruct.NVIC_IRQChannelSubPriority = 0x0f;
NVIC_InitStruct.NVIC_IRQChannelCmd = ENABLE;
NVIC_Init(&NVIC_InitStruct);
@@ -129,8 +133,8 @@ static void cc2500_hardware_init() {
void CC2500_GDO0_EXTI_HANDLER() {
if (EXTI_GetITStatus(CC2500_GDO0_EXTI_LINE) != RESET) {
gdo0_exti_status = 1;
- EXTI_ClearITPendingBit(CC2500_GDO0_EXTI_LINE);
}
+ EXTI_ClearITPendingBit(CC2500_GDO0_EXTI_LINE);
}
void cc2500_strobe(uint8_t address) {
|
I2C: Fix i2c write fake timeout and WDT triggered | void i2c_hal_master_handle_tx_event(i2c_hal_context_t *hal, i2c_intr_event_t *event)
{
+ if (i2c_ll_get_intsts_mask(hal->dev) != 0) {
+ // If intr status is 0, no need to handle it.
i2c_ll_master_get_event(hal->dev, event);
if ((*event < I2C_INTR_EVENT_END_DET) ||
(*event == I2C_INTR_EVENT_TRANS_DONE)) {
@@ -25,9 +27,11 @@ void i2c_hal_master_handle_tx_event(i2c_hal_context_t *hal, i2c_intr_event_t *ev
i2c_ll_master_clr_tx_it(hal->dev);
}
}
+}
void i2c_hal_master_handle_rx_event(i2c_hal_context_t *hal, i2c_intr_event_t *event)
{
+ if (i2c_ll_get_intsts_mask(hal->dev) != 0) {
i2c_ll_master_get_event(hal->dev, event);
if ((*event < I2C_INTR_EVENT_END_DET) ||
(*event == I2C_INTR_EVENT_TRANS_DONE)) {
@@ -37,6 +41,7 @@ void i2c_hal_master_handle_rx_event(i2c_hal_context_t *hal, i2c_intr_event_t *ev
i2c_ll_master_clr_rx_it(hal->dev);
}
}
+}
void i2c_hal_slave_handle_event(i2c_hal_context_t *hal, i2c_intr_event_t *event)
{
|
Add bootstrap methods for node loader (discover still not implemented). | const trampoline = require('./trampoline.node');
+var Module = require('module');
+var path = require('path');
+
+function node_loader_trampoline_execution_path() {
+ // TODO
+}
+
+function node_loader_trampoline_load_from_file(paths) {
+ const handle = {};
+
+ for (const path of paths) {
+ const module = require(path);
+
+ handle[path] = module;
+ }
+
+ return handle;
+}
+
+function node_loader_trampoline_load_from_memory(name, buffer, opts) {
+ opts.prepend_paths = opts.prepend_paths || [];
+ opts.append_paths = opts.append_paths || [];
+
+ if (typeof buffer !== 'string') {
+ throw new Error('Load from memory buffer must be a string, not ' + typeof code);
+ }
+
+ const paths = Module._nodeModulePaths(path.dirname(name));
+
+ const parent = module.parent;
+
+ const m = new Module(name, parent);
+
+ m.filename = name;
+ m.paths = [].concat(opts.prepend_paths).concat(paths).concat(opts.append_paths);
+ m._compile(code, name);
+
+ const exports = m.exports;
+
+ if (parent && parent.children) {
+ parent.children.splice(parent.children.indexOf(m), 1);
+ }
+
+ const handle = {};
+
+ handle[name] = exports;
+
+ return handle;
+}
+
+function node_loader_trampoline_load_from_package() {
+ // TODO
+}
+
+function node_loader_trampoline_clear(handle) {
+ for (const path of handle) {
+ if (require.cache[path]) {
+ delete require.cache[path];
+ }
+ }
+}
+
+function node_loader_trampoline_discover(handle) {
+ // TODO
+}
+
function node_loader_trampoline_test() {
console.log('NodeJS Loader Bootstrap Test');
}
module.exports = ((ptr) => {
return trampoline.register(ptr, {
+ 'execution_path': node_loader_trampoline_execution_path,
+ 'load_from_file': node_loader_trampoline_load_from_file,
+ 'load_from_memory': node_loader_trampoline_load_from_memory,
+ 'load_from_package': node_loader_trampoline_load_from_package,
+ 'clear': node_loader_trampoline_clear,
+ 'discover': node_loader_trampoline_discover,
'test': node_loader_trampoline_test,
});
})(process.argv[2]);
|
ipsec: Stack the adj from the destination in the SA's TX table
Type: fix | @@ -76,7 +76,7 @@ ipsec_itf_adj_stack (adj_index_t ai, u32 sai)
};
/* *INDENT-ON* */
- adj_midchain_delegate_stack (ai, 0, &dst);
+ adj_midchain_delegate_stack (ai, sa->tx_fib_index, &dst);
}
else
adj_midchain_delegate_unstack (ai);
|
Bundle Handshake packet in CONNECTION_CLOSE if handshake is not confirmed | @@ -8222,6 +8222,8 @@ ngtcp2_ssize ngtcp2_conn_write_connection_close(ngtcp2_conn *conn,
ngtcp2_ssize res = 0, nwrite;
ngtcp2_frame fr;
uint8_t pkt_type;
+ int bundle = 0;
+ uint8_t bundle_pkt_type;
conn->log.last_ts = ts;
conn->qlog.last_ts = ts;
@@ -8260,10 +8262,18 @@ ngtcp2_ssize ngtcp2_conn_write_connection_close(ngtcp2_conn *conn,
return NGTCP2_ERR_INVALID_STATE;
}
- if (conn->server && pkt_type == NGTCP2_PKT_HANDSHAKE && in_pktns &&
- in_pktns->crypto.tx.ckm) {
+ if (conn->server && pkt_type == NGTCP2_PKT_HANDSHAKE && in_pktns) {
+ bundle = 1;
+ bundle_pkt_type = NGTCP2_PKT_INITIAL;
+ } else if (pkt_type == NGTCP2_PKT_SHORT && hs_pktns &&
+ !(conn->flags & NGTCP2_CONN_FLAG_HANDSHAKE_CONFIRMED)) {
+ bundle = 1;
+ bundle_pkt_type = NGTCP2_PKT_HANDSHAKE;
+ }
+
+ if (bundle) {
nwrite = ngtcp2_conn_write_single_frame_pkt(
- conn, dest, destlen, NGTCP2_PKT_INITIAL, &conn->dcid.current.cid, &fr,
+ conn, dest, destlen, bundle_pkt_type, &conn->dcid.current.cid, &fr,
NGTCP2_RTB_FLAG_NONE, ts);
if (nwrite < 0) {
return nwrite;
|
docs: Add missing entries for CGROUP_SOCK_ADDR family | @@ -69,7 +69,8 @@ BPF attached to cgroups as device controller | 4.15 | [`ebc614f68736`](https://g
bpf2bpf function calls | 4.16 | [`cc8b0b92a169`](https://github.com/torvalds/linux/commit/cc8b0b92a1699bc32f7fec71daa2bfc90de43a4d)
BPF used for monitoring socket RX/TX data | 4.17 | [`4f738adba30a`](https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=4f738adba30a7cfc006f605707e7aee847ffefa0)
BPF attached to raw tracepoints | 4.17 | [`c4f6699dfcb8`](https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=c4f6699dfcb8558d138fe838f741b2c10f416cf9)
-BPF attached to `bind()` system call | 4.17 | [`4fbac77d2d09`](https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=4fbac77d2d092b475dda9eea66da674369665427)
+BPF attached to `bind()` system call | 4.17 | [`4fbac77d2d09`](https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=4fbac77d2d092b475dda9eea66da674369665427) [`aac3fc320d94`](https://github.com/torvalds/linux/commit/aac3fc320d9404f2665a8b1249dc3170d5fa3caf)
+BPF attached to `connect()` system call | 4.17 | [`d74bad4e74ee`](https://github.com/torvalds/linux/commit/d74bad4e74ee373787a9ae24197c17b7cdc428d5)
BPF Type Format (BTF) | 4.18 | [`69b693f0aefa`](https://git.kernel.org/cgit/linux/kernel/git/davem/net-next.git/commit/?id=69b693f0aefa0ed521e8bd02260523b5ae446ad7)
AF_XDP | 4.18 | [`fbfc504a24f5`](https://git.kernel.org/cgit/linux/kernel/git/davem/net-next.git/commit/?id=fbfc504a24f53f7ebe128ab55cb5dba634f4ece8)
bpfilter | 4.18 | [`d2ba09c17a06`](https://git.kernel.org/cgit/linux/kernel/git/davem/net-next.git/commit/?id=d2ba09c17a0647f899d6c20a11bab9e6d3382f07)
|
bntests.txt: add a couple of checks of possibly negative zero | @@ -4643,6 +4643,10 @@ N = 64
#
# These test vectors satisfy A / 2^N = RShift, rounding towards zero.
+Rshift = 0
+A = -1
+N = 1
+
RShift = 6ce746ffa7979ce10b751cd2308402a95d00d596cd97b36380
A = d9ce8dff4f2f39c216ea39a461080552ba01ab2d9b2f66c701
N = 1
@@ -5967,6 +5971,11 @@ B = -542fb814f45924aa09a16f2a6
# These test vectors satisfy Quotient = A / B, rounded towards zero, and
# Remainder = A - B * Quotient.
+Quotient = 0
+Remainder = -1
+A = -1
+B = 2
+
Quotient = 1
Remainder = 0
A = 8cdaaa7c422f3c2bb0ace2da7d7ff151e5bdefb23e6426cf3e6b21491e6e80e977bfa6c65931a8dee31fc7992c0c801d5d7c
|
Add zeroed env pointer when a const fn is passed as an argument.
This makes it safe to fndup a global function which makes it safe to spawn a global function. | @@ -298,7 +298,7 @@ slicelen(Simp *s, Node *sl)
Node *
loadvar(Simp *s, Node *n, Node *dst)
{
- Node *p, *f, *r;
+ Node *p, *f, *r, *e;
if (isconstfn(n)) {
if (dst)
@@ -308,6 +308,9 @@ loadvar(Simp *s, Node *n, Node *dst)
f = getcode(s, n);
p = addr(s, r, exprtype(n));
assignat(s, p, Ptrsz, f);
+ e = mkintlit(n->loc, 0);
+ e->expr.type = tyintptr;
+ assignat(s, p, 0, e);
} else {
r = n;
}
|
Removed redundant options, proper boolean config handling | @@ -27,18 +27,16 @@ import("lib.detect.find_tool")
function configurations()
return
{
- verbose = {description = "enable verbose output", default = "true", values = {"true", "false"}},
- save = {description = "save dependency in project's package.json", default = "false", values = {"true", "false"}},
- save_dev = {description = "save as development dependency in project's package.json", default = "false", values = {"true", "false"}},
+ save = {description = "save dependency in project's package.json", default = false, type = "boolean"},
+ save_dev = {description = "save as development dependency in project's package.json", default = false, type = "boolean"},
out_dir = {description = "package installation directory relative to project root", default = "clib"},
}
end
-- install package
-- @param name the package name, e.g. clib::clibs/[email protected]
--- @param opt the options, .e.g { verbose = true, mode = "release", plat = , arch = ,
--- remote = "", build = "all", options = {}, imports = {}, build_requires = {},
--- settings = {verbose = "false", out_dir = "deps", save = "true", save_dev = "false"}}
+-- @param opt the options, .e.g { verbose = true,
+-- settings = {out_dir = "clib", save = false, save_dev = false}}
--
-- @return true or false
--
@@ -54,13 +52,13 @@ function main(name, opt)
dprint("installing %s to %s", name, abs_out)
table.insert(argv, "-o " .. abs_out)
- if opt.verbose ~= "true" then
+ if not option.get("verbose") then
table.insert(argv, "-q")
end
- if opt.save == "true" then
+ if opt.save then
table.insert(argv, "--save")
end
- if opt.save_dev == "true" then
+ if opt.save_dev then
table.insert(argv, "--save-dev")
end
|
Testing: Subset extraction without first unpacking | @@ -26,6 +26,17 @@ fBufrTmp2=temp2.${label}.bufr
# Define filter rules file
fRules=${label}.filter
+#-----------------------------------------------------------
+# Test: extract without unpacking
+#-----------------------------------------------------------
+set +e
+echo 'set extractSubset=1; set doExtractSubsets=1;' | ${tools_dir}/codes_bufr_filter - aaen_55.bufr > $fLog 2>&1
+status=$?
+set -e
+[ $status -ne 0 ]
+grep -q "Could not extract subset" $fLog
+rm -f $fLog
+
#-----------------------------------------------------------
# Test: extract subsets uncompressed data
#-----------------------------------------------------------
|
COIL: Rename comments in BB retimer
Rename i2c comments in the BB retimer to reflect current naming
conventions.
BRANCH=None
TEST=make -j buildall | @@ -54,7 +54,7 @@ static int bb_retimer_read(const struct usb_mux *me,
while (1) {
/*
* Read sequence
- * Slave Addr(w) - Reg offset - repeated start - Slave Addr(r)
+ * Addr flags (w) - Reg offset - repeated start - Addr flags(r)
* byte[0] : Read size
* byte[1:4] : Data [LSB -> MSB]
* Stop
@@ -89,7 +89,7 @@ static int bb_retimer_write(const struct usb_mux *me,
/*
* Write sequence
- * Slave Addr(w)
+ * Addr flags(w)
* byte[0] : Reg offset
* byte[1] : Write Size
* byte[2:5] : Data [LSB -> MSB]
|
Add partial documentation to rtc.h | @@ -46,9 +46,29 @@ typedef struct SceRtcTick {
} SceRtcTick;
unsigned int sceRtcGetTickResolution(void);
+
+
int sceRtcGetCurrentTick(SceRtcTick *tick);
+
+/**
+ * Get current real time clock time.
+ *
+ * @param[out] time - see ::SceDateTime.
+ * @param[in] time_zone - The time zone the return value will be.
+ *
+ * @return 0 on success, < 0 on error.
+ */
int sceRtcGetCurrentClock(SceDateTime *time, int time_zone);
+
+/**
+ * Get current real time clock time with system time zone.
+ *
+ * @param[out] time - see ::SceDateTime.
+ *
+ * @return 0 on success, < 0 on error.
+ */
int sceRtcGetCurrentClockLocalTime(SceDateTime *time);
+
int sceRtcGetCurrentNetworkTick(SceRtcTick *tick);
int sceRtcConvertUtcToLocalTime(const SceRtcTick *utc, SceRtcTick *local_time);
int sceRtcConvertLocalTimeToUtc(const SceRtcTick *local_time, SceRtcTick *utc);
@@ -90,12 +110,68 @@ int sceRtcParseDateTime(SceRtcTick *utc, const char *pszDateTime);
int sceRtcParseRFC3339(SceRtcTick *utc, const char *pszDateTime);
/* Inline SceDateTime Getters */
+
+/**
+ * Get current year.
+ *
+ * @param[in] time - see ::SceDateTime.
+ *
+ * @return Current year.
+ */
static inline int sceRtcGetYear(const SceDateTime *time){return time->year;}
+
+/**
+ * Get current month.
+ *
+ * @param[in] time - see ::SceDateTime.
+ *
+ * @return Current month.
+ */
static inline int sceRtcGetMonth(const SceDateTime *time){return time->month;}
+
+/**
+ * Get current day.
+ *
+ * @param[in] time - see ::SceDateTime.
+ *
+ * @return Current day.
+ */
static inline int sceRtcGetDay(const SceDateTime *time){return time->day;}
+
+/**
+ * Get current hour.
+ *
+ * @param[in] time - see ::SceDateTime.
+ *
+ * @return Current hour.
+ */
static inline int sceRtcGetHour(const SceDateTime *time){return time->hour;}
+
+/**
+ * Get current minute.
+ *
+ * @param[in] time - see ::SceDateTime.
+ *
+ * @return Current minute.
+ */
static inline int sceRtcGetMinute(const SceDateTime *time){return time->minute;}
+
+/**
+ * Get current second.
+ *
+ * @param[in] time - see ::SceDateTime.
+ *
+ * @return Current second.
+ */
static inline int sceRtcGetSecond(const SceDateTime *time){return time->second;}
+
+/**
+ * Get current microsecond.
+ *
+ * @param[in] time - see ::SceDateTime.
+ *
+ * @return Current microsecond.
+ */
static inline int sceRtcGetMicrosecond(const SceDateTime *time){return (int)time->microsecond;}
/* Inline SceDateTime Setters */
|
removing throttle test for library dependency on certain platforms | @@ -1654,7 +1654,6 @@ sandbox_programs = \
sandbox/symsync_eqlms_test \
sandbox/svd_test \
sandbox/thiran_allpass_iir_test \
- sandbox/throttle_test \
sandbox/vectorcf_test \
# sandbox/packetizer_persistent_ber_test
@@ -1662,6 +1661,7 @@ sandbox_programs = \
# sandbox/ofdmoqam_firpfbch_cfo_test
# sandbox/mdct_test
# sandbox/fct_test
+# sandbox/throttle_test # needs -lrt for certain gcc versions, rpi3
sandbox_objects = $(patsubst %,%.o,$(sandbox_programs))
|
Fix sceKernelChangeCurrentThreadAttr proto | @@ -214,12 +214,12 @@ int sceKernelDelayThreadCB(SceUInt delay);
/**
* Modify the attributes of the current thread.
*
- * @param unknown - Set to 0.
- * @param attr - The thread attributes to modify. One of ::SceThreadAttributes.
+ * @param clearAttr - The thread attributes to clear. One of ::SceThreadAttributes.
+ * @param setAttr - The thread attributes to set. One of ::SceThreadAttributes.
*
* @return < 0 on error.
*/
-int sceKernelChangeCurrentThreadAttr(int unknown, SceUInt attr);
+int sceKernelChangeCurrentThreadAttr(SceUInt clearAttr, SceUInt setAttr);
/**
* Change the threads current priority.
|
Fixed reference POC indexing | @@ -1135,13 +1135,23 @@ static void search_frac(inter_search_info_t *info)
if (src.malloc_used) free(src.buffer);
}
-
+/**
+* \brief Calculate the scaled MV
+*/
static INLINE int16_t get_scaled_mv(int16_t mv, int scale)
{
int32_t scaled = scale * mv;
return CLIP(-32768, 32767, (scaled + 127 + (scaled < 0)) >> 8);
}
-
+/**
+* \brief Scale the MV according to the POC difference
+*
+* \param current_poc POC of current frame
+* \param current_ref_poc POC of reference frame
+* \param neighbor_poc POC of neighbor frame
+* \param neighbor_ref_poc POC of neighbors reference frame
+* \param mv_cand MV candidates to scale
+*/
static void apply_mv_scaling(int32_t current_poc,
int32_t current_ref_poc,
int32_t neighbor_poc,
@@ -1242,7 +1252,14 @@ static void search_pu_inter_ref(inter_search_info_t *info,
mv.x = ref_cu->inter.mv[1][0];
mv.y = ref_cu->inter.mv[1][1];
}
+ // Apply mv scaling if neighbor poc is available
if (info->state->frame->ref_LX_size[ref_list] > 0) {
+ // When there are reference pictures from the future (POC > current POC)
+ // in L0 or L1, the primary list for the colocated PU is the inverse of
+ // collocated_from_l0_flag. Otherwise it is equal to reflist.
+ //
+ // Kvazaar always sets collocated_from_l0_flag so the list is L1 when
+ // there are future references.
int col_list = ref_list;
for (int i = 0; i < info->state->frame->ref->used_size; i++) {
if (info->state->frame->ref->pocs[i] > info->state->frame->poc) {
@@ -1250,19 +1267,20 @@ static void search_pu_inter_ref(inter_search_info_t *info,
break;
}
}
-
if ((ref_cu->inter.mv_dir & (col_list + 1)) == 0) {
// Use the other list if the colocated PU does not have a MV for the
// primary list.
col_list = 1 - col_list;
}
+ uint8_t neighbor_poc_index = info->state->frame->ref_LX[ref_list][LX_idx];
+ // Scaling takes current POC, reference POC, neighbor POC and neighbor reference POC as argument
apply_mv_scaling(
info->state->frame->poc,
- info->state->frame->ref->pocs[temp_ref_idx],
info->state->frame->ref->pocs[info->state->frame->ref_LX[ref_list][LX_idx]],
- info->state->frame->ref->images[info->state->frame->ref_LX[ref_list][LX_idx]]->ref_pocs[
- info->state->frame->ref->ref_LXs[info->state->frame->ref_LX[ref_list][LX_idx]]
+ info->state->frame->ref->pocs[neighbor_poc_index],
+ info->state->frame->ref->images[neighbor_poc_index]->ref_pocs[
+ info->state->frame->ref->ref_LXs[neighbor_poc_index]
[col_list]
[ref_cu->inter.mv_ref[col_list]]
],
|
Fix for hse_kvs_prefix_delete() comment | @@ -438,20 +438,14 @@ hse_kvs_delete(
size_t key_len);
/**
- * Delete all KV pairs matching the given prefix filter from a KVS
- *
- * The primary utility of this interface is to delete an entire range of multi-segment
- * keys. To do this the caller passes a filter with a length greater than or equal to
- * the KVS's key prefix length. It is not an error if no keys exist matching the
- * filter. If there is a filtered iteration in progress, then that iteration can fail if
- * hse_kvs_prefix_delete() is called with a filter matching the iteration. See the
- * section on transactions for information on how deletes within transactions are
- * handled. This function is thread safe.
- *
- * This function may also be used on a KVS with non-segmented keys, or with a filter
- * length less than the key prefix length on a KVS with multi-segment keys. It is a
- * simple and compact way of removing a range of KV pairs with keys matching the prefix
- * filter.
+ * Delete all KV pairs matching the key prefix from a KVS storing multi-segment keys
+ *
+ * This interface is used to delete an entire range of multi-segment keys. To do this
+ * the caller passes a filter with a length equal to the KVS's key prefix length. It is
+ * not an error if no keys exist matching the filter. If there is a filtered iteration
+ * in progress, then that iteration can fail if hse_kvs_prefix_delete() is called with a
+ * filter matching the iteration. See the section on transactions for information on how
+ * deletes within transactions are handled. This function is thread safe.
*
* @param kvs: KVS handle from hse_kvdb_kvs_open()
* @param opspec: KVDB op struct
|
py/misc.h: Add missing semi-colon in mp_float_union_t for big-endian.
Fixes issue | @@ -248,7 +248,7 @@ typedef union _mp_float_union_t {
} p;
#else
struct {
- mp_float_uint_t sgn : 1
+ mp_float_uint_t sgn : 1;
mp_float_uint_t exp : MP_FLOAT_EXP_BITS;
mp_float_uint_t frc : MP_FLOAT_FRAC_BITS;
} p;
|
gsettings: avoid ksDup on subscription keysets | @@ -424,8 +424,10 @@ static void elektra_settings_key_changed (GDBusConnection * connection G_GNUC_UN
ElektraSettingsBackend * esb = (ElektraSettingsBackend *) user_data;
// TODO: mpranj, maybe dup is not needed? (or can it result in a race?)
- GElektraKeySet * gks_keys = gelektra_keyset_dup (esb->subscription_gks_keys);
- GElektraKeySet * gks_paths = gelektra_keyset_dup (esb->subscription_gks_paths);
+ // GElektraKeySet * gks_keys = gelektra_keyset_dup (esb->subscription_gks_keys);
+ // GElektraKeySet * gks_paths = gelektra_keyset_dup (esb->subscription_gks_paths);
+ GElektraKeySet * gks_keys = esb->subscription_gks_keys;
+ GElektraKeySet * gks_paths = esb->subscription_gks_paths;
const gchar * gsettingspath = g_strdup (g_strstr_len (g_strstr_len (keypathname, -1, "/") + 1, -1, "/"));
g_log (G_LOG_DOMAIN, G_LOG_LEVEL_DEBUG, "%s %s", "keypathname: ", keypathname);
|
Cleanup, reorder some memory reads/writes | @@ -441,12 +441,13 @@ END_OPERATOR
BEGIN_OPERATOR(delay)
LOWERCASE_REQUIRES_BANG;
- PORT(0, 1, IN);
PORT(0, -1, IN | PARAM);
+ PORT(0, 1, IN);
PORT(1, 0, OUT);
- Usz offset = index_of(PEEK(0, 1));
Usz rate = index_of(PEEK(0, -1));
- rate = (rate == 0) ? 1 : rate;
+ Usz offset = index_of(PEEK(0, 1));
+ if (rate == 0)
+ rate = 1;
Glyph g = (Tick_number + offset) % rate == 0 ? '*' : '.';
POKE(1, 0, g);
END_OPERATOR
@@ -558,12 +559,13 @@ END_OPERATOR
BEGIN_OPERATOR(push)
LOWERCASE_REQUIRES_BANG;
- Usz len = index_of(PEEK(0, -1));
Usz key = index_of(PEEK(0, -2));
+ Usz len = index_of(PEEK(0, -1));
PORT(0, -1, IN | PARAM);
PORT(0, -2, IN | PARAM);
PORT(0, 1, IN);
- if (len==0) return;
+ if (len == 0)
+ return;
Isz out_x = (Isz)(key % len);
for (Usz i = 0; i < len; ++i) {
LOCK(1, (Isz)i);
@@ -626,11 +628,12 @@ END_OPERATOR
BEGIN_OPERATOR(track)
LOWERCASE_REQUIRES_BANG;
- Usz len = index_of(PEEK(0, -1));
Usz key = index_of(PEEK(0, -2));
- PORT(0, -1, IN | PARAM);
+ Usz len = index_of(PEEK(0, -1));
PORT(0, -2, IN | PARAM);
- if (len == 0) return;
+ PORT(0, -1, IN | PARAM);
+ if (len == 0)
+ return;
Isz read_val_x = (Isz)(key % len) + 1;
for (Usz i = 0; i < len; ++i) {
LOCK(0, (Isz)(i + 1));
@@ -695,10 +698,10 @@ END_OPERATOR
BEGIN_OPERATOR(teleport)
LOWERCASE_REQUIRES_BANG;
- Isz out_y = (Isz)index_of(PEEK(0, -1)) + 1;
Isz out_x = (Isz)index_of(PEEK(0, -2));
- PORT(0, -1, IN | PARAM); // y
+ Isz out_y = (Isz)index_of(PEEK(0, -1)) + 1;
PORT(0, -2, IN | PARAM); // x
+ PORT(0, -1, IN | PARAM); // y
PORT(0, 1, IN);
PORT(out_y, out_x, OUT | NONLOCKING);
POKE_STUNNED(out_y, out_x, PEEK(0, 1));
|
vpd: Force static analysis to not think about NULL term strings | @@ -204,7 +204,7 @@ static void *vpd_lid_preload(const uint8_t *lx)
void vpd_iohub_load(struct dt_node *hub_node)
{
- char record[4] = "LXR0";
+ uint8_t record[4] = { 'L','X','R','0' }; /* not null terminated */
const void *valid_lx;
uint8_t lx_size;
int r;
|
much safer -> generally much safer | @@ -52,10 +52,10 @@ plaintext. Crucially, an attacker has no control over this random garbage.
For applications that are using SCRAM to simply encrypt bulk data, this kind of
application failure still results in data corruption. But for applications that
are using SCRAM to encrypt data that must conform to a schema, or data that
-contains instructions, this kind of application failure is much safer. Without
-any control over the data that is decrypted, an attacker's ability to abuse the
-application failure, or to find meaningful decryption or message forgery oracles
-is severely limited.
+contains instructions, this kind of application failure is generally much
+safer. Without any control over the data that is decrypted, an attacker's
+ability to abuse the application failure, or to find meaningful decryption or
+message forgery oracles is severely limited.
## Integration of message padding into the AEAD layer
|
Fix Ip6ReverseName buffer length | @@ -371,7 +371,7 @@ PPH_STRING PhpGetIp6ReverseNameFromAddress(
{
PH_STRING_BUILDER stringBuilder;
- PhInitializeStringBuilder(&stringBuilder, 32);
+ PhInitializeStringBuilder(&stringBuilder, DNS_MAX_NAME_BUFFER_LENGTH);
for (INT i = sizeof(IN6_ADDR) - 1; i >= 0; i--)
{
@@ -753,10 +753,10 @@ VOID PhNetworkProviderUpdate(
PROCESS_EXTENDED_BASIC_INFORMATION basicInfo;
// HACK HACK HACK
- // WSL subsystem processes (e.g. nginx) create sockets, clone/fork themselves, duplicate the socket into the child process and then terminate.
+ // WSL subsystem processes (e.g. apache/nginx) create sockets, clone/fork themselves, duplicate the socket into the child process and then terminate.
// The socket handle remains valid and in-use by the child process BUT the socket continues returning the PID of the exited process???
// Fixing this causes a major performance problem; If we have 100,000 sockets then on previous versions of Windows we would only need 2 system calls maximum
- // (for the process list) to identify the owner of every socket but now we need to make 4 system calls for every_last_socket totaling 400,000 system calls... great.
+ // (for the process list) to identify the owner of every socket but now we need to make 4 system calls for every_last_socket totaling 400,000 system calls... great. (dmex)
if (NT_SUCCESS(PhOpenProcess(&processHandle, PROCESS_QUERY_LIMITED_INFORMATION, networkItem->ProcessId)))
{
if (NT_SUCCESS(PhGetProcessExtendedBasicInformation(processHandle, &basicInfo)))
|
Travis: Disable crypto plugins on macOS 10.11 | @@ -56,8 +56,9 @@ before_script:
python3_ver=$(python3 -c 'import sys; print(".".join(map(str, sys.version_info[:2])))') &&
CMAKE_OPT+=("-DPYTHON_INCLUDE_DIR:PATH=$(python3-config --prefix)/include/python${python3_ver}m") &&
CMAKE_OPT+=("-DPYTHON_LIBRARY:FILEPATH=$(python3-config --prefix)/lib/libpython${python3_ver}.dylib");
+ if [[ $(uname -r | cut -d "." -f 1) == 15 ]]; then plugins="ALL;-CRYPTO"; fi;
fi
- - cmake -DBUILD_STATIC=OFF -DPLUGINS=ALL -DBINDINGS=ALL -DTOOLS=ALL -DCMAKE_INSTALL_PREFIX=$TRAVIS_BUILD_DIR/../install -DKDB_DB_SYSTEM=$TRAVIS_BUILD_DIR/../kdbsystem ${CMAKE_OPT[@]} $TRAVIS_BUILD_DIR
+ - cmake -DBUILD_STATIC=OFF -DPLUGINS="${plugins:-ALL}" -DBINDINGS=ALL -DTOOLS=ALL -DCMAKE_INSTALL_PREFIX=$TRAVIS_BUILD_DIR/../install -DKDB_DB_SYSTEM=$TRAVIS_BUILD_DIR/../kdbsystem ${CMAKE_OPT[@]} $TRAVIS_BUILD_DIR
script:
- make -j3
|
Use highp in vertex shaders on GLES; | @@ -2017,8 +2017,8 @@ static char* lovrShaderGetFlagCode(ShaderFlag* flags, uint32_t flagCount) {
Shader* lovrShaderInitGraphics(Shader* shader, const char* vertexSource, const char* fragmentSource, ShaderFlag* flags, uint32_t flagCount) {
#if defined(LOVR_WEBGL) || defined(LOVR_GLES)
- const char* vertexHeader = "#version 300 es\nprecision mediump float;\nprecision mediump int;\n";
- const char* fragmentHeader = vertexHeader;
+ const char* vertexHeader = "#version 300 es\nprecision highp float;\nprecision highp int;\n";
+ const char* fragmentHeader = "#version 300 es\nprecision mediump float;\nprecision mediump int;\n";
#else
const char* vertexHeader = state.features.compute ? "#version 430\n" : "#version 150\n";
const char* fragmentHeader = "#version 150\n";
|
autotest: using freqresponse() method for testing firfilt | @@ -317,12 +317,14 @@ int liquid_autotest_validate_psd_signalf(float * _buf, unsigned int _buf_len,
int liquid_autotest_validate_psd_firfilt_crcf(firfilt_crcf _q, unsigned int _nfft,
autotest_psd_s * _regions, unsigned int num_regions, const char * debug_filename)
{
- unsigned int n = firfilt_crcf_get_length(_q);
- float h[n];
- firfilt_crcf_copy_coefficients(_q, h);
- float scale;
- firfilt_crcf_get_scale(_q, &scale);
- liquid_vectorf_mulscalar(h, n, scale, h);
- return liquid_autotest_validate_psd_signalf(h,n,_regions,num_regions,debug_filename);
+ float psd[_nfft];
+ unsigned int i;
+ for (i=0; i<_nfft; i++) {
+ float f = (float)(i)/(float)(_nfft) - 0.5f;
+ float complex H;
+ firfilt_crcf_freqresponse(_q, f, &H);
+ psd[i] = 20*log10f(cabsf(H));
+ }
+ return liquid_autotest_validate_spectrum(psd,_nfft,_regions,num_regions,debug_filename);
}
|
Switch back to well tested RNG. | @@ -83,12 +83,13 @@ void janet_rng_longseed(JanetRNG *rng, const uint8_t *bytes, int32_t len) {
rng->c = state[8] + (state[9] << 8) + (state[10] << 16) + (state[11] << 24);
rng->d = state[12] + (state[13] << 8) + (state[14] << 16) + (state[15] << 24);
rng->counter = 0u;
+ /* a, b, c, d can't all be 0 */
+ if (rng->a == 0) rng->a = 1;
for (int i = 0; i < 16; i++) janet_rng_u32(rng);
}
uint32_t janet_rng_u32(JanetRNG *rng) {
/* Algorithm "xorwow" from p. 5 of Marsaglia, "Xorshift RNGs" */
- /* Modified to remove constraint that a, b, c, d != 0 */
uint32_t t = rng->d;
uint32_t const s = rng->a;
rng->d = rng->c;
@@ -97,7 +98,7 @@ uint32_t janet_rng_u32(JanetRNG *rng) {
t ^= t >> 2;
t ^= t << 1;
t ^= s ^ (s << 4);
- rng->a = t + 33;
+ rng->a = t;
rng->counter += 362437;
return t + rng->counter;
}
|
GRIB: key 'level' not equal to 'mars.levelist' for soil levels | @@ -82,11 +82,13 @@ if (extraDim) {
}
}
-# See ECC-854, ECC-1435
+# See ECC-854, ECC-1435, ECC-1451
if( (typeOfFirstFixedSurface == 151 && typeOfSecondFixedSurface == 151) ||
(typeOfFirstFixedSurface == 152 && typeOfSecondFixedSurface == 152) ||
(typeOfFirstFixedSurface == 114 && typeOfSecondFixedSurface == 114) ) {
alias mars.levelist = bottomLevel;
+ alias ls.level = bottomLevel;
+ alias vertical.level = bottomLevel;
}
alias ls.typeOfLevel=typeOfLevel;
|
IPSEC: correctly size per-thread data | @@ -316,7 +316,7 @@ ipsec_init (vlib_main_t * vm)
i->op_type = VNET_CRYPTO_OP_SHA512_HMAC;
i->trunc_size = 32;
- vec_validate_aligned (im->ptd, vec_len (vlib_mains), CLIB_CACHE_LINE_BYTES);
+ vec_validate_aligned (im->ptd, vlib_num_workers (), CLIB_CACHE_LINE_BYTES);
return 0;
}
|
Check validity, not just signing for all certificates | @@ -2768,8 +2768,8 @@ void ssl_set_masks(SSL *s)
#endif
rsa_enc = pvalid[SSL_PKEY_RSA] & CERT_PKEY_VALID;
- rsa_sign = pvalid[SSL_PKEY_RSA] & CERT_PKEY_SIGN;
- dsa_sign = pvalid[SSL_PKEY_DSA_SIGN] & CERT_PKEY_SIGN;
+ rsa_sign = pvalid[SSL_PKEY_RSA] & CERT_PKEY_VALID;
+ dsa_sign = pvalid[SSL_PKEY_DSA_SIGN] & CERT_PKEY_VALID;
#ifndef OPENSSL_NO_EC
have_ecc_cert = pvalid[SSL_PKEY_ECC] & CERT_PKEY_VALID;
#endif
|
change back to sqrt rescaling | @@ -966,11 +966,10 @@ static void maybe_update_scale(ScsWork *w, const ScsResiduals *r,
w->sum_log_scale_factor += log(relative_res_pri) - log(relative_res_dual);
w->n_log_scale_factor++;
- /*
factor = SQRTF(exp(w->sum_log_scale_factor /
(scs_float)(w->n_log_scale_factor)));
- */
- factor = exp(w->sum_log_scale_factor / (scs_float)(w->n_log_scale_factor));
+
+ // factor = exp(w->sum_log_scale_factor / (scs_float)(w->n_log_scale_factor));
#if EXTRA_VERBOSE > 5
scs_printf("relative_res_pri %.2e, relative_res_dual %.2e, factor %4f\n",
|
Cache the cache... | language: objective-c
+
+env:
+ global:
+ - HXCPP_COMPILE_CACHE=~/hxcache
+
+cache:
+ directories:
+ - $HXCPP_COMPILE_CACHE
+
before_install:
- travis_retry brew install neko --HEAD
- wget -c https://github.com/HaxeFoundation/haxe/releases/download/3.4.2/haxe-3.4.2-osx.tar.gz
|
Solve minor bug in docker for gitlab. | @@ -22,12 +22,12 @@ version: "3.7"
services:
deps:
build:
- cache_from: registry.gitlab.com/metacall/core:deps
+ cache_from: "registry.gitlab.com/metacall/core:deps"
dev:
build:
- cache_from: registry.gitlab.com/metacall/core:dev
+ cache_from: "registry.gitlab.com/metacall/core:dev"
core:
build:
- cache_from: registry.gitlab.com/metacall/core:latest
+ cache_from: "registry.gitlab.com/metacall/core:latest"
|
Fix problem running unit regression tests on Windows.
Path-separator escaping is no longer working correctly.
Think its related to python3 change, but sending in unix-style paths in this instance works on Windows. | @@ -2803,6 +2803,7 @@ SILO_MODE = TestEnv.SILO_MODE
# Run our test script using "Source"
#
import visit
-visit.Source(TestEnv.params["script"])
+from pathlib import Path
+visit.Source(Path(TestEnv.params["script"]).as_posix())
|
correct the env order | @@ -49,7 +49,7 @@ static void build_exec_stack(heap sh, thread t, Elf64_Ehdr * e, void *start, u64
spush(s, auxp[i].tag);
}
spush(s, 0);
- for (int i = 0; i< envc; i++) spush(s, envp[i]);
+ for (int i = envc - 1; i >= 0; i--) spush(s, envp[i]);
spush(s, 0);
for (int i = argc - 1; i >= 0; i--) spush(s, argv[i]);
spush(s, argc);
|
Add window icon for services | @@ -118,6 +118,22 @@ VOID PhShowServiceProperties(
propSheetHeader.nStartPage = 0;
propSheetHeader.phpage = pages;
+ {
+ if (ServiceItem->SmallIcon)
+ propSheetHeader.hIcon = ServiceItem->SmallIcon;
+ else
+ {
+ if (ServiceItem->Type == SERVICE_KERNEL_DRIVER || ServiceItem->Type == SERVICE_FILE_SYSTEM_DRIVER)
+ propSheetHeader.hIcon = PH_LOAD_SHARED_ICON_SMALL(PhInstanceHandle, MAKEINTRESOURCE(IDI_COG));
+ else
+ {
+ HICON iconSmall;
+ PhGetStockApplicationIcon(&iconSmall, NULL);
+ propSheetHeader.hIcon = iconSmall;
+ }
+ }
+ }
+
// General
memset(&context, 0, sizeof(SERVICE_PROPERTIES_CONTEXT));
|
OpenVR: Default haptic frequency to 1Hz; | @@ -434,7 +434,12 @@ static bool openvr_getAxis(Device device, DeviceAxis axis, vec3 value) {
}
static bool openvr_vibrate(Device device, float strength, float duration, float frequency) {
- if (duration <= 0 || (device != DEVICE_HAND_LEFT && device != DEVICE_HAND_RIGHT)) return false;
+ if (duration <= 0.f || (device != DEVICE_HAND_LEFT && device != DEVICE_HAND_RIGHT)) return false;
+
+ if (frequency <= 0.f) {
+ frequency = 1.f;
+ }
+
state.input->TriggerHapticVibrationAction(state.hapticActions[device - DEVICE_HAND_LEFT], 0.f, duration, frequency, strength, 0);
return true;
}
|
clay: remove debug artifacts | [+<- +<+>-] :: cache.state
::
++ ford
- ::!. :: TODO: reinstate
+ !.
=> |%
+$ build
$% [%file =path]
:: ford
::
++ read-a
- ::!. TODO reinstate
+ !.
|= [=aeon =path]
^- [(unit (unit (each cage lobe))) ford-cache]
?. =(aeon let.dom)
:_(fod.dom [~ ~ %& %vase !>(vase)])
::
++ read-b
- ::!. TODO reinstate
+ !.
|= [=aeon =path]
^- [(unit (unit (each cage lobe))) ford-cache]
?. =(aeon let.dom)
:_(fod.dom [~ ~ %& %dais !>(dais)])
::
++ read-c
- ::!. TODO reinstate
+ !.
|= [=aeon =path]
^- [(unit (unit (each cage lobe))) ford-cache]
?. =(aeon let.dom)
[~ fod]
:: virtualize to catch and produce deterministic failures
::
- ::!. TODO reinstate
+ !.
=- ?:(?=(%& -<) p.- ((slog p.-) [[~ ~] fod]))
%- mule |.
?- care.mun
|
Adds apache license badge | @@ -16,11 +16,12 @@ limitations under the License.
-->
# Apache Celix
-
+[](https://opensource.org/licenses/Apache-2.0)


[](https://codecov.io/gh/apache/celix)
[](https://scan.coverity.com/projects/6685)
+
Apache Celix is an implementation of the OSGi specification adapted to C and C++ (C++11). It is a framework to develop (dynamic) modular software applications using component and/or service-oriented programming.
|
rmfreq: contrast change option | @@ -45,10 +45,12 @@ int main_rmfreq(int argc, char* argv[argc])
};
unsigned int n_harmonics = 5;
+ const char* mod_file = NULL;
const struct opt_s opts[] = {
OPT_UINT('N', &n_harmonics, "#", "Number of harmonics [Default: 5]"),
+ OPT_STRING('M', &mod_file, "file", "Contrast modulation file"),
};
cmdline(&argc, argv, ARRAY_SIZE(args), args, help_str, ARRAY_SIZE(opts), opts);
@@ -71,6 +73,16 @@ int main_rmfreq(int argc, char* argv[argc])
if (!md_check_equal_dims(DIMS, t_dims, k_dims, ~(READ_FLAG|PHS1_FLAG|COIL_FLAG)))
error("k-space and trajectory inconsistent!\n");
+ // Modulation file
+ long mod_dims[DIMS];
+ complex float* mod = NULL;
+ if (NULL != mod_file) {
+
+ mod = load_cfl(mod_file, DIMS, mod_dims);
+ assert(md_check_equal_dims(DIMS, k_dims, mod_dims, ~(COIL_FLAG)));
+ assert(mod_dims[COIL_DIM] == 1);
+ }
+
// Calculate angles from trajectory
long angles_dims[DIMS];
@@ -140,12 +152,24 @@ int main_rmfreq(int argc, char* argv[argc])
complex float* k_singleton = md_alloc(DIMS, k_singleton_dims, CFL_SIZE);
-
long n_part_singleton_dims[DIMS];
md_select_dims(DIMS, ~SLICE_FLAG, n_part_singleton_dims, n_dims);
complex float* n_part_singleton = md_alloc(DIMS, n_part_singleton_dims, CFL_SIZE);
+ /* Account for contrast change */
+ if (mod_file != NULL) {
+ assert(md_check_equal_dims(DIMS, n_dims, mod_dims, ~(MD_BIT(LAST_DIM))));
+
+ long n_strs[DIMS];
+ md_calc_strides(DIMS, n_strs, n_dims, CFL_SIZE);
+ long mod_strs[DIMS];
+ md_calc_strides(DIMS, mod_strs, mod_dims, CFL_SIZE);
+
+ md_zmul2(DIMS, n_dims, n_strs, n, n_strs, n, mod_strs, mod);
+
+ unmap_cfl(DIMS, mod_dims, CFL_SIZE);
+ }
long pinv_dims[DIMS];
md_transpose_dims(DIMS, TIME_DIM, LAST_DIM, pinv_dims, n_part_singleton_dims);
|
NetKVM: Use 'enum class' instead of 'enum' (CA warning 26812)
Update MiniportState enum | @@ -351,7 +351,7 @@ public:
CMiniportStateMachine& operator= (const CMiniportStateMachine&) = delete;
private:
- using MiniportState = enum
+ enum class MiniportState
{
Halted,
Running,
|
Remove Device dependency from Resource | @@ -1422,14 +1422,12 @@ StateChange::State StateChange::tick(Resource *r, deCONZ::ApsController *apsCtrl
}
auto rParent = r->parentResource() ? r->parentResource() : r;
- auto *device = static_cast<Device*>(rParent);
- Q_ASSERT(device);
Q_ASSERT(rParent);
Q_ASSERT(m_stateTimer.isValid());
Q_ASSERT(m_changeTimer.isValid());
- if (m_state == StateWaitSync && device->reachable())
+ if (m_state == StateWaitSync && rParent->item(RConfigReachable)->toBool())
{
if (m_stateTimer.elapsed() > m_stateTimeoutMs)
{
|
cmd/common: Add TransformIntoTable helper to GadgetParser | @@ -101,6 +101,14 @@ func (p *GadgetParser[T]) TransformIntoColumns(entry *T) string {
return p.formatter.FormatEntry(entry)
}
+func (p *GadgetParser[T]) TransformIntoTable(entries []*T) string {
+ // Disable auto-scaling as AdjustWidthsToContent will already manage the
+ // screen size.
+ p.formatter.SetAutoScale(false)
+ p.formatter.AdjustWidthsToContent(entries, true, textcolumns.GetTerminalWidth(), true)
+ return p.formatter.FormatTable(entries)
+}
+
func (p *GadgetParser[T]) Sort(entries []*T, sortBy []string) {
sort.SortEntries(p.colsMap, entries, sortBy)
}
|
revert (msgbox) revert incorrect button padding fix. | @@ -126,10 +126,8 @@ lv_obj_t * lv_msgbox_create(lv_obj_t * parent, const char * title, const char *
}
const lv_font_t * font = lv_obj_get_style_text_font(mbox->btns, LV_PART_ITEMS);
- /* Prevent low values of LV_DPI_DEF breaking button padding */
- lv_coord_t btn_pad = (LV_DPI_DEF < 130) ? 130 : LV_DPI_DEF;
- lv_coord_t btn_h = lv_font_get_line_height(font) + btn_pad / 10;
- lv_obj_set_size(mbox->btns, btn_cnt * (2 * btn_pad / 3), btn_h);
+ lv_coord_t btn_h = lv_font_get_line_height(font) + LV_DPI_DEF / 10;
+ lv_obj_set_size(mbox->btns, btn_cnt * (2 * LV_DPI_DEF / 3), btn_h);
lv_obj_set_style_max_width(mbox->btns, lv_pct(100), 0);
lv_obj_add_flag(mbox->btns, LV_OBJ_FLAG_EVENT_BUBBLE); /*To see the event directly on the message box*/
}
|
pbsys/bluetooth: Fix definitions when unused.
pbsys_bluetooth_rx_get_available is used as a function
with pbsys_bluetooth_rx / pbsys_bluetooth_tx used as defines we get
unused parameter warnings for static variables. | @@ -28,9 +28,14 @@ pbio_error_t pbsys_bluetooth_tx(const uint8_t *data, uint32_t *size);
#define pbsys_bluetooth_init()
#define pbsys_bluetooth_rx_set_callback(callback)
-#define pbsys_bluetooth_rx_get_available 0
-#define pbsys_bluetooth_rx(data, size) PBIO_ERROR_NOT_SUPPORTED
-#define pbsys_bluetooth_tx(data, size) PBIO_ERROR_NOT_SUPPORTED
+#define pbsys_bluetooth_rx_get_available() 0
+
+static inline pbio_error_t pbsys_bluetooth_rx(uint8_t *data, uint32_t *size) {
+ return PBIO_ERROR_NOT_SUPPORTED;
+}
+static inline pbio_error_t pbsys_bluetooth_tx(const uint8_t *data, uint32_t *size) {
+ return PBIO_ERROR_NOT_SUPPORTED;
+}
#endif // PBSYS_CONFIG_BLUETOOTH
|
OpenSSL::Ordinals: when validating, collect statistics on unassigned syms
If a script wants to display how many symbols have assigned numbers
and how many don't, this gives them those numbers. | @@ -662,6 +662,11 @@ sub validate {
&& @{$self->{contents}->[$i] // []})) {
$self->{stats}->{new}++;
}
+ if ($i <= $self->{maxassigned}) {
+ $self->{stats}->{assigned}++;
+ } else {
+ $self->{stats}->{unassigned}++;
+ }
next if ($i > $self->{loaded_maxnum});
my @loaded_strings =
|
Add ya tool llvm-profdata. | "c++": { "bottle": "clang7", "executable": "c++" },
"c++filt": { "bottle": "clang7", "executable": "c++filt" },
"cc": { "bottle": "clang7", "executable": "cc" },
+ "clang-format": { "bottle": "clang7", "executable": "clang-format" },
+ "clang-tidy": { "bottle": "clang7", "executable": "clang-tidy" },
"gcov": { "bottle": "clang7", "executable": "gcov" },
"llvm-cov": { "bottle": "clang7", "executable": "llvm-cov" },
+ "llvm-profdata": { "bottle": "clang7", "executable": "llvm-profdata" },
"llvm-symbolizer": { "bottle": "clang7", "executable": "llvm-symbolizer" },
"nm": { "bottle": "clang7", "executable": "nm" },
"strip": { "bottle": "clang7", "executable": "strip" }
"gcc_version": "6.0"
}
},
- "clang-format": {
- "tools": {
- "clang-format": { "bottle": "clang7", "executable": "clang-format" }
- },
- "platforms": [
- {"host": {"os": "LINUX"}, "default": true},
- {"host": {"os": "FREEBSD"}, "default": true},
- {"host": {"os": "WIN"}, "default": true},
- {"host": {"os": "DARWIN"}, "default": true}
- ]
- },
- "clang-tidy": {
- "tools": {
- "clang-tidy": { "bottle": "clang7", "executable": "clang-tidy" }
- },
- "platforms": [
- { "host": { "os": "LINUX" }, "default": true }
- ]
- },
"bloat": {
"tools": {
"bloat": { "bottle": "bloat", "executable": "bloat2" }
|
Python3 preparation | @@ -29,8 +29,8 @@ def example(csvfile, input_filename, output_filename):
# The first line in the CSV has the column names
print('Reading input CSV file: ', csvfile)
- parse_date = lambda x: datetime.strptime(x, '%Y%m%d')
- parse_time = lambda x: datetime.strptime(x, '%H:%M:%S')
+ parse_date = lambda x: datetime.strptime(x.decode('ascii'), '%Y%m%d')
+ parse_time = lambda x: datetime.strptime(x.decode('ascii'), '%H:%M:%S')
data = np.genfromtxt(csvfile, delimiter=',', dtype=None, names=True,
converters={0: parse_date, 1: parse_time})
|
nimble/ll: Fix typo in ble_ll_read_rf_path_compensation
;; are not needed here | @@ -786,7 +786,7 @@ ble_ll_read_rf_path_compensation(uint8_t *rspbuf, uint8_t *rsplen)
rsp->rx_path_compensation = htole16(rx_path_pwr_compensation);
rsp->tx_path_compensation = htole16(tx_path_pwr_compensation);
- *rsplen = sizeof(*rsp);;
+ *rsplen = sizeof(*rsp);
return BLE_ERR_SUCCESS;
}
|
Remove failing 2.0.2 down-level test | @@ -23,7 +23,7 @@ jobs:
strategy:
fail-fast: false
matrix:
- release: ['2.0.2', '2.1.1']
+ release: ['2.1.1'] # TODO: Put back 2.0.* once fixed
os: [ubuntu-latest, windows-latest]
arch: [x64]
tls: [schannel, openssl]
|
changed the way how to copy the PSL_DCP | @@ -91,9 +91,10 @@ copy $(BUILD_DIR)/Checkpoint/b_route_design.dcp:
@mkdir $(BUILD_DIR)/Images;
@mkdir $(BUILD_DIR)/Checkpoint;
@ln -s $(BUILD_DIR)/Checkpoint $(BUILD_DIR)/Checkpoints;
+ @ln -s $(BUILD_NAME) build;
@ln -s $(DONUT_HARDWARE_ROOT)/setup/noHDK_build.tcl $(BUILD_DIR)/noHDK_build.tcl;
@ln -s $(DONUT_HARDWARE_ROOT)/setup/fw_xpr_build.tcl $(BUILD_DIR)/fw_xpr_build.tcl;
- @cp -ra $(PSL_DCP) $(BUILD_DIR)/Checkpoint/;
+ @cp -p $(PSL_DCP) $(BUILD_DIR)/Checkpoint/;
@if [ $(FPGACARD) = "KU3" ]; then ln -f -s $(DONUT_HARDWARE_ROOT)/hdl/core/psl_fpga_ku3.vhd_source $(DONUT_HARDWARE_ROOT)/hdl/core/psl_fpga.vhd_source; fi
@if [ $(FPGACARD) = "FGT" ]; then ln -f -s $(DONUT_HARDWARE_ROOT)/hdl/core/psl_fpga_fgt.vhd_source $(DONUT_HARDWARE_ROOT)/hdl/core/psl_fpga.vhd_source; fi
|
test-udp: Fix multicast join tests when recv_cb gets called with no data/addr | @@ -199,11 +199,18 @@ return require('lib/tap')(function (test)
assert(not err, err)
p(data, addr)
+ -- empty callback can happen, just return early
+ if data == nil and addr == nil then
+ return
+ end
+
assert(addr)
assert(data == "PING")
recv_cb_called = recv_cb_called + 1
if recv_cb_called == 2 then
+ -- note: because of this conditional close, the test will fail with an unclosed handle if recv_cb_called
+ -- doesn't hit 2, so we don't need to expect(recv_cb) or assert recv_cb_called == 2
server:close()
else
-- udp_set_source_membership added in 1.32.0
@@ -225,7 +232,7 @@ return require('lib/tap')(function (test)
end
end
- server:recv_start(expect(recv_cb, 2))
+ server:recv_start(recv_cb)
assert(client:send("PING", multicast_addr, TEST_PORT, expect(function(err)
assert(not err, err)
|
common/usb_pd_policy.c: Format with clang-format
BRANCH=none
TEST=none | @@ -373,8 +373,8 @@ static int dfp_discover_svids(uint32_t *payload)
return 1;
}
-struct pd_discovery *pd_get_am_discovery_and_notify_access(
- int port, enum tcpci_msg_type type)
+struct pd_discovery *
+pd_get_am_discovery_and_notify_access(int port, enum tcpci_msg_type type)
{
return (struct pd_discovery *)pd_get_am_discovery(port, type);
}
@@ -553,8 +553,7 @@ static int process_am_discover_svids(int port, int cnt, uint32_t *payload,
return dfp_discover_modes(port, payload);
}
-static int process_tbt_compat_discover_modes(int port,
- enum tcpci_msg_type sop,
+static int process_tbt_compat_discover_modes(int port, enum tcpci_msg_type sop,
uint32_t *payload,
enum tcpci_msg_type *rtype)
{
|
use REV on aarch64 for endianness swapping | always_inline u16
clib_byte_swap_u16 (u16 x)
{
+#if defined (__aarch64__)
+ if (!__builtin_constant_p (x))
+ {
+ __asm__ ("rev16 %w0, %w0":"+r" (x));
+ return x;
+ }
+#endif
return (x >> 8) | (x << 8);
}
@@ -74,6 +81,12 @@ clib_byte_swap_u32 (u32 x)
asm volatile ("bswap %0":"=r" (x):"0" (x));
return x;
}
+#elif defined (__aarch64__)
+ if (!__builtin_constant_p (x))
+ {
+ __asm__ ("rev %w0, %w0":"+r" (x));
+ return x;
+ }
#endif
return ((x << 24) | ((x & 0xff00) << 8) | ((x >> 8) & 0xff00) | (x >> 24));
}
@@ -93,6 +106,12 @@ clib_byte_swap_u64 (u64 x)
asm volatile ("bswapq %0":"=r" (x):"0" (x));
return x;
}
+#elif defined (__aarch64__)
+ if (!__builtin_constant_p (x))
+ {
+ __asm__ ("rev %0, %0":"+r" (x));
+ return x;
+ }
#endif
#define _(x,n,i) \
((((x) >> (8*(i))) & 0xff) << (8*((n)-(i)-1)))
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.