message
stringlengths 6
474
| diff
stringlengths 8
5.22k
|
---|---|
Update Configurations-and-Platforms.md | @@ -76,7 +76,7 @@ filter { "platforms:Xbox360" }
Unlike build configurations, platforms are completely optional. If you don't need them, just don't call the platforms function at all and the toolset's default behavior will be used.
-Platforms are just another form of build configuration. You can use all of the same settings, and the same scoping rules apply. You can use the [`system`](system.md) and [`architecture`()`](architecture.md) settings without platforms, and you can use otherwise non-platform settings in a platform configuration. If you've ever done build configurations like "Debug Static", "Debug DLL", "Release Static", and "Release DLL", platforms can really simplify things.
+Platforms are just another form of build configuration. You can use all of the same settings, and the same scoping rules apply. You can use the [`system`](system.md) and [`architecture()`](architecture.md) settings without platforms, and you can use otherwise non-platform settings in a platform configuration. If you've ever done build configurations like "Debug Static", "Debug DLL", "Release Static", and "Release DLL", platforms can really simplify things.
```lua
configurations { "Debug", "Release" }
|
Added wget to tools/configenv.sh as a base package. | @@ -24,7 +24,7 @@ PROGNAME=$(basename $0)
sub_apt(){
cd $ROOT_DIR
echo "configure apt for C build"
- $SUDO_CMD apt-get -y install build-essential git cmake
+ $SUDO_CMD apt-get -y install build-essential git cmake wget
}
# Swig
|
added support for non-standard Multi-ESSID format | @@ -26,6 +26,14 @@ typedef struct cow_head cow_head_t;
/*===========================================================================*/
/* globale Konstante */
+uint8_t zeroessid[] =
+{
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
+};
+#define ZEROESSID_SIZE sizeof(zeroessid)
/*===========================================================================*/
void cowinfo(FILE *fhcowin)
@@ -49,6 +57,13 @@ if(cowh.magic != COWPATTY_SIGNATURE)
return;
}
+
+if((cowh.essidlen == 0) && (memcmp(&cowh.essid, &zeroessid, ZEROESSID_SIZE) == 0) && (cowh.reserved1[2] == 1))
+ {
+ printf("Multi-ESSID file detected\n");
+ return;
+ }
+
if((cowh.essidlen <= 0) || (cowh.essidlen > 32))
{
fprintf(stderr, "wrong essidlen\n");
@@ -86,7 +101,11 @@ if(cowh.magic != COWPATTY_SIGNATURE)
return;
}
-if((cowh.essidlen <= 0) || (cowh.essidlen > 32))
+if((cowh.essidlen == 0) && (memcmp(&cowh.essid, &zeroessid, ZEROESSID_SIZE) == 0) && (cowh.reserved1[2] == 1))
+ printf("Multi-ESSID file detected\n");
+
+
+else if((cowh.essidlen <= 0) || (cowh.essidlen > 32))
{
fprintf(stderr, "wrong essidlen\n");
return;
|
faster hg version
Pull-request for branch users/heretic/hgversion-hot-fix | @@ -143,14 +143,14 @@ def get_svn_scm_data(info):
return scm_data
-def get_hg_info_cmd(arc_root, revision=None, python_cmd=[sys.executable]):
+def get_hg_info_cmd(arc_root, branch=None, python_cmd=[sys.executable]):
ya_path = os.path.join(arc_root, 'ya')
hg_cmd = python_cmd + [ya_path, '-v', '--no-report', 'tool', 'hg']
- if not revision:
- hg_cmd += ['identify', '--id', '--branch']
+ if not branch:
+ hg_cmd += ['branch']
else:
- hg_cmd += ['log', '-r', revision]
- return hg_cmd + [arc_root]
+ hg_cmd += ['log', '-b', branch, '-l1']
+ return hg_cmd
def get_hg_field(hg_info, field):
@@ -166,15 +166,12 @@ def get_hg_dict(arc_root, python_cmd=[sys.executable]):
os.chdir(arc_root)
hg_info = system_command_call(get_hg_info_cmd(arc_root, python_cmd=python_cmd))
info = {}
- revision=None
if hg_info:
- revision, branch = hg_info.strip().split(' ')
- if revision.endswith('+'):
- revision = revision[:-1]
- info['hash'] = revision
+ branch = hg_info.strip()
info['branch'] = branch
- hg_info = system_command_call(get_hg_info_cmd(arc_root, revision=revision, python_cmd=python_cmd))
+ hg_info = system_command_call(get_hg_info_cmd(arc_root, branch=branch, python_cmd=python_cmd))
if hg_info:
+ info['hash'] = get_hg_field(hg_info, 'changeset')
info['author'] = get_hg_field(hg_info, 'user')
info['date'] = get_hg_field(hg_info, 'date')
finally:
@@ -184,10 +181,10 @@ def get_hg_dict(arc_root, python_cmd=[sys.executable]):
def get_hg_scm_data(info):
scm_data = "Svn info:\n"
- scm_data += indent + "Branch: " + info['branch'] + "\n"
- scm_data += indent + "Last Changed Rev: " + info['hash'] + "\n"
- scm_data += indent + "Last Changed Author: " + info['author'] + "\n"
- scm_data += indent + "Last Changed Date: " + info['date'] + "\n"
+ scm_data += indent + "Branch: " + info.get('branch', '') + "\n"
+ scm_data += indent + "Last Changed Rev: " + info.get('hash', '') + "\n"
+ scm_data += indent + "Last Changed Author: " + info.get('author', '') + "\n"
+ scm_data += indent + "Last Changed Date: " + info.get('date', '') + "\n"
return scm_data
|
Clean aux_out in PSA version of mbedtls_ct_hmac() | @@ -550,6 +550,7 @@ cleanup:
mbedtls_platform_zeroize( mac_key, MBEDTLS_MD_MAX_BLOCK_SIZE );
mbedtls_platform_zeroize( ikey, MBEDTLS_MD_MAX_BLOCK_SIZE );
mbedtls_platform_zeroize( okey, MBEDTLS_MD_MAX_BLOCK_SIZE );
+ mbedtls_platform_zeroize( aux_out, MBEDTLS_MD_MAX_SIZE );
psa_hash_abort( &operation );
psa_hash_abort( &aux_operation );
return( status == PSA_SUCCESS ? 0 : MBEDTLS_ERR_PLATFORM_HW_ACCEL_FAILED );
|
Added Danfoss Ally to update sensor for Pi Heating Demand | @@ -290,7 +290,8 @@ void DeRestPluginPrivate::handleThermostatClusterIndication(const deCONZ::ApsDat
case 0x0008: // Pi Heating Demand
{
if (sensor->modelId().startsWith(QLatin1String("SPZB")) || // Eurotronic Spirit
- sensor->modelId() == QLatin1String("TRV001") || // Hive
+ sensor->modelId() == QLatin1String("eTRV0100") || // Danfoss Ally
+ sensor->modelId() == QLatin1String("TRV001") || // Hive TRV
sensor->modelId() == QLatin1String("Thermostat")) // eCozy
{
quint8 valve = attr.numericValue().u8;
|
Comment why allocation failure in getContext is believe impossible.
Also add comment tags so lcov can ignore unreachable code | @@ -6113,9 +6113,30 @@ getContext(XML_Parser parser)
len = dtd->defaultPrefix.binding->uriLen;
if (namespaceSeparator)
len--;
- for (i = 0; i < len; i++)
- if (!poolAppendChar(&tempPool, dtd->defaultPrefix.binding->uri[i]))
- return NULL;
+ for (i = 0; i < len; i++) {
+ if (!poolAppendChar(&tempPool, dtd->defaultPrefix.binding->uri[i])) {
+ /* Because of memory caching, I don't believe this line can be
+ * executed.
+ *
+ * This is part of a loop copying the default prefix binding
+ * URI into the parser's temporary string pool. Previously,
+ * that URI was copied into the same string pool, with a
+ * terminating NUL character, as part of setContext(). When
+ * the pool was cleared, that leaves a block definitely big
+ * enough to hold the URI on the free block list of the pool.
+ * The URI copy in getContext() therefore cannot run out of
+ * memory.
+ *
+ * If the pool is used between the setContext() and
+ * getContext() calls, the worst it can do is leave a bigger
+ * block on the front of the free list. Given that this is
+ * all somewhat inobvious and program logic can be changed, we
+ * don't delete the line but we do exclude it from the test
+ * coverage statistics.
+ */
+ return NULL; /* LCOV_EXCL_LINE */
+ }
+ }
needSep = XML_TRUE;
}
|
Docs - remove 6.x-specific limitation for index with op_class | for more information.</p>
</body>
</topic>
- <topic id="topic_issues">
- <title>Greenplum Database Limitations</title>
- <body>
- <p>The Pivotal Query Optimizer (GPORCA) does not support queries that access an
- index with <codeph>op_class</codeph>, such queries will fall back to the
- Postgres Planner</p>
- </body>
- </topic>
<topic id="topic_info">
<title>Module Documentation</title>
<body>
|
Testing: Add test to detect missing version entry in 1.0.table | @@ -18,6 +18,7 @@ if [ ! -d "$ECCODES_DEFINITION_PATH" ]; then
fi
temp=temp.$label.grib2
+sample1=$ECCODES_SAMPLES_PATH/GRIB1.tmpl
sample2=$ECCODES_SAMPLES_PATH/GRIB2.tmpl
tables_dir="$ECCODES_DEFINITION_PATH/grib2/tables"
@@ -31,4 +32,13 @@ if [ "$latest" != "$highest_num" ]; then
exit 1
fi
+# Also grib1 to grib2 conversion should set the correct version
+${tools_dir}/grib_set -s edition=2 $sample1 $temp
+tv=`${tools_dir}/grib_get -p tablesVersion $temp`
+if [ "$tv" != "$latest" ]; then
+ echo "After conversion to GRIB2, tablesVersion=$tv. Should be $latest. Check definitions/grib2/tables/1.0.table"
+ exit 1
+fi
+# grib_check_key_equals $temp tablesVersion $latest
+
rm -f $temp
|
android: changing functions | @@ -1144,7 +1144,6 @@ RHO_GLOBAL int close(int fd)
}
-
RHO_GLOBAL ssize_t pread(int fd, void *buf, size_t count, off_t offset)
{
RHO_LOG("pread: BEGIN fd %d: offset: %ld: count: %ld", fd, (long)offset, (long)count);
@@ -1937,6 +1936,7 @@ static int __sclose(void *cookie)
*/
RHO_GLOBAL FILE *fopen(const char *path, const char *mode)
{
+ RHO_ERROR_LOG("fopen");
int flags, oflags;
FILE *fp = 0;
@@ -1971,35 +1971,49 @@ RHO_GLOBAL FILE *fopen(const char *path, const char *mode)
size_t fread(void* __buf, size_t __size, size_t __count, FILE* __fp)
{
- if (rho_fs_mode == RHO_FS_DISK_ONLY || fd < RHO_FD_BASE)
+ RHO_ERROR_LOG("fread");
+ if (rho_fs_mode == RHO_FS_DISK_ONLY || (unsigned long int)(__fp) < RHO_FD_BASE)
return real_fread(__buf, __size, __count, __fp);
-
+ RHO_ERROR_LOG("fread2");
return read((int)__fp,__buf,__size*__count);
}
size_t fwrite(const void* __buf, size_t __size, size_t __count, FILE* __fp)
{
- if (rho_fs_mode == RHO_FS_DISK_ONLY || fd < RHO_FD_BASE)
+ RHO_ERROR_LOG("fwrite");
+ if (rho_fs_mode == RHO_FS_DISK_ONLY || (unsigned long int)(__fp) < RHO_FD_BASE)
return real_fwrite(__buf, __size, __count, __fp);
-
+ RHO_ERROR_LOG("fwrite2");
return write((int)__fp,__buf,__size*__count);
}
-/*
+
int fseek(FILE* __fp, long __offset, int __whence)
{
-
+ RHO_ERROR_LOG("fseek");
+ if (rho_fs_mode == RHO_FS_DISK_ONLY || (unsigned long int)(__fp) < RHO_FD_BASE)
+ return real_fseek(__fp, __offset, __whence);
+ RHO_ERROR_LOG("fseek2");
+ return lseek((int)__fp, __offset, __whence);
}
long ftell(FILE* __fp)
{
-
+ RHO_ERROR_LOG("ftell");
+ //if (rho_fs_mode == RHO_FS_DISK_ONLY || (unsigned long int)(__fp) < RHO_FD_BASE)
+ return real_ftell(__fp);
+ //RHO_ERROR_LOG("ftell2");
+ // return tell((int)__fp);
}
int fclose(FILE* __fp)
{
-
+ RHO_ERROR_LOG("fclose");
+ if (rho_fs_mode == RHO_FS_DISK_ONLY || (unsigned long int)(__fp) < RHO_FD_BASE)
+ return real_fclose(__fp);
+ RHO_ERROR_LOG("fclose2");
+ return close((int)__fp);
}
-*/
+
RHO_GLOBAL int select(int maxfd, fd_set *rfd, fd_set *wfd, fd_set *efd, struct timeval *tv)
{
RHO_LOG("select: maxfd: %d", maxfd);
|
Fix current data offset to use vlib_buffer_get_current in input/output ACL
vlib_buffer_get_current() should be used for current data offset in ACL.
This is required for output ACL where packets are decoded through a vxlan tunnel rx node. | @@ -197,7 +197,7 @@ l2_in_out_acl_node_fn (vlib_main_t * vm,
if (t0->current_data_flag == CLASSIFY_FLAG_USE_CURR_DATA)
h0 = (void *) vlib_buffer_get_current (b0) + t0->current_data_offset;
else
- h0 = b0->data;
+ h0 = (void *) vlib_buffer_get_current (b0);
vnet_buffer (b0)->l2_classify.hash =
vnet_classify_hash_packet (t0, (u8 *) h0);
@@ -207,7 +207,7 @@ l2_in_out_acl_node_fn (vlib_main_t * vm,
if (t1->current_data_flag == CLASSIFY_FLAG_USE_CURR_DATA)
h1 = (void *) vlib_buffer_get_current (b1) + t1->current_data_offset;
else
- h1 = b1->data;
+ h1 = (void *) vlib_buffer_get_current (b1);
vnet_buffer (b1)->l2_classify.hash =
vnet_classify_hash_packet (t1, (u8 *) h1);
@@ -244,7 +244,7 @@ l2_in_out_acl_node_fn (vlib_main_t * vm,
if (t0->current_data_flag == CLASSIFY_FLAG_USE_CURR_DATA)
h0 = (void *) vlib_buffer_get_current (b0) + t0->current_data_offset;
else
- h0 = b0->data;
+ h0 = (void *) vlib_buffer_get_current (b0);
vnet_buffer (b0)->l2_classify.hash =
vnet_classify_hash_packet (t0, (u8 *) h0);
@@ -329,7 +329,7 @@ l2_in_out_acl_node_fn (vlib_main_t * vm,
(void *) vlib_buffer_get_current (b0) +
t0->current_data_offset;
else
- h0 = b0->data;
+ h0 = (void *) vlib_buffer_get_current (b0);
e0 = vnet_classify_find_entry (t0, (u8 *) h0, hash0, now);
if (e0)
@@ -384,7 +384,7 @@ l2_in_out_acl_node_fn (vlib_main_t * vm,
(void *) vlib_buffer_get_current (b0) +
t0->current_data_offset;
else
- h0 = b0->data;
+ h0 = (void *) vlib_buffer_get_current (b0);
hash0 = vnet_classify_hash_packet (t0, (u8 *) h0);
e0 = vnet_classify_find_entry
|
Updated comment for ALPN, and added link to wiki section. | @@ -493,7 +493,7 @@ preference, with most preferred protocol first, and of length
included in the Client Hello message as the ALPN extension. As an
**S2N_SERVER**, the list is used to negotiate a mutual application protocol
with the client. After the negotiation for the connection has completed, the
-agreed upon protocol will be stored in the application_protocol member of the s2n_connection object.
+agreed upon protocol can be retrieved with [s2n_get_application_protocol](#s2n_get_application_protocol)
### s2n\_config\_set\_status\_request\_type
|
Fix bug in fd_check | @@ -378,7 +378,7 @@ int dill_fd_check(int s, int type, int family1, int family2, int listening) {
/* Check whether the socket is in listening mode. */
rc = getsockopt(s, SOL_SOCKET, SO_ACCEPTCONN, &val, &valsz);
if(dill_slow(rc < 0 && errno != ENOPROTOOPT)) return -1;
- if(dill_slow(val != listening)) {errno = EINVAL; return -1;}
+ else if(dill_slow(val != listening)) {errno = EINVAL; return -1;}
/* Check family. E.g. AF_INET vs. AF_UNIX. */
struct sockaddr_storage ss;
socklen_t sssz = sizeof(ss);
|
Disable sniff mode during (e)SCO connection. | @@ -229,9 +229,9 @@ tBTA_DM_PM_TYPE_QUALIFIER tBTA_DM_PM_SPEC bta_dm_pm_spec[BTA_DM_NUM_PM_SPEC] = {
{{BTA_DM_PM_NO_PREF, 0}, {BTA_DM_PM_NO_ACTION, 0}}, /* conn close */
{{BTA_DM_PM_NO_ACTION, 0}, {BTA_DM_PM_NO_ACTION, 0}}, /* app open */
{{BTA_DM_PM_NO_ACTION, 0}, {BTA_DM_PM_NO_ACTION, 0}}, /* app close */
- {{BTA_DM_PM_SNIFF3, 7000 + BTA_DM_PM_SPEC_TO_OFFSET}, {BTA_DM_PM_NO_ACTION, 0}}, /* sco open, active */
- {{BTA_DM_PM_SNIFF, 7000 + BTA_DM_PM_SPEC_TO_OFFSET}, {BTA_DM_PM_NO_ACTION, 0}}, /* sco close sniff */
- {{BTA_DM_PM_SNIFF, 7000 + BTA_DM_PM_SPEC_TO_OFFSET}, {BTA_DM_PM_NO_ACTION, 0}}, /* idle */
+ {{BTA_DM_PM_NO_ACTION, 0}, {BTA_DM_PM_NO_ACTION, 0}}, /* sco open, active */
+ {{BTA_DM_PM_NO_ACTION, 0}, {BTA_DM_PM_NO_ACTION, 0}}, /* sco close sniff */
+ {{BTA_DM_PM_NO_ACTION, 0}, {BTA_DM_PM_NO_ACTION, 0}}, /* idle */
{{BTA_DM_PM_ACTIVE, 0}, {BTA_DM_PM_NO_ACTION, 0}}, /* busy */
{{BTA_DM_PM_RETRY, 7000 + BTA_DM_PM_SPEC_TO_OFFSET}, {BTA_DM_PM_NO_ACTION, 0}} /* mode change retry */
}
|
[BSP]stm32f107 fix usart3 | @@ -295,6 +295,7 @@ static void RCC_Configuration(void)
#if defined(RT_USING_UART3)
RCC_APB2PeriphClockCmd(RCC_APB2Periph_AFIO | RCC_APB2Periph_GPIOC, ENABLE);
+ RCC_APB1PeriphClockCmd(RCC_APB1Periph_USART3,ENABLE);
GPIO_PinRemapConfig(GPIO_PartialRemap_USART3, ENABLE);
#endif /* RT_USING_UART3 */
}
|
Fixed iphone static library build script. | @@ -11,23 +11,6 @@ def log(string)
open(BUILD_LOG_PATH, 'a'){|f| f.puts string}
end
-def latest_sdk()
- sdks = `xcodebuild -showsdks`.split("\n")
-
- versions = sdks.map do|elt|
- # Match only lines with "iphoneos" in them.
- m = elt.match(/iphoneos(\d\.\d)/)
- (m ? m.captures[0] : "0.0")
- end
-
- return versions.max
-end
-
-# Or you can pick a specific version string (ex: "5.1")
-IOS_SDK_VERSION = latest_sdk()
-
-log("Building using iOS SDK #{IOS_SDK_VERSION}")
-
PROJECT = "Chipmunk7.xcodeproj"
VERBOSE = (not ARGV.include?("--quiet"))
@@ -46,9 +29,8 @@ end
def build(target, configuration, simulator)
sdk_os = (simulator ? "iphonesimulator" : "iphoneos")
- sdk = "#{sdk_os}#{IOS_SDK_VERSION}"
- command = "xcodebuild -project #{PROJECT} -sdk #{sdk} -configuration #{configuration} -target #{target}"
+ command = "xcodebuild -project #{PROJECT} -sdk #{sdk_os} -configuration #{configuration} -target #{target}"
system command
return "build/#{configuration}-#{sdk_os}/lib#{target}.a"
|
test/usb_tcpmv2_td_pd_src3_e32.c: Format with clang-format
BRANCH=none
TEST=none | @@ -20,8 +20,7 @@ static void setup_chunk_msg(int chunk, char *data)
int i;
int base_msg_byte = chunk * PD_MAX_EXTENDED_MSG_CHUNK_LEN;
- *(uint16_t *)data = PD_EXT_HEADER(chunk, 0,
- PD_MAX_EXTENDED_MSG_LEN);
+ *(uint16_t *)data = PD_EXT_HEADER(chunk, 0, PD_MAX_EXTENDED_MSG_LEN);
for (i = 0; i < PD_MAX_EXTENDED_MSG_CHUNK_LEN; ++i) {
int val = (i + base_msg_byte) % 256;
@@ -85,12 +84,8 @@ int test_td_pd_src3_e32(void)
possible[1].ctrl_msg = 0;
possible[1].data_msg = 0x1F;
- TEST_EQ(verify_tcpci_possible_tx(possible,
- 2,
- &found_index,
- data,
- sizeof(data),
- &msg_len,
+ TEST_EQ(verify_tcpci_possible_tx(possible, 2, &found_index, data,
+ sizeof(data), &msg_len,
PD_T_CHUNKING_NOT_SUPPORTED_MAX),
EC_SUCCESS, "%d");
mock_set_alert(TCPC_REG_ALERT_TX_SUCCESS);
@@ -130,12 +125,9 @@ int test_td_pd_src3_e32(void)
setup_chunk_msg(chunk, data);
partner_send_msg(TCPCI_MSG_SOP, 0x1F, 7, 1, (uint32_t *)data);
- TEST_EQ(verify_tcpci_tx_with_data(TCPCI_MSG_SOP,
- 0x1F,
- data,
- sizeof(data),
- &msg_len,
- PD_T_CHUNK_RECEIVER_REQUEST_MAX),
+ TEST_EQ(verify_tcpci_tx_with_data(
+ TCPCI_MSG_SOP, 0x1F, data, sizeof(data),
+ &msg_len, PD_T_CHUNK_RECEIVER_REQUEST_MAX),
EC_SUCCESS, "%d");
mock_set_alert(TCPC_REG_ALERT_TX_SUCCESS);
@@ -159,11 +151,8 @@ int test_td_pd_src3_e32(void)
* i) If a message is not received within tChunkReceiverRequest max,
* the test fails.
*/
- TEST_EQ(verify_tcpci_tx_with_data(TCPCI_MSG_SOP,
- 0x1F,
- data,
- sizeof(data),
- &msg_len,
+ TEST_EQ(verify_tcpci_tx_with_data(TCPCI_MSG_SOP, 0x1F, data,
+ sizeof(data), &msg_len,
PD_T_CHUNK_RECEIVER_REQUEST_MAX),
EC_SUCCESS, "%d");
mock_set_alert(TCPC_REG_ALERT_TX_SUCCESS);
@@ -207,9 +196,7 @@ int test_td_pd_src3_e32(void)
* Number of Data Objects field
*/
header = *(uint32_t *)&data[1];
- TEST_EQ(msg_len - 3,
- PD_HEADER_CNT(header) * 4,
- "%d");
+ TEST_EQ(msg_len - 3, PD_HEADER_CNT(header) * 4, "%d");
/*
* 4. The last 2 bytes of the Data Object are 0
|
Update event to use dropdown using patrickmollohan's implementation | "FIELD_FADE_WHITE": "Fade to white",
"FIELD_FADE_BLACK": "Fade to black",
"FIELD_MUSIC_DISABLE_SPEED_CONVERSION": "Disable 50/60 hertz speed conversion",
+ "FIELD_HORIZONTAL": "Horizontal",
+ "FIELD_VERTICAL": "Vertical",
"// 7": "Asset Viewer ---------------------------------------------",
"ASSET_SEARCH": "Search...",
|
generate all random mac_ap with unicast bit 0 and global unique | @@ -4477,14 +4477,14 @@ if(mynicap == 0)
}
}
-myouiap &= 0xffffff;
+myouiap &= 0xfcffff;
mynicap &= 0xffffff;
mac_mybcap[5] = mynicap & 0xff;
mac_mybcap[4] = (mynicap >> 8) & 0xff;
mac_mybcap[3] = (mynicap >> 16) & 0xff;
mac_mybcap[2] = myouiap & 0xff;
mac_mybcap[1] = (myouiap >> 8) & 0xff;
-mac_mybcap[0] = (myouiap >> 16) & 0xfc;
+mac_mybcap[0] = (myouiap >> 16) & 0xff;
memcpy(&mac_myap, &mac_mybcap, 6);
if(myouista == 0)
@@ -5223,7 +5223,7 @@ while((auswahl = getopt_long(argc, argv, short_options, long_options, &index)) !
case HCXD_AP_MAC:
apmac = strtoll(optarg, NULL, 16);
- myouiap = (apmac &0xffffff000000) >>24;
+ myouiap = (apmac &0xfcffff000000) >>24;
mynicap = apmac & 0xffffff;
break;
|
More fixes for silly misedits | @@ -778,7 +778,10 @@ static int initialized = 0;
void gotoblas_affinity_init(void) {
int cpu, num_avail;
+#ifndef USE_OPENMP
cpu_set_t cpu_mask;
+#endif
+ int i;
if (initialized) return;
@@ -826,7 +829,6 @@ void gotoblas_affinity_init(void) {
cpu_set_t *cpusetp;
int nums;
int ret;
- int i;
#ifdef DEBUG
fprintf(stderr, "Shared Memory Initialization.\n");
|
and BUFR leak in clone | MEMBERS = grib_vdarray* numericValues
MEMBERS = grib_vsarray* stringValues
MEMBERS = grib_viarray* elementsDescriptorsIndex
+ MEMBERS = char* cname
END_CLASS_DEF
@@ -80,6 +81,7 @@ typedef struct grib_accessor_bufr_data_element {
grib_vdarray* numericValues;
grib_vsarray* stringValues;
grib_viarray* elementsDescriptorsIndex;
+ char* cname;
} grib_accessor_bufr_data_element;
extern grib_accessor_class* grib_accessor_class_gen;
@@ -162,6 +164,7 @@ static grib_accessor* make_clone(grib_accessor* a,grib_section* s,int* err)
grib_accessor* attribute=NULL;
grib_accessor_bufr_data_element* elementAccessor;
grib_accessor_bufr_data_element* self;
+ char* copied_name = NULL;
int i;
grib_action creator = {0, };
creator.op = "bufr_data_element";
@@ -174,7 +177,8 @@ static grib_accessor* make_clone(grib_accessor* a,grib_section* s,int* err)
*err=0;
the_clone = grib_accessor_factory(s, &creator, 0, NULL);
- the_clone->name=grib_context_strdup(a->context,a->name);
+ copied_name = grib_context_strdup(a->context,a->name);
+ the_clone->name=copied_name;
elementAccessor=(grib_accessor_bufr_data_element*)the_clone;
self=(grib_accessor_bufr_data_element*)a;
the_clone->flags=a->flags;
@@ -189,6 +193,7 @@ static grib_accessor* make_clone(grib_accessor* a,grib_section* s,int* err)
elementAccessor->numericValues=self->numericValues;
elementAccessor->stringValues=self->stringValues;
elementAccessor->elementsDescriptorsIndex=self->elementsDescriptorsIndex;
+ elementAccessor->cname = copied_name; /* ECC-765 */
i=0;
while (a->attributes[i]) {
@@ -257,10 +262,11 @@ void accessor_bufr_data_element_set_elementsDescriptorsIndex(grib_accessor* a,gr
static void init(grib_accessor* a, const long len, grib_arguments* params)
{
-
+ grib_accessor_bufr_data_element* self = (grib_accessor_bufr_data_element*)a;
a->length = 0;
a->flags |= GRIB_ACCESSOR_FLAG_BUFR_DATA;
/* a->flags |= GRIB_ACCESSOR_FLAG_READ_ONLY; */
+ self->cname = NULL;
}
static void dump(grib_accessor* a, grib_dumper* dumper)
@@ -603,7 +609,9 @@ static int get_native_type(grib_accessor* a)
static void destroy(grib_context* ct, grib_accessor* a)
{
+ grib_accessor_bufr_data_element* self = (grib_accessor_bufr_data_element*)a;
int i=0;
+ if (self->cname) grib_context_free(ct,self->cname); /* ECC-765 */
while (i<MAX_ACCESSOR_ATTRIBUTES && a->attributes[i]) {
/*grib_context_log(ct,GRIB_LOG_DEBUG,"deleting attribute %s->%s",a->name,a->attributes[i]->name);*/
/*printf("bufr_data_element destroy %s %p\n", a->attributes[i]->name, (void*)a->attributes[i]);*/
|
deep copy in get_params | @@ -1083,7 +1083,11 @@ class CatBoost(_CatBoostBase):
result : dict
Dictionary of {param_key: param_value}.
"""
- return self._get_init_params()
+ params = self._get_init_params()
+ if deep:
+ return deepcopy(params)
+ else:
+ return params
def set_params(self, **params):
"""
|
Add release not for | @@ -10,6 +10,8 @@ Next
- [Fix a potential build issue where cJSON includes may be misconfigured](https://github.com/PJK/libcbor/pull/132)
- Breaking: [Add a limit on the size of the decoding context stack](https://github.com/PJK/libcbor/pull/138) (by [James-ZHANG](https://github.com/James-ZHANG))
- If your usecase requires parsing very deeply nested structures, you might need to increase the default 2k limit via `CBOR_MAX_STACK_SIZE`
+- Enable LTO/IPO based on [CheckIPOSupported](https://cmake.org/cmake/help/latest/module/CheckIPOSupported.html#module:CheckIPOSupported) [[#143]](https://github.com/PJK/libcbor/pull/143) (by [xanderlent](https://github.com/xanderlent))
+ - If you rely on LTO being enabled and use CMake version older than 3.9, you will need to re-enable it manually or upgrade your CMake
0.6.1 (2020-03-26)
---------------------
|
Set default partition info in partition_gen.sh
If CONFIG_ARTIK053_FLASH_PART_LIST or CONFIG_ARTIK053_FLASH_PART_NAME are unset, they will be set as default value | @@ -31,13 +31,16 @@ OS_DIR_PATH=${PWD}
BUILD_DIR_PATH=${OS_DIR_PATH}/../build
BOARD_DIR_PATH=${BUILD_DIR_PATH}/configs/${BOARD_NAME}
OPENOCD_DIR_PATH=${BOARD_DIR_PATH}/tools/openocd
+BOARD_KCONFIG=${OS_DIR_PATH}/arch/arm/src/${BOARD_NAME}/Kconfig
# FLASH BASE ADDRESS (Can it be made to read dynamically from .config?)
FLASH_BASE=0x04000000
# Partition information
-partsize_list=${CONFIG_ARTIK053_FLASH_PART_LIST}
-partname_list=${CONFIG_ARTIK053_FLASH_PART_NAME}
+partsize_list_default=`grep -A 2 'config ARTIK053_FLASH_PART_LIST' ${BOARD_KCONFIG} | sed -n 's/\tdefault "\(.*\)".*/\1/p'`
+partsize_list=${CONFIG_ARTIK053_FLASH_PART_LIST:=${partsize_list_default}}
+partname_list_default=`grep -A 2 'config ARTIK053_FLASH_PART_NAME' ${BOARD_KCONFIG} | sed -n 's/\tdefault "\(.*\)".*/\1/p'`
+partname_list=${CONFIG_ARTIK053_FLASH_PART_NAME:=${partname_list_default}}
# OpenOCD cfg file to be created for flashing
PARTITION_MAP_CFG=${OPENOCD_DIR_PATH}/partition_map.cfg
|
{AH} update ranges in count_coverage tests | @@ -1870,6 +1870,7 @@ class TestCountCoverage(unittest.TestCase):
bam, chrom, start, stop,
read_callback,
quality_threshold=15):
+ stop = min(stop, bam.get_reference_length(chrom))
l = stop - start
count_a = array.array('L', [0] * l)
count_c = array.array('L', [0] * l)
@@ -1932,7 +1933,7 @@ class TestCountCoverage(unittest.TestCase):
def test_count_coverage_counts_as_expected(self):
chrom = 'chr1'
start = 0
- stop = 2000
+ stop = 1000
with pysam.AlignmentFile(self.samfilename) as inf:
manual_counts = self.count_coverage_python(
@@ -1953,7 +1954,7 @@ class TestCountCoverage(unittest.TestCase):
def test_count_coverage_quality_filter(self):
chrom = 'chr1'
start = 0
- stop = 2000
+ stop = 1000
with pysam.AlignmentFile(self.samfilename) as inf:
manual_counts = self.count_coverage_python(
inf, chrom, start, stop,
@@ -1972,7 +1973,7 @@ class TestCountCoverage(unittest.TestCase):
def test_count_coverage_read_callback(self):
chrom = 'chr1'
start = 0
- stop = 2000
+ stop = 1000
with pysam.AlignmentFile(self.samfilename) as inf:
manual_counts = self.count_coverage_python(
inf, chrom, start, stop,
@@ -2001,7 +2002,7 @@ class TestCountCoverage(unittest.TestCase):
chrom = 'chr1'
start = 0
- stop = 2000
+ stop = 1000
def filter(read):
return not (read.flag & (0x4 | 0x100 | 0x200 | 0x400))
@@ -2043,7 +2044,7 @@ class TestCountCoverage(unittest.TestCase):
pysam.samtools.index(self.tmpfilename)
chr = 'chr1'
start = 0
- stop = 2000
+ stop = 1000
with pysam.AlignmentFile(self.tmpfilename) as inf:
fast_counts = inf.count_coverage(chr, start, stop,
|
libhfuzz/fetch: use ASAN to mark the input buffer to be of a specific size | @@ -30,6 +30,24 @@ __attribute__((constructor)) static void init(void) {
}
}
+/*
+ * Instruct ASAN to treat the input buffer to be of a specific size, treating all accesses
+ * beyond that as access violations
+ */
+void fetchAsanHelper(const uint8_t* buf, size_t len) {
+ __attribute__((weak)) extern void __asan_poison_memory_region(const void* addr, size_t sz);
+ __attribute__((weak)) extern void __asan_unpoison_memory_region(const void* addr, size_t sz);
+
+ /* Unpoison the whole area first */
+ if (__asan_unpoison_memory_region) {
+ __asan_unpoison_memory_region(buf, _HF_INPUT_MAX_SIZE);
+ }
+ /* Poison the remainder of the buffer (beyond len) */
+ if (__asan_poison_memory_region) {
+ __asan_poison_memory_region(&buf[len], _HF_INPUT_MAX_SIZE - len);
+ }
+}
+
void HonggfuzzFetchData(const uint8_t** buf_ptr, size_t* len_ptr) {
if (!files_writeToFd(_HF_PERSISTENT_FD, &HFReadyTag, sizeof(HFReadyTag))) {
LOG_F("writeToFd(size=%zu, readyTag) failed", sizeof(HFReadyTag));
@@ -48,6 +66,8 @@ void HonggfuzzFetchData(const uint8_t** buf_ptr, size_t* len_ptr) {
*buf_ptr = inputFile;
*len_ptr = (size_t)rcvLen;
+ fetchAsanHelper(inputFile, rcvLen);
+
if (lseek(_HF_INPUT_FD, (off_t)0, SEEK_SET) == -1) {
PLOG_W("lseek(_HF_INPUT_FD=%d, 0)", _HF_INPUT_FD);
}
|
No longer sends multiple %tales reports for the same change. | ::
|= {man/knot con/config}
^+ +>
- =+ :- neu=(~(has by stories) man)
- pur=(fall (~(get by stories) man) *story)
- =. +>.$ pa-abet:(~(pa-reform pa man pur) con)
- =. +>.$ (ra-inform %tales (strap man con))
- ?:(neu +>.$ ra-homes)
+ =+ pur=(fall (~(get by stories) man) *story)
+ pa-abet:(~(pa-reform pa man pur) con)
::
++ ra-base-hart
::x produces our ship's host desk's web address as a hart.
|
chat: sidebar switcher retains with on -m
Sidebar switcher was squishing and losing aspect ratio on medium viewport.
It now retains its proper size. | @@ -24,6 +24,9 @@ export class SidebarSwitcher extends Component {
}
height="16"
width="16"
+ style={{
+ maxWidth: 16
+ }}
/>
</a>
</div>
|
libhfuzz: inline _memcmp | @@ -126,7 +126,7 @@ __attribute__((constructor)) void hfuzzInstrumentInit(void) {
pthread_once(&localInitOnce, initializeInstrument);
}
-static int _memcmp(const uint8_t* m1, const uint8_t* m2, size_t n) {
+static inline int _memcmp(const uint8_t* m1, const uint8_t* m2, size_t n) {
for (size_t i = 0; i < n; i++) {
if (m1[i] != m2[i]) {
return ((int)m1[i] - (int)m2[i]);
|
Initalize the OSCOAP context just before sending the Join Request. | @@ -74,7 +74,6 @@ void cjoin_init() {
cjoin_vars.timerId = opentimers_create();
idmanager_setJoinKey((uint8_t *) masterSecret);
- cjoin_init_security_context();
cjoin_schedule();
}
@@ -192,6 +191,10 @@ void cjoin_task_cb() {
// cancel the startup timer but do not destroy it as we reuse it for retransmissions
opentimers_cancel(cjoin_vars.timerId);
+ // init the security context only here in order to use the latest joinKey
+ // that may be set over the serial
+ cjoin_init_security_context();
+
cjoin_sendJoinRequest(joinProxy);
return;
|
* Fixed some errors found by PVS studio | ejdb2 (2.0.45) UNRELEASED; urgency=medium
- * Fixed some errors founded by PVS studio
+ * Fixed some errors found by PVS studio
* Added two variants of `jbn_detach` (jbl.h)
* Added non standard JSON patch operation: `add_create` (jbl.h)
* Added `jbl_from_node` (jbl.h)
|
Correct kernel.sem value from 40960 to 4096 | @@ -168,7 +168,7 @@ vm.overcommit_memory = 2 # <b>See <xref href="#topic3/segment_host_memory" forma
vm.overcommit_ratio = 95 # <b>See <xref href="#topic3/segment_host_memory" format="dita">Segment Host Memory</xref></b>
net.ipv4.ip_local_port_range = 10000 65535 # <b>See <xref href="#topic3/port_settings" format="dita">Port Settings</xref></b>
-kernel.sem = 500 2048000 200 40960
+kernel.sem = 500 2048000 200 4096
kernel.sysrq = 1
kernel.core_uses_pid = 1
kernel.msgmnb = 65536
|
zaius: Remove psi_set_external_irq_policy from platform init
This function is specific to how Skiboot's P8 PSIHB driver. For P9 the
PSIHB driver has been reworked completely and this doesn't do anything.
Acked-By: Michael Neuling | @@ -31,7 +31,6 @@ static bool zaius_probe(void)
/* Lot of common early inits here */
astbmc_early_init();
- psi_set_external_irq_policy(EXTERNAL_IRQ_POLICY_LINUX);
/* Setup UART for direct use by Linux */
uart_set_console_policy(UART_CONSOLE_OS);
|
Store splash screen settings between application restarts | /* eslint-disable jsx-a11y/label-has-for */
import React, { Component } from "react";
import { ipcRenderer, remote } from "electron";
+import settings from "electron-settings";
import cx from "classnames";
import Path from "path";
import { DotsIcon } from "../library/Icons";
@@ -14,7 +15,7 @@ import "../../lib/helpers/handleFirstTab";
const {dialog} = require('electron').remote;
const getLastUsedPath = () => {
- const storedPath = localStorage.getItem("__lastUsedPath");
+ const storedPath = settings.get("__lastUsedPath");
if (storedPath) {
return Path.normalize(storedPath);
}
@@ -22,15 +23,15 @@ const getLastUsedPath = () => {
};
const setLastUsedPath = (path) => {
- localStorage.setItem("__lastUsedPath", path);
+ settings.set("__lastUsedPath", path);
};
const getLastUsedTab = () => {
- return localStorage.getItem("__lastUsedSplashTab") || "info";
+ return settings.get("__lastUsedSplashTab") || "info";
}
const setLastUsedTab = (tab) => {
- localStorage.setItem("__lastUsedSplashTab", tab);
+ settings.set("__lastUsedSplashTab", tab);
}
class Splash extends Component {
|
imgtool: Pad file with 0xff
The bootloader assumes that parts of the flash that aren't written
still have 0xff in them. Fix the padding code so that the padding is
done this way. | @@ -126,16 +126,52 @@ func padImage(name string) error {
return errors.New("Image is too large for specified padding")
}
- _, err = f.WriteAt(bootMagic, padTo-trailerSize)
+ // Unwritten data in files is written as zero, but we need it
+ // to be unwritten in flash, so write as all FFs.
+ err = ffPadFile(f, padTo-trailerSize)
if err != nil {
return err
}
- err = f.Truncate(padTo)
+ _, err = f.Write(bootMagic)
if err != nil {
return err
}
+ err = ffPadFile(f, padTo)
+ if err != nil {
+ return err
+ }
+
+ return nil
+}
+
+// Pad the file to the given size, writing all 0xFF to the file.
+func ffPadFile(f *os.File, pos int64) error {
+ buf := make([]byte, 4096)
+ for i := range buf {
+ buf[i] = 0xff
+ }
+
+ base, err := f.Seek(0, 2)
+ if err != nil {
+ return err
+ }
+
+ for base < pos {
+ count := len(buf)
+ if int64(count) > pos-base {
+ count = int(pos - base)
+ }
+
+ _, err = f.Write(buf[:count])
+ if err != nil {
+ return err
+ }
+
+ base += int64(count)
+ }
+
return nil
}
|
ames: count dropped packets (and print every 1k with -v) | c3_o fak_o; // fake keys
c3_s por_s; // public IPv4 port
c3_c* dns_c; // domain XX multiple/fallback
+ c3_d dop_d; // drop count (since last print)
c3_w imp_w[256]; // imperial IPs
time_t imp_t[256]; // imperial IP timestamps
c3_o imp_o[256]; // imperial print status
@@ -405,11 +406,18 @@ _ames_recv_cb(uv_udp_t* wax_u,
if ( c3__hear == u3h(egg_u->cad) ) {
u3_auto_drop(&sam_u->car_u, egg_u);
+ sam_u->dop_d++;
}
egg_u = nex_u;
}
}
+
+ if ( 0 == (sam_u->dop_d % 1000) ) {
+ if ( (u3C.wag_w & u3o_verbose) ) {
+ u3l_log("ames: dropped 1.000 packets\r\n");
+ }
+ }
}
c3_free(buf_u->base);
@@ -703,6 +711,7 @@ u3_ames_io_init(u3_pier* pir_u)
sam_u->who_d[1] = pir_u->who_d[1];
sam_u->por_s = pir_u->por_s;
sam_u->fak_o = pir_u->fak_o;
+ sam_u->dop_d = 0;
c3_assert( !uv_udp_init(u3L, &sam_u->wax_u) );
sam_u->wax_u.data = sam_u;
|
add options for e2l | @@ -52,4 +52,4 @@ PYOCD_TARGET =
# flash using rfp-cli
flash: $(BUILD)/$(PROJECT).mot
- rfp-cli -device rx65x -tool e2l -auto $^
+ rfp-cli -device rx65x -tool e2l -if fine -fo id FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF -auth id FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF -auto $^
|
WindowExplorer: Add filename for window instance handle | @@ -768,6 +768,17 @@ static VOID WepRefreshWindowGeneralInfo(
WINDOWINFO windowInfo = { sizeof(WINDOWINFO) };
WINDOWPLACEMENT windowPlacement = { sizeof(WINDOWPLACEMENT) };
MONITORINFO monitorInfo = { sizeof(MONITORINFO) };
+ HANDLE processHandle;
+ PPH_STRING fileName = NULL;
+ HMENU menuHandle;
+ PVOID instanceHandle;
+ PVOID userdataHandle;
+ ULONG windowId;
+
+ menuHandle = GetMenu(Context->WindowHandle);
+ instanceHandle = (PVOID)GetWindowLongPtr(Context->WindowHandle, GWLP_HINSTANCE);
+ userdataHandle = (PVOID)GetWindowLongPtr(Context->WindowHandle, GWLP_USERDATA);
+ windowId = (ULONG)GetWindowLongPtr(Context->WindowHandle, GWLP_ID);
PhSetDialogItemText(hwndDlg, IDC_THREAD, PH_AUTO_T(PH_STRING, PhGetClientIdName(&Context->ClientId))->Buffer);
PhSetDialogItemText(hwndDlg, IDC_TEXT, PhGetStringOrEmpty(PH_AUTO(PhGetWindowText(Context->WindowHandle))));
@@ -801,11 +812,38 @@ static VOID WepRefreshWindowGeneralInfo(
PhSetDialogItemText(hwndDlg, IDC_NORMALRECTANGLE, L"N/A");
}
- PhSetDialogItemText(hwndDlg, IDC_INSTANCEHANDLE, PhaFormatString(L"0x%Ix", GetWindowLongPtr(Context->WindowHandle, GWLP_HINSTANCE))->Buffer);
- PhSetDialogItemText(hwndDlg, IDC_MENUHANDLE, PhaFormatString(L"0x%Ix", GetMenu(Context->WindowHandle))->Buffer);
- PhSetDialogItemText(hwndDlg, IDC_USERDATA, PhaFormatString(L"0x%Ix", GetWindowLongPtr(Context->WindowHandle, GWLP_USERDATA))->Buffer);
+ if (NT_SUCCESS(PhOpenProcess(&processHandle, *(PULONG)WeGetProcedureAddress("ProcessQueryAccess"), Context->ClientId.UniqueProcess)))
+ {
+ if (NT_SUCCESS(PhGetProcessMappedFileName(processHandle, instanceHandle, &fileName)))
+ {
+ PhMoveReference(&fileName, PhResolveDevicePrefix(fileName));
+ PhMoveReference(&fileName, PhGetBaseName(fileName));
+ }
+
+ NtClose(processHandle);
+ }
+
+ if (fileName)
+ {
+ PhSetDialogItemText(hwndDlg, IDC_INSTANCEHANDLE, PhaFormatString(
+ L"0x%Ix (%s)",
+ instanceHandle,
+ PhGetStringOrEmpty(fileName)
+ )->Buffer);
+ PhDereferenceObject(fileName);
+ }
+ else
+ {
+ PhSetDialogItemText(hwndDlg, IDC_INSTANCEHANDLE, PhaFormatString(
+ L"0x%Ix",
+ instanceHandle
+ )->Buffer);
+ }
+
+ PhSetDialogItemText(hwndDlg, IDC_MENUHANDLE, PhaFormatString(L"0x%Ix", menuHandle)->Buffer);
+ PhSetDialogItemText(hwndDlg, IDC_USERDATA, PhaFormatString(L"0x%Ix", userdataHandle)->Buffer);
PhSetDialogItemText(hwndDlg, IDC_UNICODE, IsWindowUnicode(Context->WindowHandle) ? L"Yes" : L"No");
- PhSetDialogItemText(hwndDlg, IDC_CTRLID, PhaFormatString(L"%lu", GetWindowLongPtr(Context->WindowHandle, GWLP_ID))->Buffer);
+ PhSetDialogItemText(hwndDlg, IDC_CTRLID, PhaFormatString(L"%lu", windowId)->Buffer);
WepEnsureHookDataValid(Context);
|
MP RR path scheduler: Don't select a cwin-blocked path when an alternative path is available | @@ -11,6 +11,7 @@ protoop_arg_t schedule_path_rr(picoquic_cnx_t *cnx) {
uint64_t now = picoquic_current_time();
int valid = 0;
uint64_t selected_sent_pkt = 0;
+ int selected_cwin_limited = 0;
char *path_reason = "";
for (int i = 0; i < bpfd->nb_sending_proposed; i++) {
@@ -49,6 +50,8 @@ protoop_arg_t schedule_path_rr(picoquic_cnx_t *cnx) {
uint64_t cwin_c = (uint64_t) get_path(path_c, AK_PATH_CWIN, 0);
uint64_t bytes_in_transit_c = (uint64_t) get_path(path_c, AK_PATH_BYTES_IN_TRANSIT, 0);
if (cwin_c <= bytes_in_transit_c) {
+ if (sending_path == path_c)
+ selected_cwin_limited = 1;
continue;
}
@@ -73,7 +76,7 @@ protoop_arg_t schedule_path_rr(picoquic_cnx_t *cnx) {
selected_path_index = i;
valid = 1;
selected_sent_pkt = pkt_sent_c;
- } else if (pkt_sent_c < selected_sent_pkt) {
+ } else if (pkt_sent_c < selected_sent_pkt || selected_cwin_limited) {
sending_path = pd->path;
selected_path_index = i;
valid = 1;
|
Fix issue with .contains() lists | @@ -123,11 +123,8 @@ static bool containsListItem(int argCount) {
Value search = pop();
ObjList *list = AS_LIST(pop());
- for (int i = 0; i < list->values.capacity; ++i) {
- if (!list->values.values[i])
- continue;
-
- if (list->values.values[i] == search) {
+ for (int i = 0; i < list->values.count; ++i) {
+ if (valuesEqual(list->values.values[i], search)) {
push(TRUE_VAL);
return true;
}
|
bfd: add missing cast
Add missing cast to time conversion function to to deal with arbitrary
clocks-per-second values.
Type: fix | @@ -60,7 +60,7 @@ bfd_usec_to_clocks (const bfd_main_t * bm, u64 us)
u32
bfd_clocks_to_usec (const bfd_main_t * bm, u64 clocks)
{
- return (clocks / bm->cpu_cps) * USEC_PER_SECOND;
+ return ((f64) clocks / bm->cpu_cps) * USEC_PER_SECOND;
}
static vlib_node_registration_t bfd_process_node;
|
Add terminal printers. | @@ -1495,3 +1495,57 @@ u3_term_io_loja(int x)
}
}
}
+
+/* u3_term_tape_to(): dump a tape to a file.
+*/
+void
+u3_term_tape_to(FILE *fil_f, u3_noun tep)
+{
+ u3_noun tap = tep;
+
+ while ( u3_nul != tap ) {
+ c3_c car_c;
+
+ if ( u3h(tap) >= 127 ) {
+ car_c = '?';
+ } else car_c = u3h(tap);
+
+ putc(car_c, fil_f);
+ tap = u3t(tap);
+ }
+ u3z(tep);
+}
+
+/* u3_term_tape(): dump a tape to stdout.
+*/
+void
+u3_term_tape(u3_noun tep)
+{
+ FILE* fil_f = u3_term_io_hija();
+
+ u3_term_tape_to(fil_f, tep);
+
+ u3_term_io_loja(0);
+}
+
+/* u3_term_wall(): dump a wall to stdout.
+*/
+void
+u3_term_wall(u3_noun wol)
+{
+ FILE* fil_f = u3_term_io_hija();
+ u3_noun wal = wol;
+
+ while ( u3_nul != wal ) {
+ u3_term_tape_to(fil_f, u3k(u3h(wal)));
+
+ putc(13, fil_f);
+ putc(10, fil_f);
+
+ wal = u3t(wal);
+ }
+ u3_term_io_loja(0);
+
+ u3z(wol);
+}
+
|
hv: change xsave init function name
change pcpu_xsave_init to init_pcpu_xsave.
Acked-by: Eddie Dong | @@ -40,7 +40,7 @@ static uint64_t startup_paddr = 0UL;
/* physical cpu active bitmap, support up to 64 cpus */
static volatile uint64_t pcpu_active_bitmap = 0UL;
-static void pcpu_xsave_init(void);
+static void init_pcpu_xsave(void);
static void set_current_pcpu_id(uint16_t pcpu_id);
static void print_hv_banner(void);
static uint16_t get_pcpu_id_from_lapic_id(uint32_t lapic_id);
@@ -186,7 +186,7 @@ void init_pcpu_post(uint16_t pcpu_id)
#endif
load_gdtr_and_tr();
- pcpu_xsave_init();
+ init_pcpu_xsave();
if (pcpu_id == BOOT_CPU_ID) {
/* Print Hypervisor Banner */
@@ -472,7 +472,7 @@ void wait_sync_change(volatile const uint64_t *sync, uint64_t wake_sync)
}
}
-static void pcpu_xsave_init(void)
+static void init_pcpu_xsave(void)
{
uint64_t val64;
struct cpuinfo_x86 *cpu_info;
|
fftfilt/benchmark: scaling trials more appropriately | /*
- * Copyright (c) 2007 - 2015 Joseph Gaeddert
+ * Copyright (c) 2007 - 2021 Joseph Gaeddert
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
*/
#include <sys/resource.h>
+#include <math.h>
#include "liquid.h"
// Helper function to keep code base small
@@ -30,11 +31,8 @@ void fftfilt_crcf_bench(struct rusage * _start,
unsigned int _n)
{
// adjust number of iterations:
- *_num_iterations *= 100;
-
- if (_n < 6) *_num_iterations /= 120;
- else if (_n < 12) *_num_iterations /= 40;
- else *_num_iterations /= 5*_n;
+ *_num_iterations = *_num_iterations * 5 / (_n*logf(_n));
+ if (*_num_iterations < 1) *_num_iterations = 1;
// generate coefficients
unsigned int h_len = _n+1;
|
python: turn on into_buffer in framer [7/8] | @@ -40,7 +40,7 @@ class Framer(six.Iterator):
write,
verbose=False,
dispatcher=dispatch,
- into_buffer=False,
+ into_buffer=True,
skip_metadata=False):
self._read = read
self._write = write
|
groups: fix link to DM from participants list | @@ -352,7 +352,7 @@ function Participant(props: {
</Link>
</Action>
<Action bg="transparent">
- <Link to={`/~landscape/dm/${contact.patp}`}>
+ <Link to={`/~landscape/messages/dm/~${contact.patp}`}>
<Text color="green">Send Message</Text>
</Link>
</Action>
|
arch/arm/src/armv8-m/up_svcall.c : Add missing TZ_LoadContext_S when restore context
Before restoring the tcb context, we should load the secure context of next running tcb. | @@ -265,6 +265,12 @@ int up_svcall(int irq, FAR void *context, FAR void *arg)
DEBUGASSERT(regs[REG_R1] != 0);
current_regs = (uint32_t *)regs[REG_R1];
+#ifdef CONFIG_ARMV8M_TRUSTZONE
+ if (rtcb->tz_context) {
+ TZ_LoadContext_S(rtcb->tz_context);
+ }
+#endif
+
/* Restore the MPU registers in case we are switching to an application task */
#if (defined(CONFIG_ARMV8M_MPU) && defined(CONFIG_APP_BINARY_SEPARATION))
/* Condition check : Update MPU registers only if this is not a kernel thread. */
|
sysdeps/managarm: convert sys_getpid to helix_ng | @@ -415,35 +415,24 @@ pid_t sys_gettid() {
pid_t sys_getpid() {
SignalGuard sguard;
- HelAction actions[3];
- globalQueue.trim();
managarm::posix::GetPidRequest<MemoryAllocator> req(getSysdepsAllocator());
- frg::string<MemoryAllocator> ser(getSysdepsAllocator());
- req.SerializeToString(&ser);
- actions[0].type = kHelActionOffer;
- actions[0].flags = kHelItemAncillary;
- actions[1].type = kHelActionSendFromBuffer;
- actions[1].flags = kHelItemChain;
- actions[1].buffer = ser.data();
- actions[1].length = ser.size();
- actions[2].type = kHelActionRecvInline;
- actions[2].flags = 0;
- HEL_CHECK(helSubmitAsync(getPosixLane(), actions, 3,
- globalQueue.getQueue(), 0, 0));
-
- auto element = globalQueue.dequeueSingle();
- auto offer = parseHandle(element);
- auto send_req = parseSimple(element);
- auto recv_resp = parseInline(element);
+ auto [offer, send_head, recv_resp] =
+ exchangeMsgsSync(
+ getPosixLane(),
+ helix_ng::offer(
+ helix_ng::sendBragiHeadOnly(req, getSysdepsAllocator()),
+ helix_ng::recvInline()
+ )
+ );
- HEL_CHECK(offer->error);
- HEL_CHECK(send_req->error);
- HEL_CHECK(recv_resp->error);
+ HEL_CHECK(offer.error());
+ HEL_CHECK(send_head.error());
+ HEL_CHECK(recv_resp.error());
managarm::posix::SvrResponse<MemoryAllocator> resp(getSysdepsAllocator());
- resp.ParseFromArray(recv_resp->data, recv_resp->length);
+ resp.ParseFromArray(recv_resp.data(), recv_resp.length());
__ensure(resp.error() == managarm::posix::Errors::SUCCESS);
return resp.pid();
}
|
Execute transmit process function each time user try to send | @@ -182,6 +182,7 @@ void Robus_ServicesClear(void)
******************************************************************************/
error_return_t Robus_SetTxTask(ll_service_t *ll_service, msg_t *msg)
{
+ error_return_t error = SUCCEED;
uint8_t ack = 0;
uint16_t data_size = 0;
uint16_t crc_val = 0xFFFF;
@@ -227,7 +228,7 @@ error_return_t Robus_SetTxTask(ll_service_t *ll_service, msg_t *msg)
// ********** Allocate the message ********************
if (MsgAlloc_SetTxTask(ll_service, (uint8_t *)msg->stream, crc_val, full_size, localhost, ack) == FAILED)
{
- return FAILED;
+ error = FAILED;
}
// **********Try to send the message********************
#ifndef VERBOSE_LOCALHOST
@@ -238,7 +239,7 @@ error_return_t Robus_SetTxTask(ll_service_t *ll_service, msg_t *msg)
#ifndef VERBOSE_LOCALHOST
}
#endif
- return SUCCEED;
+ return error;
}
/******************************************************************************
* @brief Send Msg to a service
|
Make test_alloc_parse_public_doctype_long_name() robust vs allocation | @@ -8893,20 +8893,9 @@ START_TEST(test_alloc_parse_public_doctype_long_name)
"'>\n"
"<doc></doc>";
int i;
-#define MAX_ALLOC_COUNT 10
- int repeat = 0;
+#define MAX_ALLOC_COUNT 25
for (i = 0; i < MAX_ALLOC_COUNT; i++) {
- /* Repeat some counts to defeat cached allocations */
- if (i == 4 && repeat == 6) {
- i -= 2;
- repeat++;
- }
- else if ((i == 2 && repeat < 3) ||
- (i == 3 && repeat < 6)) {
- i--;
- repeat++;
- }
allocation_count = i;
XML_SetDoctypeDeclHandler(parser,
dummy_start_doctype_decl_handler,
@@ -8914,7 +8903,9 @@ START_TEST(test_alloc_parse_public_doctype_long_name)
if (_XML_Parse_SINGLE_BYTES(parser, text, strlen(text),
XML_TRUE) != XML_STATUS_ERROR)
break;
- XML_ParserReset(parser, NULL);
+ /* See comment in test_alloc_parse_xdecl() */
+ alloc_teardown();
+ alloc_setup();
}
if (i == 0)
fail("Parse succeeded despite failing allocator");
|
Fix assertion in `default_decrypt_cid`->`ptls_cipher_encrypt`
`ptls_cipher_encrypt` ends up calling `EVP_DecryptUpdate`, in `picotls/lib/openssl.c`. In 1.1.1a, `EVP_DecryptUpdate` checks that the output and the input are not overlapping:
crypto/evp/evp_enc.c
```
326 if (is_partially_overlapping(out + ctx->buf_len, in, cmpl)) {
327 EVPerr(EVP_F_EVP_ENCRYPTUPDATE,
EVP_R_PARTIALLY_OVERLAPPING);
328 return 0;
329 }
``` | @@ -4305,13 +4305,14 @@ static size_t default_decrypt_cid(quicly_cid_encryptor_t *_self, quicly_cid_plai
/* decrypt */
if (len != 0 && len != cid_len) {
+ uint8_t ebuf[16];
/* normalize the input, so that we would get consistent routing */
if (len > cid_len)
len = cid_len;
- memcpy(buf, encrypted, cid_len);
+ memcpy(ebuf, encrypted, cid_len);
if (len < cid_len)
- memset(buf + len, 0, cid_len - len);
- ptls_cipher_encrypt(self->cid_decrypt_ctx, buf, buf, cid_len);
+ memset(ebuf + len, 0, cid_len - len);
+ ptls_cipher_encrypt(self->cid_decrypt_ctx, buf, ebuf, cid_len);
} else {
ptls_cipher_encrypt(self->cid_decrypt_ctx, buf, encrypted, cid_len);
}
|
Change handling of infinite PSNR in encmain
Changes encmain to print 999.99 as PSNR when SSE is zero. This behavior
is in line with HM. Previously SSE was set to 99 when it was zero. | @@ -83,11 +83,11 @@ static unsigned get_padding(unsigned width_or_height){
}
}
-#if KVZ_BIT_DEPTH == 8
-#define PSNRMAX (255.0 * 255.0)
-#else
- #define PSNRMAX ((double)PIXEL_MAX * (double)PIXEL_MAX)
-#endif
+/**
+ * \brief Value that is printed instead of PSNR when SSE is zero.
+ */
+static const double MAX_PSNR = 999.99;
+static const double MAX_SQUARED_ERROR = (double)PIXEL_MAX * (double)PIXEL_MAX;
/**
* \brief Calculates image PSNR value
@@ -105,21 +105,24 @@ static void compute_psnr(const kvz_picture *const src,
int32_t pixels = src->width * src->height;
int colors = rec->chroma_format == KVZ_CSP_400 ? 1 : 3;
+ double sse[3] = { 0.0 };
for (int32_t c = 0; c < colors; ++c) {
int32_t num_pixels = pixels;
if (c != COLOR_Y) {
num_pixels >>= 2;
}
- psnr[c] = 0;
for (int32_t i = 0; i < num_pixels; ++i) {
const int32_t error = src->data[c][i] - rec->data[c][i];
- psnr[c] += error * error;
+ sse[c] += error * error;
}
// Avoid division by zero
- if (psnr[c] == 0) psnr[c] = 99.0;
- psnr[c] = 10 * log10((num_pixels * PSNRMAX) / ((double)psnr[c]));;
+ if (sse[c] == 0.0) {
+ psnr[c] = MAX_PSNR;
+ } else {
+ psnr[c] = 10.0 * log10(num_pixels * MAX_SQUARED_ERROR / sse[c]);
+ }
}
}
|
Added doxygen comments to most of the constants defined in constants.h | // These are in units of Mpc (no factor of h)
#define K_PIVOT 0.05
+/** @file */
+
#define K_MAX_SPLINE 50.
#define K_MAX 1e3
#define K_MIN_DEFAULT 5e-5
#define N_K 1000
-//Rho critical in units of M_sun/h / (Mpc/h)^3
+/**
+ * Rho critical in units of M_sun/h / (Mpc/h)^3
+ */
#define RHO_CRITICAL 2.7744948E11
-//Lightspeed / H0 in units of Mpc/h
+/**
+ * Lightspeed / H0 in units of Mpc/h
+ */
#define CLIGHT_HMPC 2997.92458 //H0^-1 in Mpc/h
-//Newton's gravitational constant
-#define GNEWT 6.6738e-11 //(from PDG 2013) in m^3/Kg/s^2
+/**
+ * Newton's gravitational constant in units of m^3/Kg/s^2 (from PDG 2013)
+ */
+#define GNEWT 6.6738e-11
+
+/**
+ * Solar mass in units ofkg (from PDG 2013)
+ */
+#define SOLAR_MASS 1.9885e30
-//Solar mass
-#define SOLAR_MASS 1.9885e30 //in kg (from PDG 2013)
+/**
+ * Mpc to meters (from PDG 2013)
+ */
+#define MPC_TO_METER 3.08567758149e22
-//Distance conversions
-#define MPC_TO_METER 3.08567758149e22 //(from PDG 2013) Mpc to m
-#define PC_TO_METER 3.08567758149e16 //(from PDG 2013) pc to m
+/**
+ * pc to meters (from PDG 2013)
+ */
+#define PC_TO_METER 3.08567758149e16
//Precision parameters
+/**
+ * Relative precision in distance calculations
+ */
#define EPSREL_DIST 1E-6
+
+/**
+ * Relative precision in growth calculations
+ */
#define EPSREL_GROWTH 1E-6
+
+/**
+ * Relative precision in dNdz calculations
+ */
#define EPSREL_DNDZ 1E-6
+
+/**
+ * Absolute precision in growth calculations
+ */
#define EPS_SCALEFAC_GROWTH 1E-6
//LSST specific numbers
|
Leaf: Add roundtrip test | @@ -63,6 +63,26 @@ void test_get (CppKeySet keys, CppKeySet expected, int const status = ELEKTRA_PL
CLOSE_PLUGIN ();
}
+void test_roundtrip (CppKeySet keys, int const status = ELEKTRA_PLUGIN_STATUS_SUCCESS)
+#ifdef __llvm__
+ __attribute__ ((annotate ("oclint:suppress[high ncss method]")))
+#endif
+{
+ CppKeySet input = keys.dup ();
+
+ OPEN_PLUGIN (PREFIX, "file/path"); //! OCLint (too few branches switch, empty if statement)
+
+ succeed_if_same (plugin->kdbSet (plugin, keys.getKeySet (), *parent), //! OCLint (too few branches switch, empty if statement)
+ status, "Call of `kdbSet` failed");
+
+ succeed_if_same (plugin->kdbGet (plugin, keys.getKeySet (), *parent), //! OCLint (too few branches switch, empty if statement)
+ status, "Call of `kdbGet` failed");
+
+ compare_keyset (input, keys); //! OCLint (too few branches switch)
+
+ CLOSE_PLUGIN ();
+}
+
// -- Tests --------------------------------------------------------------------------------------------------------------------------------
TEST (leaf, basics)
@@ -99,3 +119,10 @@ TEST (leaf, set)
#include "leaf/simple_set.hpp"
);
}
+
+TEST (leaf, roundtrip)
+{
+ test_roundtrip (
+#include "leaf/simple_get.hpp"
+ );
+}
|
Do not allocate memory if num vblks is zero | @@ -2629,6 +2629,11 @@ kvset_iter_enable_mblock_read(struct kvset_iterator *iter)
* reader because vblocks will be consumed in order. Kvsets
* produced by kcompaction will need one reader for each vgroup.
*/
+ if (!iter->ks->ks_vgroups) {
+ iter->vreaders = NULL;
+ return 0;
+ }
+
iter->vreaders = calloc(iter->ks->ks_vgroups, sizeof(*iter->vreaders));
if (ev(!iter->vreaders))
goto nomem;
|
configure with opari for gnu7 | @@ -135,7 +135,9 @@ export CONFIG_ARCH=%{machine}
-pdt=$PDTOOLKIT_DIR \
-useropt="%optflags -I$MPI_INCLUDE_DIR -I$PWD/include -fno-strict-aliasing" \
-openmp \
+%if %{compiler_family} != intel
-opari \
+%endif
-extrashlibopts="-fPIC -L$MPI_LIB_DIR -lmpi -L/tmp/%{install_path}/lib -L/tmp/%{install_path}/%{machine}/lib"
make install
|
[DOC]Fix two broken links in INSTALL.md; Change name of zlib flag to the current one.
CLA: trivial | @@ -141,7 +141,7 @@ Quick Installation Guide
If you just want to get OpenSSL installed without bothering too much
about the details, here is the short version of how to build and install
OpenSSL. If any of the following steps fails, please consult the
-[Installation in Detail](#installation-in-detail) section below.
+[Installation in Detail](#installation-steps-in-detail) section below.
Building OpenSSL
----------------
@@ -395,7 +395,7 @@ ZLib Flags
--with-zlib-include=DIR
The directory for the location of the zlib include file. This option is only
-necessary if [enable-zlib](#enable-zlib) is used and the include file is not
+necessary if [zlib](#zlib) is used and the include file is not
already on the system include path.
### with-zlib-lib
|
Add Ruby to build_linux.sh. | @@ -156,3 +156,25 @@ BUILD_PYTHON 2.7
BUILD_PYTHON 3.5
BUILD_PYTHON 3.6
BUILD_PYTHON 3.7
+
+#################################### Ruby #####################################
+BUILD_RUBY() {
+ docker build -t ${IMAGE_NAME} -f - ${ROOT_DIR} <<-END
+ FROM ruby:${1}-stretch
+ ${SETUP_CMDS}
+ END
+ docker run --rm --name ${TAG} --volume "${VOLUME}:${STORAGE}" \
+ ${IMAGE_NAME} /bin/bash -c "cmake \
+ -DCMAKE_BUILD_TYPE=Release \
+ -DTINYSPLINE_ENABLE_RUBY=True . && \
+ gem build *.gemspec && \
+ for f in ./*.gem; \
+ do mv \$f \${f/.gem/.ruby${1}.gem}; done && \
+ chown $(id -u):$(id -g) ./*.gem && \
+ cp -a ./*.gem ${STORAGE}"
+ docker rmi ${IMAGE_NAME}
+}
+
+BUILD_RUBY 2.4
+BUILD_RUBY 2.5
+BUILD_RUBY 2.6
|
CI: update build tasks for crypto plugins | @@ -702,8 +702,8 @@ def generateFullBuildStages() {
// Run memory analysis of the crypto plugins in separate environment as theses tests are quite unstable
tasks << buildAndTest(
- "debian-unstable-cryptoplugins",
- DOCKER_IMAGES.sid,
+ "debian-buster-cryptoplugins",
+ DOCKER_IMAGES.buster,
CMAKE_FLAGS_BUILD_ALL+
CMAKE_FLAGS_DEBUG + [
'PLUGINS': 'dump;resolver_fm_hpu_b;list;spec;sync;crypto;fcrypt;gpgme;base64',
@@ -725,18 +725,6 @@ def generateFullBuildStages() {
[TEST.CRYPTOS]
)
- tasks << buildAndTest(
- "fedora-31-cryptoplugins",
- DOCKER_IMAGES.fedora_31,
- CMAKE_FLAGS_BUILD_ALL+
- CMAKE_FLAGS_DEBUG + [
- 'PLUGINS': 'dump;resolver_fm_hpu_b;list;spec;sync;fcrypt;gpgme;base64',
- 'TOOLS': 'kdb;gen-gpg-testkey',
- 'BINDINGS': '',
- ],
- [TEST.CRYPTOS]
- )
-
// We need the webui_base image to build webui images later
tasks << buildImageStage(DOCKER_IMAGES.webui_base)
|
scope~ improve resize and change cursor | @@ -98,7 +98,7 @@ static void scope_draw_handle(t_scope *x, int state){
t_handle *sh = (t_handle *)x->x_handle;
if(state){
if(sh->h_selectedmode == 0){
- sys_vgui("canvas %s -width %d -height %d -bg %s -bd 0\n",
+ sys_vgui("canvas %s -width %d -height %d -bg %s -bd 0 -cursor bottom_right_corner\n",
sh->h_pathname, HANDLE_SIZE, HANDLE_SIZE, SCOPE_SELCOLOR);
sh->h_selectedmode = 1;
}
@@ -615,12 +615,14 @@ static void handle__motion_callback(t_handle *sh, t_floatarg f1, t_floatarg f2){
int dx = (int)f1, dy = (int)f2, x1, y1, x2, y2, newx, newy;
scope_getrect((t_gobj *)x, x->x_glist, &x1, &y1, &x2, &y2);
newx = x2 + dx, newy = y2 + dy;
- if(newx > x1 + SCOPE_MINSIZE && newy > y1 + SCOPE_MINSIZE){
+ if(newx < x1 + SCOPE_MINSIZE*x->x_zoom)
+ newx = x1 + SCOPE_MINSIZE*x->x_zoom;
+ if(newy < y1 + SCOPE_MINSIZE*x->x_zoom)
+ newy = y1 + SCOPE_MINSIZE*x->x_zoom;
sys_vgui(".x%lx.c coords %s %d %d %d %d\n", x->x_cv, sh->h_outlinetag, x1, y1, newx, newy);
sh->h_dragx = dx, sh->h_dragy = dy;
}
}
-}
//------------------------------------------------------------
static t_int *scope_perform(t_int *w){
|
hslua-marshalling: remove redundant import of Data.Semigroup | @@ -37,9 +37,6 @@ import Control.Monad ((<$!>), (<=<))
import Data.ByteString (ByteString)
import Data.List (intercalate)
import HsLua.Core as Lua
-#if !MIN_VERSION_base(4,12,0)
-import Data.Semigroup (Semigroup ((<>)))
-#endif
#if !MIN_VERSION_base(4,13,0)
import Control.Monad.Fail (MonadFail (..))
#endif
|
Update location of the libfuzzer repository
GH: | @@ -27,7 +27,7 @@ https://github.com/llvm-mirror/llvm/tree/master/lib/Fuzzer if you prefer):
$ sudo apt-get install subversion
$ mkdir svn-work
$ cd svn-work
- $ svn co http://llvm.org/svn/llvm-project/llvm/trunk/lib/Fuzzer
+ $ svn co https://llvm.org/svn/llvm-project/compiler-rt/trunk/lib/fuzzer Fuzzer
$ cd Fuzzer
$ clang++ -c -g -O2 -std=c++11 *.cpp
$ ar r libFuzzer.a *.o
|
libdemandpaging: fix wrong cnode size | @@ -482,7 +482,8 @@ errval_t demand_paging_region_create(size_t bytes, size_t pagesize, size_t numfr
/* allocate the frames */
struct capref frame;
- err = frame_alloc(&frame, numframes * pagesize, NULL);
+ size_t allocated_size;
+ err = frame_alloc(&frame, numframes * pagesize, &allocated_size);
if (err_is_fail(err)) {
USER_PANIC_ERR(err, "frame alloc\n");
}
@@ -492,7 +493,7 @@ errval_t demand_paging_region_create(size_t bytes, size_t pagesize, size_t numfr
struct capref cnode_cap;
struct capref frames;
- err = cnode_create(&cnode_cap, &frames.cnode, id.base / pagesize, NULL);
+ err = cnode_create(&cnode_cap, &frames.cnode, allocated_size / pagesize, NULL);
if (err_is_fail(err)) {
USER_PANIC_ERR(err, "cnode create\n");
}
|
Sensor OIC notif - remove int clearing
interrupt clearing is not needed as a duration is set. | @@ -1288,15 +1288,7 @@ lis2dh12_enable_int1(struct sensor_itf *itf, uint8_t *reg)
static void
lis2dh12_low_int1_irq_handler(void *arg)
{
- struct sensor_itf *itf;
- struct sensor_read_ev_ctx *srec;
-
- srec = arg;
-
sensor_mgr_put_read_evt(arg);
- itf = SENSOR_GET_ITF(srec->srec_sensor);
- lis2dh12_clear_int1(itf);
-
}
/**
@@ -1307,15 +1299,7 @@ lis2dh12_low_int1_irq_handler(void *arg)
static void
lis2dh12_high_int2_irq_handler(void *arg)
{
- struct sensor_itf *itf;
- struct sensor_read_ev_ctx *srec;
-
- srec = arg;
-
sensor_mgr_put_read_evt(arg);
- itf = SENSOR_GET_ITF(srec->srec_sensor);
- lis2dh12_clear_int2(itf);
-
}
/* Set the trigger threshold values and enable interrupts
|
update docs to include necessary packages | @@ -44,7 +44,9 @@ reg add "HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\SecurityProviders\S
- To decode the `quic.etl` file, run **TODO**
## Building on Linux (or [WSL](https://docs.microsoft.com/en-us/windows/wsl/wsl2-install))
-
+- Install tooling (WSL2 or Ubuntu)
+ - `sudo apt-get install cmake`
+ - `sudo apt-get install build-essentials`
- Run `mkdir bld && cd bld`
- Run `cmake -G "Unix Makefiles" ..`
- Run `cmake --build . --config RELEASE`
|
docs/glossary: interned string: Typo fix. | @@ -106,7 +106,7 @@ Glossary
time (proportional to the number of existing interned strings,
i.e. becoming slower and slower over time) and that the space
used for interned strings is not reclaimable. String interning
- is done automatically by MicroPython compiler and runtimer when
+ is done automatically by MicroPython compiler and runtime when
it's either required by the implementation (e.g. function keyword
arguments are represented by interned string id's) or deemed
beneficial (e.g. for short enough strings, which have a chance
|
libhfuzz/performance: split the main function into smaller ones | #include "libhfcommon/util.h"
#define HF_USEC_PER_SEC 1000000
-#define HF_CHECK_INTERVAL (HF_USEC_PER_SEC * 20) /* Peform check every 20 sec. */
+#define HF_CHECK_INTERVAL_USECS (HF_USEC_PER_SEC * 20) /* Peform check every 20 sec. */
static uint64_t iterCnt = 0;
static time_t firstInputUSecs = 0;
-static uint64_t first1000USecsPerExec = 0;
+
+static uint64_t initialUSecsPerExec = 0;
+
static uint64_t lastCheckUSecs = 0;
static uint64_t lastCheckIters = 0;
-void performanceCheck(void) {
- iterCnt += 1;
+static bool performanceInit(void) {
if (iterCnt == 1) {
firstInputUSecs = util_timeNowUSecs();
}
- if (iterCnt == 1000) {
- first1000USecsPerExec = (util_timeNowUSecs() - firstInputUSecs) / 1000;
- if (first1000USecsPerExec == 0) {
- first1000USecsPerExec = 1;
- }
+
+ uint64_t timeDiffUSecs = util_timeNowUSecs() - firstInputUSecs;
+ if (iterCnt == 5000 || timeDiffUSecs > HF_CHECK_INTERVAL_USECS) {
+ initialUSecsPerExec = timeDiffUSecs / iterCnt;
lastCheckUSecs = util_timeNowUSecs();
- lastCheckIters = 0;
+ lastCheckIters = iterCnt;
+ return true;
}
- if (iterCnt <= 1000) {
- return;
+
+ return false;
}
- if ((util_timeNowUSecs() - lastCheckUSecs) > HF_CHECK_INTERVAL) {
- uint64_t currentUSecsPerExec =
- (util_timeNowUSecs() - lastCheckUSecs) / (iterCnt - lastCheckIters);
- if (currentUSecsPerExec > (first1000USecsPerExec * 5)) {
- LOG_W("pid=%d became to slow, initially: %" PRIu64 " us/exec, now: %" PRIu64
- " us/exec. Restaring!",
- getpid(), first1000USecsPerExec, currentUSecsPerExec);
- exit(0);
+bool performanceTooSlow(void) {
+ uint64_t timeDiffUSecs = util_timeNowUSecs() - lastCheckUSecs;
+ if (timeDiffUSecs > HF_CHECK_INTERVAL_USECS) {
+ uint64_t currentUSecsPerExec = timeDiffUSecs / (iterCnt - lastCheckIters);
+ if (currentUSecsPerExec > (initialUSecsPerExec * 5)) {
+ LOG_W("pid=%d became too slow to process fuzzing data, initial: %" PRIu64
+ " us/exec, current: %" PRIu64 " us/exec. Restaring myself!",
+ getpid(), initialUSecsPerExec, currentUSecsPerExec);
+ return true;
}
lastCheckIters = iterCnt;
lastCheckUSecs = util_timeNowUSecs();
}
+
+ return false;
+}
+
+void performanceCheck(void) {
+ iterCnt += 1;
+
+ static bool initialized = false;
+ if (!initialized) {
+ initialized = performanceInit();
+ return;
+ }
+
+ if (performanceTooSlow()) {
+ exit(0);
+ }
}
|
Add classifier for Python 3.6. | @@ -570,6 +570,7 @@ setup(name = 'mod_wsgi',
'Programming Language :: Python :: 3.3',
'Programming Language :: Python :: 3.4',
'Programming Language :: Python :: 3.5',
+ 'Programming Language :: Python :: 3.6',
'Topic :: Internet :: WWW/HTTP :: WSGI',
'Topic :: Internet :: WWW/HTTP :: WSGI :: Server'
],
|
Removed testing tag from catboost/pytest/cuda_tests/yt_spec.json
issue:DEVTOOLS-5374 | {
"operation_spec": {
- "scheduling_tag_filter": "porto & testing",
+ "scheduling_tag_filter": "porto",
"pool_trees": [
"gpu_geforce_1080ti"
]
|
Fix CID Use After Free | @@ -3517,6 +3517,7 @@ QuicConnRecvPayload(
TRUE,
&IsLastCid);
if (SourceCid != NULL) {
+ BOOLEAN CidAlreadyRetired = SourceCid->CID.Retired;
QuicBindingRemoveSourceConnectionID(
Connection->Paths[0].Binding, SourceCid);
QuicTraceEvent(ConnSourceCidRemoved,
@@ -3529,7 +3530,7 @@ QuicConnRecvPayload(
QUIC_CLOSE_INTERNAL_SILENT,
QUIC_ERROR_PROTOCOL_VIOLATION,
NULL);
- } else if (!SourceCid->CID.Retired) {
+ } else if (!CidAlreadyRetired) {
//
// Replace the CID if we weren't the one to request it to be
// retired in the first place.
|
firfilt: recreate() method now uses internal dotprod recreate() | /*
- * Copyright (c) 2007 - 2015 Joseph Gaeddert
+ * Copyright (c) 2007 - 2018 Joseph Gaeddert
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
@@ -229,9 +229,8 @@ FIRFILT() FIRFILT(_recreate)(FIRFILT() _q,
for (i=_n; i>0; i--)
_q->h[i-1] = _h[_n-i];
- // re-create dot product object
- DOTPROD(_destroy)(_q->dp);
- _q->dp = DOTPROD(_create)(_q->h, _q->h_len);
+ // re-create internal dot product object
+ _q->dp = DOTPROD(_recreate)(_q->dp, _q->h, _q->h_len);
return _q;
}
|
doc: Add missing markup in CREATE EVENT TRIGGER page
Reported-by: rir
Discussion:
Backpatch-through: 9.6 | @@ -23,7 +23,7 @@ PostgreSQL documentation
<synopsis>
CREATE EVENT TRIGGER <replaceable class="parameter">name</replaceable>
ON <replaceable class="parameter">event</replaceable>
- [ WHEN <replaceable class="parameter">filter_variable</replaceable> IN (filter_value [, ... ]) [ AND ... ] ]
+ [ WHEN <replaceable class="parameter">filter_variable</replaceable> IN (<replaceable class="parameter">filter_value</replaceable> [, ... ]) [ AND ... ] ]
EXECUTE { FUNCTION | PROCEDURE } <replaceable class="parameter">function_name</replaceable>()
</synopsis>
</refsynopsisdiv>
|
Solve python call benchmark bug. | class metacall_py_call_bench : public benchmark::Fixture
{
public:
- void SetUp(benchmark::State &state)
- {
- metacall_print_info();
-
- metacall_log_null();
-
- if (metacall_initialize() != 0)
- {
- state.SkipWithError("Error initializing MetaCall");
- }
-
-/* Python */
-#if defined(OPTION_BUILD_LOADERS_PY)
- {
- static const char tag[] = "py";
-
- static const char int_mem_type[] =
- "#!/usr/bin/env python3\n"
- "def int_mem_type(left: int, right: int) -> int:\n"
- "\treturn 0;";
-
- if (metacall_load_from_memory(tag, int_mem_type, sizeof(int_mem_type), NULL) != 0)
- {
- state.SkipWithError("Error loading int_mem_type function");
- }
- }
-#endif /* OPTION_BUILD_LOADERS_PY */
- }
-
- void TearDown(benchmark::State &state)
- {
- if (metacall_destroy() != 0)
- {
- state.SkipWithError("Error destroying MetaCall");
- }
- }
};
BENCHMARK_DEFINE_F(metacall_py_call_bench, call_va_args)
@@ -174,4 +138,52 @@ BENCHMARK_REGISTER_F(metacall_py_call_bench, call_array_args)
->Iterations(1)
->Repetitions(5);
-BENCHMARK_MAIN();
+/* Use main for initializing MetaCall once. There's a bug in Python async which prevents reinitialization */
+/* https://github.com/python/cpython/issues/89425 */
+/* https://bugs.python.org/issue45262 */
+/* metacall-py-call-benchd: ./Modules/_asynciomodule.c:261: get_running_loop: Assertion `Py_IS_TYPE(rl, &PyRunningLoopHolder_Type)' failed. */
+int main(int argc, char *argv[])
+{
+ metacall_print_info();
+
+ metacall_log_null();
+
+ if (metacall_initialize() != 0)
+ {
+ return 1;
+ }
+
+/* Python */
+#if defined(OPTION_BUILD_LOADERS_PY)
+ {
+ static const char tag[] = "py";
+
+ static const char int_mem_type[] =
+ "#!/usr/bin/env python3\n"
+ "def int_mem_type(left: int, right: int) -> int:\n"
+ "\treturn 0;";
+
+ if (metacall_load_from_memory(tag, int_mem_type, sizeof(int_mem_type), NULL) != 0)
+ {
+ return 2;
+ }
+ }
+#endif /* OPTION_BUILD_LOADERS_PY */
+
+ ::benchmark::Initialize(&argc, argv);
+
+ if (::benchmark::ReportUnrecognizedArguments(argc, argv))
+ {
+ return 3;
+ }
+
+ ::benchmark::RunSpecifiedBenchmarks();
+ ::benchmark::Shutdown();
+
+ if (metacall_destroy() != 0)
+ {
+ return 4;
+ }
+
+ return 0;
+}
|
cmake: add examples link to elektra_kdb_gen | @@ -66,6 +66,7 @@ set (Elektra_STATIC @BUILD_STATIC@)
# If <output_dir> is not set explicitly, it defaults to `CMAKE_CURRENT_BINARY_DIR`.
# `<params>...` and `<options>...` are omitted from the `kdb gen` call, if they aren't defined.
#
+# Full examples can be found online: https://github.com/ElektraInitiative/libelektra/tree/master/examples/codegen
# ~~~
function (elektra_kdb_gen
template
|
Prevent uint32_t overflow | @@ -61,7 +61,8 @@ static inline uint32_t ocf_part_get_min_size(ocf_cache_t cache,
{
uint64_t ioclass_size;
- ioclass_size = part->config->min_size * cache->conf_meta->cachelines;
+ ioclass_size = (uint64_t)part->config->min_size *
+ (uint64_t)cache->conf_meta->cachelines;
ioclass_size /= 100;
|
test: pake: minor enhancement for opaque keys | @@ -6247,6 +6247,9 @@ void ssl_ecjpake_set_password( int use_opaque_arg )
ECJPAKE_TEST_SET_PASSWORD( MBEDTLS_ERR_SSL_HW_ACCEL_FAILED );
+ /* check that the opaque key is still valid after failure */
+ TEST_ASSERT( ! mbedtls_svc_key_id_is_null( pwd_slot ) );
+
psa_destroy_key( pwd_slot );
/* Then set the correct usage */
|
Set stkmon_started=FALSE in error case
pthread_cancel kills the thread and stkmon logging will be stopped immediately.
hence set the variable stkmon_started to FALSE so that user can re-attempt
command "stkmon" from tash | @@ -272,6 +272,8 @@ int kdbg_stackmonitor(int argc, char **args)
if (ret != OK) {
printf(STKMON_PREFIX "ERROR: Failed to detach the stack monitor: %d\n", errno);
pthread_cancel(stkmon);
+ stkmon_started = FALSE;
+ return ERROR;
}
} else {
printf(STKMON_PREFIX "already started\n");
|
suppress documentation warnings | * @param[in] v1 second vertex of triangle
* @param[in] v2 third vertex of triangle
* @param[in, out] d distance to intersection
- * @param[out] intersection whether there is intersection
+ * @return whether there is intersection
*/
CGLM_INLINE
@@ -46,29 +46,25 @@ glm_ray_triangle(vec3 origin,
glm_vec3_sub(v1, v0, edge1);
glm_vec3_sub(v2, v0, edge2);
-
glm_vec3_cross(direction, edge2, p);
det = glm_vec3_dot(edge1, p);
-
if (det > -epsilon && det < epsilon)
- return 0;
+ return false;
inv_det = 1.0f / det;
glm_vec3_sub(origin, v0, t);
u = inv_det * glm_vec3_dot(t, p);
-
if (u < 0.0f || u > 1.0f)
- return 0;
+ return false;
glm_vec3_cross(t, edge1, q);
v = inv_det * glm_vec3_dot(direction, q);
-
if (v < 0.0f || u + v > 1.0f)
- return 0;
+ return false;
dist = inv_det * glm_vec3_dot(edge2, q);
|
core/pci: use !platform.bmc hack over fsp_present() | #include <pci-quirk.h>
#include <timebase.h>
#include <device.h>
-#include <fsp.h>
#define MAX_PHB_ID 256
static struct phb *phbs[MAX_PHB_ID];
@@ -1461,7 +1460,7 @@ static void pci_add_loc_code(struct dt_node *np, struct pci_device *pd)
/* XXX Don't do that on openpower for now, we will need to sort things
* out later, otherwise the mezzanine slot on Habanero gets weird results
*/
- if (class == 0x02 && sub == 0x00 && fsp_present()) {
+ if (class == 0x02 && sub == 0x00 && !platform.bmc) {
/* There's usually several spaces at the end of the property.
Test for, but don't rely on, that being the case */
len = strlen(blcode);
|
Fix compilation: use 9.4 version of SyncRepGetStandbyPriority | @@ -856,8 +856,10 @@ SyncRepGetSyncStandbys(bool *am_sync)
static int
SyncRepGetStandbyPriority(void)
{
- const char *standby_name;
- int priority;
+ char *rawstring;
+ List *elemlist;
+ ListCell *l;
+ int priority = 0;
bool found = false;
/*
@@ -867,29 +869,37 @@ SyncRepGetStandbyPriority(void)
if (am_cascading_walsender)
return 0;
- if (!SyncStandbysDefined() || SyncRepConfig == NULL)
+ /* Need a modifiable copy of string */
+ rawstring = pstrdup(SyncRepStandbyNames);
+
+ /* Parse string into list of identifiers */
+ if (!SplitIdentifierString(rawstring, ',', &elemlist))
+ {
+ /* syntax error in list */
+ pfree(rawstring);
+ list_free(elemlist);
+ /* GUC machinery will have already complained - no need to do again */
return 0;
+ }
- standby_name = SyncRepConfig->member_names;
- for (priority = 1; priority <= SyncRepConfig->nmembers; priority++)
+ foreach(l, elemlist)
{
+ char *standby_name = (char *) lfirst(l);
+
+ priority++;
+
if (pg_strcasecmp(standby_name, application_name) == 0 ||
- strcmp(standby_name, "*") == 0)
+ pg_strcasecmp(standby_name, "*") == 0)
{
found = true;
break;
}
- standby_name += strlen(standby_name) + 1;
}
- if (!found)
- return 0;
+ pfree(rawstring);
+ list_free(elemlist);
- /*
- * In quorum-based sync replication, all the standbys in the list have the
- * same priority, one.
- */
- return (SyncRepConfig->syncrep_method == SYNC_REP_PRIORITY) ? priority : 1;
+ return (found ? priority : 0);
}
/*
|
Fix GitHub Issue@2682 - Islandwood News AV on accessing nullptr when launching. | @@ -363,15 +363,18 @@ static void _initUIWebView(UIWebView* self) {
[color getRed:&r green:&g blue:&b alpha:&a];
// XAML WebView transparency is not used unless it's set to the transparent system color.
+ if (_xamlWebControl) {
if (a != 1.0f) {
_xamlWebControl.DefaultBackgroundColor(winrt::Windows::UI::Colors::Transparent());
- } else {
+ }
+ else {
_xamlWebControl.DefaultBackgroundColor(winrt::Windows::UI::ColorHelper::FromArgb(255,
(unsigned char)(r * 255.0),
(unsigned char)(g * 255.0),
(unsigned char)(b * 255.0)));
}
}
+}
/**
@Status Interoperable
|
docs/TroubleShooting: add a solution of Kconfig-frontend issues
This commit shows how to resolve a problem on mconf usage. | > [Board-Specific](#board-specific)
## Common
-### Trouble on using our toolchain
-When 64 bit machine tries to use 32 bit package like GDB, you can meet below:
+### Issues on GNU toolchain
+When 64 bit machine tries to use 32 bit package like GDB, someone meets below:
```
'Launching XXX' has envountered a problem.
Could not determine GDB version after sending: /home/.../arm-none-eabi-gdb --version
@@ -20,10 +20,25 @@ Installing *lib32ncurses5* package resolves it.
sudo apt-get install lib32ncurses5
```
+### Issues on Kconfig-frontend
+When ```make menuconfig``` excutes after installing Kconfig-frontend, someone meets below:
+```
+kconfig-mconf: error while loading shared libraries: libkconfig-parser-x.xx.0.so: cannot open shared object file: No such file or directory
+Makefile.unix:579: recipe for target 'menuconfig' failed
+make: *** [menuconfig] Error 127
+```
+To resolve:
+```
+cd <Kconfig-frontend_package_PATH>
+./configure --prefix=/usr
+make
+sudo make install
+```
+
## Board-Specific
### ARTIK
-#### Trouble on programming
-When USB connection is not established, you can meet below:
+#### Issues on Programming
+When USB connection is not established, someone meets below:
```
[Command] make download ALL
Generating partition map ... Done
|
index.md: fix readme-espressif.md link | @@ -44,7 +44,7 @@ The MCUboot documentation is composed of the following pages:
- [Apache NuttX](readme-nuttx.md)
- [RIOT](readme-riot.md)
- [Mbed OS](readme-mbed.md)
- - [Espressif](docs/readme-espressif.md)
+ - [Espressif](readme-espressif.md)
- [Cypress/Infineon](../boot/cypress/readme.md)
- [Simulator](../sim/README.rst)
- Testing
|
[MQTT5] Handle disconnect WIP | @@ -1154,6 +1154,15 @@ parse_publish_vhdr(struct mqtt_connection *conn,
}
}
/*---------------------------------------------------------------------------*/
+#if MQTT_PROTOCOL_VERSION >= MQTT_PROTOCOL_VERSION_5
+static void
+handle_disconnect(struct mqtt_connection *conn)
+{
+ DBG("MQTT - (handle_disconnect) Got DISCONNECT.\n");
+// DBG("MQTT - (handle_disconnect) remaining_len %u\n", conn->remaining_length);
+}
+#endif
+/*---------------------------------------------------------------------------*/
static int
tcp_input(struct tcp_socket *s,
void *ptr,
@@ -1321,6 +1330,12 @@ tcp_input(struct tcp_socket *s,
(conn->in_packet.fhdr & 0xF0));
break;
+#if MQTT_PROTOCOL_VERSION >= MQTT_PROTOCOL_VERSION_5
+ case MQTT_FHDR_MSG_TYPE_DISCONNECT:
+ handle_disconnect(conn);
+ break;
+#endif
+
default:
/* All server-only message */
PRINTF("MQTT - Got MQTT Message Type '%i'", (conn->in_packet.fhdr & 0xF0));
|
collections now sends invites to whitelist | :: /app/collection/hoon
-::
/- hall, *collections
/+ hall, rekey, colls
/= cols /: /===/web/collections /collections/
:: update config in hall.
=/ nam (circle-for col)
%- ta-hall-actions :~
-:: ?: =(desc.new desc.u.old) ~
[%depict nam desc.new]
- ::
-:: ?: =(visi.new visi.u.old) ~
[%public visi.new our.bol nam]
::
:: (hall-permit nam & (~(dif in mems.new) mems.u.old))
++ ta-hall-configure
|= [nam=term cof=config] ^+ +>
^+ +>
- %- ta-hall-actions :~
- [%create nam desc.cof ?:(publ.cof %journal %village)]
+ %- ta-hall-actions
+ %+ welp
+ (hall-invite nam mems.cof)
+ :~ [%create nam desc.cof ?:(publ.cof %journal %village)]
?.(visi.cof ~ [%public & our.bol nam])
(hall-permit nam & mems.cof)
==
?~ sis ~
[%permit nam inv sis]
::
+:: hall no longer automatically invites on permit
+:: send invites manuall
+++ hall-invite
+ |= [nam=term sis=(set ship)]
+ ^- (list action:hall)
+ %+ turn
+ ~(tap in sis)
+ |= a/ship
+ :: TODO
+ [%phrase [[a %inbox] ~ ~] [[%inv & [our.bol nam]] ~]]
::
++ circle-for
|=(col/time (pack %collection (dray /[%da] col)))
|
[RAFT] prevent segmentation fault
acquire lock to access raftserver.node, which is set after creating consensus object | @@ -151,15 +151,16 @@ func newRaftServer(id uint64, listenUrl string, peers []string, join bool, waldi
}
func (rs *raftServer) SetPromotable(val bool) {
+ defer rs.lock.Unlock()
rs.lock.Lock()
rs.promotable = val
- rs.lock.Unlock()
}
func (rs *raftServer) GetPromotable() bool {
+ defer rs.lock.RUnlock()
+
rs.lock.RLock()
val := rs.promotable
- rs.lock.RUnlock()
return val
}
@@ -196,16 +197,22 @@ func (rs *raftServer) startRaft() {
PreVote: true,
}
+ var node raftlib.Node
if oldwal {
- rs.node = raftlib.RestartNode(c)
+ node = raftlib.RestartNode(c)
} else {
startPeers := rpeers
if rs.join {
startPeers = nil
}
- rs.node = raftlib.StartNode(c, startPeers)
+ node = raftlib.StartNode(c, startPeers)
}
+ logger.Debug().Msg("raft core node is started")
+
+ // need locking for sync with consensusAccessor
+ rs.setNodeSync(node)
+
rs.transport = &rafthttp.Transport{
ID: types.ID(rs.id),
ClusterID: 0x1000,
@@ -228,6 +235,23 @@ func (rs *raftServer) startRaft() {
go rs.serveChannels()
}
+func (rs *raftServer) setNodeSync(node raftlib.Node) {
+ defer rs.lock.Unlock()
+
+ rs.lock.Lock()
+ rs.node = node
+}
+
+func (rs *raftServer) getNodeSync() raftlib.Node {
+ defer rs.lock.RUnlock()
+
+ var node raftlib.Node
+ rs.lock.RLock()
+ node = rs.node
+
+ return node
+}
+
// stop closes http, closes all channels, and stops raft.
func (rs *raftServer) stop() {
rs.stopHTTP()
@@ -610,9 +634,10 @@ func (rs *raftServer) IsLeader() bool {
}
func (rs *raftServer) Status() raftlib.Status {
- if rs.node == nil {
+ node := rs.getNodeSync()
+ if node == nil {
return raftlib.Status{}
}
- return rs.node.Status()
+ return node.Status()
}
|
tools/mpy-tool.py: Fix linking qstrs in native code, and multiple files.
Fixes errors in the tool when 1) linking qstrs in native ARM-M code; 2)
freezing multiple files some of which use native code and some which don't.
Fixes issue | #
# The MIT License (MIT)
#
-# Copyright (c) 2016 Damien P. George
+# Copyright (c) 2016-2019 Damien P. George
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
@@ -479,18 +479,23 @@ class RawCodeNative(RawCode):
def _link_qstr(self, pc, kind, qst):
if kind == 0:
+ # Generic 16-bit link
print(' %s & 0xff, %s >> 8,' % (qst, qst))
else:
- if kind == 2:
+ # Architecture-specific link
+ is_obj = kind == 2
+ if is_obj:
qst = '((uintptr_t)MP_OBJ_NEW_QSTR(%s))' % qst
if config.native_arch in (MP_NATIVE_ARCH_X86, MP_NATIVE_ARCH_X64):
print(' %s & 0xff, %s >> 8, 0, 0,' % (qst, qst))
elif MP_NATIVE_ARCH_ARMV6M <= config.native_arch <= MP_NATIVE_ARCH_ARMV7EMDP:
if is_obj:
- self._asm_thumb_rewrite_mov(i, qst)
- self._asm_thumb_rewrite_mov(i + 4, '(%s >> 16)' % qst)
+ # qstr object, movw and movt
+ self._asm_thumb_rewrite_mov(pc, qst)
+ self._asm_thumb_rewrite_mov(pc + 4, '(%s >> 16)' % qst)
else:
- self._asm_thumb_rewrite_mov(i, qst)
+ # qstr number, movw instruction
+ self._asm_thumb_rewrite_mov(pc, qst)
else:
assert 0
@@ -663,7 +668,7 @@ def read_raw_code(f, qstr_win):
# load qstr link table
n_qstr_link = read_uint(f)
for _ in range(n_qstr_link):
- off = read_uint(f, qstr_win)
+ off = read_uint(f)
qst = read_qstr(f, qstr_win)
qstr_links.append((off >> 2, off & 3, qst))
@@ -714,7 +719,12 @@ def read_mpy(filename):
qw_size = read_uint(f)
config.MICROPY_OPT_CACHE_MAP_LOOKUP_IN_BYTECODE = (feature_byte & 1) != 0
config.MICROPY_PY_BUILTINS_STR_UNICODE = (feature_byte & 2) != 0
- config.native_arch = feature_byte >> 2
+ mpy_native_arch = feature_byte >> 2
+ if mpy_native_arch != MP_NATIVE_ARCH_NONE:
+ if config.native_arch == MP_NATIVE_ARCH_NONE:
+ config.native_arch = mpy_native_arch
+ elif config.native_arch != mpy_native_arch:
+ raise Exception('native architecture mismatch')
config.mp_small_int_bits = header[3]
qstr_win = QStrWindow(qw_size)
return read_raw_code(f, qstr_win)
@@ -838,6 +848,7 @@ def main():
'mpz':config.MICROPY_LONGINT_IMPL_MPZ,
}[args.mlongint_impl]
config.MPZ_DIG_SIZE = args.mmpz_dig_size
+ config.native_arch = MP_NATIVE_ARCH_NONE
# set config values for qstrs, and get the existing base set of qstrs
if args.qstr_header:
|
Enable runtime testing of no-deprecated builds in Travis | @@ -46,7 +46,7 @@ matrix:
- os: linux
dist: trusty
compiler: clang
- env: CONFIG_OPTS="--strict-warnings -D__NO_STRING_INLINES no-deprecated" BUILDONLY="yes"
+ env: CONFIG_OPTS="--strict-warnings -D__NO_STRING_INLINES no-deprecated"
- os: linux
dist: bionic
compiler: clang
|
Unbreak EXEC_BACKEND build
Per buildfarm | #include "utils/memutils.h"
#include "utils/pidfile.h"
#include "utils/ps_status.h"
+#include "utils/queryjumble.h"
#include "utils/timeout.h"
#include "utils/timestamp.h"
#include "utils/varlena.h"
@@ -521,7 +522,7 @@ typedef struct
pg_time_t first_syslogger_file_time;
bool redirection_done;
bool IsBinaryUpgrade;
- bool auto_query_id_enabled;
+ bool query_id_enabled;
int max_safe_fds;
int MaxBackends;
#ifdef WIN32
@@ -6169,7 +6170,7 @@ save_backend_variables(BackendParameters *param, Port *port,
param->redirection_done = redirection_done;
param->IsBinaryUpgrade = IsBinaryUpgrade;
- param->auto_query_id_enabled = auto_query_id_enabled;
+ param->query_id_enabled = query_id_enabled;
param->max_safe_fds = max_safe_fds;
param->MaxBackends = MaxBackends;
@@ -6403,7 +6404,7 @@ restore_backend_variables(BackendParameters *param, Port *port)
redirection_done = param->redirection_done;
IsBinaryUpgrade = param->IsBinaryUpgrade;
- auto_query_id_enabled = param->auto_query_id_enabled;
+ query_id_enabled = param->query_id_enabled;
max_safe_fds = param->max_safe_fds;
MaxBackends = param->MaxBackends;
|
landscape: Style chage on shipSearch tag | @@ -190,9 +190,9 @@ export function ShipSearch(props: InviteSearchProps) {
alignItems="center"
py={1}
px={2}
- border={1}
- borderColor="washedGrey"
color="black"
+ borderRadius='2'
+ bg='washedGray'
fontSize={0}
mt={2}
mr={2}
|
sdl/pixels: add RGB332Model | @@ -353,6 +353,7 @@ func (c RGB444) RGBA() (r, g, b, a uint32) {
var (
RGB444Model color.Model = color.ModelFunc(rgb444Model)
+ RGB332Model color.Model = color.ModelFunc(rgb332Model)
)
func rgb444Model(c color.Color) color.Color {
@@ -362,3 +363,22 @@ func rgb444Model(c color.Color) color.Color {
r, g, b, _ := c.RGBA()
return RGB444{uint8(r >> 12), uint8(g >> 12), uint8(b >> 12)}
}
+
+type RGB332 struct {
+ R, G, B byte
+}
+
+func (c RGB332) RGBA() (r, g, b, a uint32) {
+ r = uint32(c.R) << 13
+ g = uint32(c.G) << 13
+ b = uint32(c.B) << 14
+ return
+}
+
+func rgb332Model(c color.Color) color.Color {
+ if _, ok := c.(color.RGBA); ok {
+ return c
+ }
+ r, g, b, _ := c.RGBA()
+ return RGB332{uint8(r >> 13), uint8(g >> 13), uint8(b >> 14)}
+}
|
Fix: test case sent in invalid packet content | @@ -31,7 +31,7 @@ fake_cmd_t t4p4s_testcase_ipv4[][RTE_MAX_LCORE] = {
fake_cmd_t t4p4s_testcase_arp[][RTE_MAX_LCORE] = {
{
FSLEEP(200),
- {FAKE_PKT, 0, 1, ARP(ETH01, ETH1A), 0, NO_OUTPUT},
+ {FAKE_PKT, 0, 1, ARP(ETH01, ETH1A, "0000000000000000"), 0, NO_OUTPUT},
FEND,
},
{
|
ta: fix crash on uninitialized field | @@ -108,6 +108,7 @@ lv_obj_t * lv_ta_create(lv_obj_t * par, const lv_obj_t * copy)
ext->cursor.valid_x = 0;
ext->one_line = 0;
ext->label = NULL;
+ ext->placeholder = NULL;
lv_obj_set_signal_func(new_ta, lv_ta_signal);
lv_obj_set_signal_func(lv_page_get_scrl(new_ta), lv_ta_scrollable_signal);
|
fix sandbox_utils.cprint no color reset eol
add '\x1b[0m' on eol | @@ -100,7 +100,7 @@ end
function sandbox_utils.cprint(format, ...)
-- done
- utils._iowrite(colors(vformat(format, ...) .. "\n"))
+ utils._iowrite(colors(vformat(format, ...)) .. "\n")
end
-- print format string, the builtin variables and colors without newline
|
VERSION bump to version 2.0.180 | @@ -61,7 +61,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 179)
+set(LIBYANG_MICRO_VERSION 180)
set(LIBYANG_VERSION ${LIBYANG_MAJOR_VERSION}.${LIBYANG_MINOR_VERSION}.${LIBYANG_MICRO_VERSION})
# set version of the library
set(LIBYANG_MAJOR_SOVERSION 2)
|
fpgasupdate: add timeout loop to WRITE_BLK phase | @@ -400,13 +400,16 @@ def update_fw(fd_dev, infile):
"""
block_size = 4096
offset = 0
+ max_retries = 65
orig_pos = infile.tell()
infile.seek(0, os.SEEK_END)
payload_size = infile.tell() - orig_pos
infile.seek(orig_pos, os.SEEK_SET)
+
LOG.info('updating from file %s with size %d',
infile.name, payload_size)
+
progress_cfg = {}
level = min([l.level for l in LOG.handlers])
if level < logging.INFO:
@@ -414,8 +417,11 @@ def update_fw(fd_dev, infile):
else:
progress_cfg['stream'] = sys.stdout
- retries = 65
+ retries = max_retries
while True:
+ if retries < max_retries:
+ LOG.log(LOG_IOCTL, 'IOCTL ==> SECURE_UPDATE_START (%d)', retries)
+ else:
LOG.log(LOG_IOCTL, 'IOCTL ==> SECURE_UPDATE_START')
try:
fcntl.ioctl(fd_dev, IOCTL_IFPGA_SECURE_UPDATE_START)
@@ -429,7 +435,9 @@ def update_fw(fd_dev, infile):
to_transfer = block_size if block_size <= payload_size \
else payload_size
+
LOG.info('writing to staging area')
+
apply_time = payload_size/APPLY_BPS
with progress(bytes=payload_size, **progress_cfg) as prg:
while to_transfer:
@@ -441,22 +449,36 @@ def update_fw(fd_dev, infile):
if buf_len != to_transfer:
to_transfer = buf_len
+ retries = max_retries
+ while True:
+ if retries < max_retries:
+ LOG.log(LOG_IOCTL,
+ 'IOCTL ==> SECURE_UPDATE_WRITE_BLK (%d)', retries)
+ else:
LOG.log(LOG_IOCTL, 'IOCTL ==> SECURE_UPDATE_WRITE_BLK')
try:
fw_write_block(fd_dev, offset, to_transfer, buf_addr)
+ break
except IOError as exc:
+ if exc.errno != errno.EAGAIN or \
+ retries == 0:
return exc.errno, exc.strerror
+ retries -= 1
+ time.sleep(1.0)
payload_size -= to_transfer
offset += to_transfer
to_transfer = block_size if block_size <= payload_size \
else payload_size
+
prg.update(offset)
+
LOG.log(LOG_IOCTL, 'IOCTL ==> SECURE_UPDATE_DATA_SENT')
try:
fcntl.ioctl(fd_dev, IOCTL_IFPGA_SECURE_UPDATE_DATA_SENT)
except IOError as exc:
return exc.errno, exc.strerror
+
LOG.info('applying update')
with progress(time=apply_time, **progress_cfg) as prg:
while True:
|
add ui for prop delay | @@ -61,14 +61,14 @@ struct queue_t {
int64_t arrival;
} * elements;
} ring;
- int64_t delay_usec; /* TODO: add propagation delay */
- int64_t interval_usec;
+ int64_t delay_usec; /* propagation delay */
+ int64_t interval_usec; /* serialization delay */
int64_t congested_until; /* in usec */
uint64_t num_forwarded;
uint64_t num_dropped;
- uint16_t drops[MAXDROPS];
uint16_t num_drops;
-} up = {{16}, 10}, down = {{16}, 10};
+ uint16_t drops[MAXDROPS];
+} up = {{16}, 0, 10, 0, 0, 0, 0}, down = {{16}, 0, 10, 0, 0, 0, 0};
static int listen_fd = -1;
static struct addrinfo *server_addr = NULL;
@@ -85,6 +85,8 @@ static void usage(const char *cmd, int exit_status)
" upstream (default: 10)\n"
" -I <interval> delay (in microseconds) to insert after sending one packet\n"
" downstream (default: 10)\n"
+ " -p <interval> propagation delay (in microseconds) upstream (default: 0)\n"
+ " -P <interval> propagation delay (in microseconds) downstream (default: 0)\n"
" -l <port> port number to which the command binds\n"
" -d <packetnum> packet number in connection to drop upstream\n"
" -D <packetnum> packet number in connection to drop downstream\n"
@@ -234,11 +236,9 @@ static int enqueue(struct queue_t *q, struct connection_t *conn, int64_t now)
/* if head queued, dequeue after full propagation and serialization delay */
if (q->ring.head == q->ring.tail)
q->congested_until = now + q->delay_usec + q->interval_usec;
-
q->ring.tail = next_tail;
++q->num_forwarded;
fprintf(stderr, "queue\n");
-
return 1;
}
@@ -263,7 +263,7 @@ int main(int argc, char **argv)
signal(SIGINT, on_signal);
signal(SIGHUP, on_signal);
- while ((ch = getopt(argc, argv, "b:B:i:I:l:d:D:h")) != -1) {
+ while ((ch = getopt(argc, argv, "b:B:i:I:p:P:l:d:D:h")) != -1) {
switch (ch) {
case 'b': /* size of the upstream buffer */
if (sscanf(optarg, "%zu", &up.ring.depth) != 1 || up.ring.depth == 0) {
@@ -289,6 +289,18 @@ int main(int argc, char **argv)
exit(1);
}
break;
+ case 'p': /* propagation delay (microseconds) */
+ if (sscanf(optarg, "%" PRId64, &up.delay_usec) != 1) {
+ fprintf(stderr, "argument to `-p` must be an unsigned number\n");
+ exit(1);
+ }
+ break;
+ case 'P': /* propagation delay (microseconds) */
+ if (sscanf(optarg, "%" PRId64, &down.delay_usec) != 1) {
+ fprintf(stderr, "argument to `-P` must be an unsigned number\n");
+ exit(1);
+ }
+ break;
case 'l': { /* listen port */
struct sockaddr_in sin;
uint16_t port;
|
Print both compiled and linked versions of libs
On --version, print both the version scrcpy had been compiled against,
and the version linked at runtime. | void
scrcpy_print_version(void) {
- printf("\ndependencies:\n");
- printf(" - SDL %d.%d.%d\n", SDL_MAJOR_VERSION, SDL_MINOR_VERSION,
- SDL_PATCHLEVEL);
- printf(" - libavcodec %d.%d.%d\n", LIBAVCODEC_VERSION_MAJOR,
+ printf("\nDependencies (compiled / linked):\n");
+
+ SDL_version sdl;
+ SDL_GetVersion(&sdl);
+ printf(" - SDL: %u.%u.%u / %u.%u.%u\n",
+ SDL_MAJOR_VERSION, SDL_MINOR_VERSION, SDL_PATCHLEVEL,
+ (unsigned) sdl.major, (unsigned) sdl.minor, (unsigned) sdl.patch);
+
+ unsigned avcodec = avcodec_version();
+ printf(" - libavcodec: %u.%u.%u / %u.%u.%u\n",
+ LIBAVCODEC_VERSION_MAJOR,
LIBAVCODEC_VERSION_MINOR,
- LIBAVCODEC_VERSION_MICRO);
- printf(" - libavformat %d.%d.%d\n", LIBAVFORMAT_VERSION_MAJOR,
+ LIBAVCODEC_VERSION_MICRO,
+ AV_VERSION_MAJOR(avcodec),
+ AV_VERSION_MINOR(avcodec),
+ AV_VERSION_MICRO(avcodec));
+
+ unsigned avformat = avformat_version();
+ printf(" - libavformat: %u.%u.%u / %u.%u.%u\n",
+ LIBAVFORMAT_VERSION_MAJOR,
LIBAVFORMAT_VERSION_MINOR,
- LIBAVFORMAT_VERSION_MICRO);
- printf(" - libavutil %d.%d.%d\n", LIBAVUTIL_VERSION_MAJOR,
+ LIBAVFORMAT_VERSION_MICRO,
+ AV_VERSION_MAJOR(avformat),
+ AV_VERSION_MINOR(avformat),
+ AV_VERSION_MICRO(avformat));
+
+ unsigned avutil = avutil_version();
+ printf(" - libavutil: %u.%u.%u / %u.%u.%u\n",
+ LIBAVUTIL_VERSION_MAJOR,
LIBAVUTIL_VERSION_MINOR,
- LIBAVUTIL_VERSION_MICRO);
+ LIBAVUTIL_VERSION_MICRO,
+ AV_VERSION_MAJOR(avutil),
+ AV_VERSION_MINOR(avutil),
+ AV_VERSION_MICRO(avutil));
+
#ifdef HAVE_V4L2
- printf(" - libavdevice %d.%d.%d\n", LIBAVDEVICE_VERSION_MAJOR,
+ unsigned avdevice = avdevice_version();
+ printf(" - libavdevice: %u.%u.%u / %u.%u.%u\n",
+ LIBAVDEVICE_VERSION_MAJOR,
LIBAVDEVICE_VERSION_MINOR,
- LIBAVDEVICE_VERSION_MICRO);
+ LIBAVDEVICE_VERSION_MICRO,
+ AV_VERSION_MAJOR(avdevice),
+ AV_VERSION_MINOR(avdevice),
+ AV_VERSION_MICRO(avdevice));
#endif
}
|
Changes name of iv_check to iv_len_validity
Commit changes name of check_iv to
iv_len_validity as this seems to better describe
its functionality. | @@ -1148,7 +1148,7 @@ void check_padding( int pad_mode, data_t * input, int ret, int dlen_check
/* END_CASE */
/* BEGIN_CASE */
-void check_iv( int cipher_id, char * cipher_string,
+void iv_len_validity( int cipher_id, char * cipher_string,
int iv_len_val, int ret )
{
size_t iv_len = iv_len_val;
|
Still trying to fix py.test. | @@ -9,7 +9,7 @@ if ! command -v conda > /dev/null; then
conda create --yes -n test python=$PYTHON_VERSION
conda activate test
conda install tectonic;
- conda install -c conda-forge numpy=$NUMPY_VERSION scipy matplotlib setuptools python-pytest pytest-cov pip;
+ conda install -c conda-forge numpy=$NUMPY_VERSION scipy matplotlib setuptools pytest pytest-cov pip;
fi
# Display some info
|
Subsets and Splits
No saved queries yet
Save your SQL queries to embed, download, and access them later. Queries will appear here once saved.