message
stringlengths 6
474
| diff
stringlengths 8
5.22k
|
---|---|
docs: xCAT recipe: re-enable BaseOS repo after running genimage a second time | @@ -163,6 +163,8 @@ distributions. To enable additional respoitories for local use, issue the follow
[sms](*\#*) (*\chrootinstall*) kernel
# Include matching kernel from head node into compute image
[sms](*\#*) genimage BOSSHORT-ARCH-netboot-compute -k `uname -r`
+# Re-enable BaseOS repo
+[sms](*\#*) yum-config-manager --installroot=$CHROOT --enable BaseOS
# Include modules user environment
[sms](*\#*) (*\chrootinstall*) --enablerepo=PowerTools lmod-ohpc
\end{lstlisting}
|
fix crash on debug printout when removing entries from cache | @@ -551,8 +551,8 @@ apr_byte_t oidc_cache_set(request_rec *r, const char *section, const char *key,
&auth_openidc_module);
int encrypted = oidc_cfg_cache_encrypt(r);
- oidc_debug(r, "enter: %s=len(%d) (encrypt=%d)", key, (int )strlen(value),
- encrypted);
+ oidc_debug(r, "enter: %s=len(%d) (encrypt=%d)", key,
+ value ? (int )strlen(value) : 0, encrypted);
/* see if we need to encrypt */
if ((value != NULL) && (encrypted == 1)) {
|
test: fixed clay tests | !:
=, format
::
-=/ test-pit=vase !>(..zuse)
-=/ clay-gate (clay-raw test-pit)
+=/ bud=vase !>(..zuse)
+=/ clay-gate (clay-raw bud)
=/ fusion fusion:clay-gate
::
|%
|.
=/ ford
%: ford:fusion
+ bud
ankh
deletes=~
changes=~
== == ==
=/ ford
%: ford:fusion
+ bud
ankh
deletes=~
changes=(my [/gen/hello/hoon &+hoon+hello-gen]~)
== == ==
=/ ford
%: ford:fusion
+ bud
ankh
deletes=~
changes=~
|
save actual Nokogiri chars | @@ -21,7 +21,9 @@ module Nokogiri
string = reencode(string)
end
- Nokogumbo.parse(string.to_s)
+ document = Nokogumbo.parse(string.to_s)
+ document.encoding = 'UTF-8'
+ document
end
# Fetch and parse a HTML document from the web, following redirects,
|
New screenshot save location | @@ -219,10 +219,29 @@ void blit_update_volume() {
static void save_screenshot() {
int index = 0;
- char buf[100];
+ char buf[200];
+ std::string app_name;
+ const std::string screenshots_dir_name = "screenshots";
+
+ if(!blit_user_code_running()) {
+ app_name = "_firmware";
+ } else {
+ auto meta = blit_get_running_game_metadata();
+
+ if(meta) {
+ app_name = meta->title;
+ } else {
+ // fallback to offset
+ app_name = std::to_string(persist.last_game_offset);
+ }
+ }
do {
- snprintf(buf, 100, "screenshot%i.bmp", index);
+ snprintf(buf, 200, "%s/%s%i.bmp", screenshots_dir_name.c_str(), app_name.c_str(), index);
+
+ if(!::directory_exists(screenshots_dir_name)){
+ ::create_directory(screenshots_dir_name);
+ }
if(!::file_exists(buf))
break;
|
primus: Change USB C0 fast role swap GPIO pin
BRANCH=none
TEST=make -j BOARD=primus | @@ -72,7 +72,7 @@ GPIO(VCCST_PWRGD_OD, PIN(A, 4), GPIO_ODR_LOW)
GPIO(USB_C1_RT_RST_ODL, PIN(5, 0), GPIO_ODR_LOW)
GPIO(PAD_FW_RW_EN_N, PIN(B, 5), GPIO_ODR_LOW)
GPIO(TP4_FW_RW_EN_N, PIN(B, 4), GPIO_ODR_LOW)
-GPIO(USB_C0_FRS_EN, PIN(3, 5), GPIO_OUT_LOW)
+GPIO(USB_C0_FRS_EN, PIN(8, 3), GPIO_OUT_LOW)
GPIO(USB_A_LOW_PWR_OD, PIN(6, 6), GPIO_ODR_LOW)
GPIO(TBT_PWR_EN, PIN(D, 4), GPIO_OUT_LOW)
GPIO(TP4_RESET, PIN(9, 3), GPIO_ODR_LOW)
@@ -126,6 +126,7 @@ ALTERNATE(PIN_MASK(6, 0x0C), 0, MODULE_PS2, 0) /* PS2_CLK1/GPIO62,
UNUSED(PIN(D, 6)) /* GPOD6/CR_SOUT3/SHDF_ESPI_L */
UNUSED(PIN(8, 1)) /* GPIO81/PECI_DATA */
UNUSED(PIN(3, 2)) /* GPO32/TRIS# */
+UNUSED(PIN(3, 5)) /* GPO35/CR_SOUT4/TEST# */
/* Pre-configured PSL balls: J8 K6 */
|
sysdeps/linux: fix formatting of new sysdeps | @@ -820,11 +820,10 @@ int sys_getgroups(size_t size, const gid_t *list, int *retval) {
}
int sys_dup(int fd, int flags, int *newfd) {
+ __ensure(!flags);
auto ret = do_cp_syscall(SYS_dup, fd);
if (int e = sc_error(ret); e)
return e;
- // TODO: Handle flags
- (void) flags;
*newfd = sc_int_result<int>(ret);
return 0;
}
|
hostkey_method_ssh_ed25519_init() check key bounds
* hostkey_method_ssh_ed25519_init() check key bounds
File: hostkey.c
Notes:
Additional key length checking before calling _libssh2_ed25519_new_public()
Credit:
Will Cosgrove | @@ -841,9 +841,10 @@ hostkey_method_ssh_ed25519_init(LIBSSH2_SESSION * session,
size_t hostkey_data_len,
void **abstract)
{
- const unsigned char *s;
- unsigned long len, key_len;
+ size_t key_len;
+ unsigned char *key;
libssh2_ed25519_ctx *ctx = NULL;
+ struct string_buf buf;
if(*abstract) {
hostkey_method_ssh_ed25519_dtor(session, abstract);
@@ -856,21 +857,18 @@ hostkey_method_ssh_ed25519_init(LIBSSH2_SESSION * session,
return -1;
}
- s = hostkey_data;
- len = _libssh2_ntohu32(s);
- s += 4;
+ buf.data = (unsigned char *)hostkey_data;
+ buf.dataptr = buf.data;
+ buf.len = hostkey_data_len;
- if(len != 11 || strncmp((char *) s, "ssh-ed25519", 11) != 0) {
+ if(_libssh2_match_string(&buf, "ssh-ed25519"))
return -1;
- }
-
- s += 11;
/* public key */
- key_len = _libssh2_ntohu32(s);
- s += 4;
+ if(_libssh2_get_string(&buf, &key, &key_len))
+ return -1;
- if(_libssh2_ed25519_new_public(&ctx, session, s, key_len) != 0) {
+ if(_libssh2_ed25519_new_public(&ctx, session, key, key_len) != 0) {
return -1;
}
|
changed name of vector with unrecognised parms | @@ -62,9 +62,9 @@ namespace
po::variables_map vm;
po::parsed_options parsed = po::command_line_parser(argc, argv).options(desc).allow_unregistered().run();
po::store(parsed,vm);
- std::vector<std::string> unused_args = collect_unrecognized(parsed.options, po::include_positional);
+ std::vector<std::string> unrecognised_parameters = collect_unrecognized(parsed.options, po::include_positional);
- for (auto a: unused_args) {
+ for (auto & a: unrecognised_parameters) {
BOOST_LOG_TRIVIAL(warning) << "unused parameter: " << a;
}
|
Cleanup stats socket on exit.
Stats socket not cleaned up on exit.
vagrant@vpp:/tmp/vpp-failed-unittests/vpp-unittest-VCLCutThruTestCase-clRggF-FAILED$ ls -ltr
total 104
srwxrwxr-x 1 vagrant vagrant 0 Nov 14 18:21 stats.sock | @@ -573,6 +573,19 @@ stats_segment_socket_init (void)
sm->socket = s;
}
+static clib_error_t *
+stats_segment_socket_exit (vlib_main_t * vm)
+{
+ /*
+ * cleanup the listener socket on exit.
+ */
+ stat_segment_main_t *sm = &stat_segment_main;
+ unlink ((char *) sm->socket_name);
+ return 0;
+}
+
+VLIB_MAIN_LOOP_EXIT_FUNCTION (stats_segment_socket_exit);
+
static uword
stat_segment_collector_process (vlib_main_t * vm, vlib_node_runtime_t * rt,
vlib_frame_t * f)
@@ -611,6 +624,9 @@ statseg_config (vlib_main_t * vm, unformat_input_t * input)
{
stat_segment_main_t *sm = &stat_segment_main;
+ /* set default socket file name when statseg config stanza is empty. */
+ sm->socket_name = format (0, "%s", STAT_SEGMENT_SOCKET_FILE);
+
while (unformat_check_input (input) != UNFORMAT_END_OF_INPUT)
{
if (unformat (input, "socket-name %s", &sm->socket_name))
|
[chainmaker][#436]add tests test_03Contract_0002InvokeFailureMethodNull | @@ -111,14 +111,26 @@ START_TEST(test_03Contract_0001InvokeFailureTxNull)
BOAT_RESULT result;
BoatHlchainmakerTx tx_ptr;
BoatInvokeReponse invoke_reponse;
- result = test_contrct_invoke_prepara(tx_ptr);
- ck_assert_int_eq(result, BOAT_SUCCESS);
result = BoatHlchainmakerContractInvoke(NULL, "save", "fact", true, &invoke_reponse); ;
ck_assert(result == BOAT_ERROR_INVALID_ARGUMENT);
}
END_TEST
+START_TEST(test_03Contract_0002InvokeFailureMethodNull)
+{
+ BOAT_RESULT result;
+ BoatHlchainmakerTx tx_ptr;
+ BoatInvokeReponse invoke_reponse;
+
+ test_contrct_invoke_prepara(tx_ptr);
+
+ result = BoatHlchainmakerContractInvoke(&tx_ptr, NULL, "fact", true, &invoke_reponse); ;
+ ck_assert(result == BOAT_ERROR_INVALID_ARGUMENT);
+}
+END_TEST
+
+
Suite *make_contract_suite(void)
{
/* Create Suite */
@@ -131,6 +143,7 @@ Suite *make_contract_suite(void)
suite_add_tcase(s_contract, tc_contract_api);
/* Test cases are added to the test set */
tcase_add_test(tc_contract_api, test_03Contract_0001InvokeFailureTxNull);
+ tcase_add_test(tc_contract_api, test_03Contract_0002InvokeFailureMethodNull);
return s_contract;
}
|
sim: Test variants of single upgrade with multi-image
Test the variations of the situation where we are built for multi-image,
but are only upgrading a single image, including no dependencies,
correct dependencies, and unmet dependencies. | @@ -66,7 +66,7 @@ test_shell!(dependency_combos, r, {
/// These are the variants of dependencies we will test.
pub static TEST_DEPS: &[DepTest] = &[
- // First is a sanity test, no dependencies should upgrade.
+ // A sanity test, no dependencies should upgrade.
DepTest {
depends: [DepType::Nothing, DepType::Nothing],
upgrades: [UpgradeInfo::Upgraded, UpgradeInfo::Upgraded],
@@ -98,6 +98,43 @@ pub static TEST_DEPS: &[DepTest] = &[
upgrades: [UpgradeInfo::Held, UpgradeInfo::Held],
},
+ // Test where only the first image is upgraded, and there are no
+ // dependencies.
+ DepTest {
+ depends: [DepType::Nothing, DepType::NoUpgrade],
+ upgrades: [UpgradeInfo::Upgraded, UpgradeInfo::Held],
+ },
+
+ // Test one image with a valid dependency on the first image.
+ DepTest {
+ depends: [DepType::OldCorrect, DepType::NoUpgrade],
+ upgrades: [UpgradeInfo::Upgraded, UpgradeInfo::Held],
+ },
+
+ // Test one image with an invalid dependency on the first image.
+ DepTest {
+ depends: [DepType::Newer, DepType::NoUpgrade],
+ upgrades: [UpgradeInfo::Held, UpgradeInfo::Held],
+ },
+
+ // Test where only the second image is upgraded, and there are no
+ // dependencies.
+ DepTest {
+ depends: [DepType::NoUpgrade, DepType::Nothing],
+ upgrades: [UpgradeInfo::Held, UpgradeInfo::Upgraded],
+ },
+
+ // Test one image with a valid dependency on the second image.
+ DepTest {
+ depends: [DepType::NoUpgrade, DepType::OldCorrect],
+ upgrades: [UpgradeInfo::Held, UpgradeInfo::Upgraded],
+ },
+
+ // Test one image with an invalid dependency on the second image.
+ DepTest {
+ depends: [DepType::NoUpgrade, DepType::Newer],
+ upgrades: [UpgradeInfo::Held, UpgradeInfo::Held],
+ },
];
/// Counter for the image number.
|
Update CMake building guide
Following a question from J. Tamir, added more precisions on how to
compile with CMake when using libraries in non-standard locations. | @@ -9,7 +9,7 @@ _________________
1 Overview
2 Building BART
-.. 2.1 Quick build guide
+.. 2.1 Quick building guide
..... 2.1.1 Download and install LAPACKE locally
..... 2.1.2 Building of BART
.. 2.2 Main Build Targets
@@ -18,6 +18,7 @@ _________________
..... 2.2.3 Install
..... 2.2.4 Packaging
..... 2.2.5 Cleaning up
+.. 2.3 Non-standard locations (libraries, Python, etc.)
3 Build options
.. 3.1 Adding new BART commands
.. 3.2 Compiler
@@ -78,8 +79,8 @@ _________________
the above mentioned names (e.g. `cmake -DLINALG_VENDOR="ATLAS" ..').
-2.1 Quick build guide
-~~~~~~~~~~~~~~~~~~~~~
+2.1 Quick building guide
+~~~~~~~~~~~~~~~~~~~~~~~~
BART depends upon the new lapacke.h and cblas.h interfaces for blas
and lapack. These new 'C' interfaces are often not packaged robustly
@@ -202,6 +203,66 @@ _________________
(e.g. issuing `make clean' on UNIX)
+2.3 Non-standard locations (libraries, Python, etc.)
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+ If you have some of your libraries installed in some non-standard
+ locations (e.g. on UNIX outside of `/usr' or `/usr/local'), you can
+ ask CMake to look for the requested libraries in other locations by
+ defining either some environment variables or some CMake variables.
+
+ Here is an exhaustive list of variables that may influence the
+ building of BART:
+
+ Variable name Type Description
+ --------------------------------------------------------------------
+ CMAKE_PREFIX_PATH env./CMake Define good defaults for
+ searching for packages
+
+ ATLAS_ROOT env./CMake Preferred installation prefix
+ ATLAS_DIR for the ATLAS libraries
+
+ CUDA_ROOT env./CMake Preferred installation prefix
+ CUDA_TOOLKIT_ROOT_DIR for the CUDA toolkit and
+ libraries
+
+ FFTW_ROOT env./CMake Preferred installation prefix
+ FFTW_DIR for the FFTW libraries
+
+ LAPACKE_ROOT env./CMake Preferred installation prefix
+ LAPACKE_DIR for the LAPACKE libraries
+
+ libFlame_ROOT env./CMake Preferred installation prefix
+ libFlame_DIR for the AMD libFlame libraries
+
+ OpenBLAS_ROOT env./CMake Preferred installation prefix
+ OpenBLAS_DIR for the OpenBLAS libraries
+
+ Python_ROOT_DIR env./CMake Define the root directory of a
+ Python installation.
+
+ Python_USE_STATIC_LIBS CMake only If not defined, search for
+ shared libraries and static
+ libraries in that order.
+ If set to TRUE, search *only*
+ for static libraries.
+ If set to FALSE, search *only*
+ for shared libraries.
+
+ PYBART_NUMPY_ROOT env./CMake Define directory containing
+ PYBART_NUMPY_DIR NumPy's arrayobject.h
+
+ These variables would typicaly be used either as environment
+ variables:
+ ,----
+ | OpenBLAS_ROOT=/home/user/my_openblas Python_ROOT_DIR=/opt/anaconda/ cmake ..
+ `----
+ or directly as CMake variables:
+ ,----
+ | cmake .. -DOpenBLAS_ROOT=/home/user/my_openblas -DPython_ROOT_DIR=/opt/anaconda/
+ `----
+
+
3 Build options
===============
|
RTX5: corrected ThreadEnumerate event parameter | @@ -1316,7 +1316,7 @@ uint32_t svcRtxThreadEnumerate (osThreadId_t *thread_array, uint32_t array_items
*thread_array++ = thread;
}
- EvrRtxThreadEnumerate(thread_array, array_items, count);
+ EvrRtxThreadEnumerate(thread_array - count, array_items, count);
return count;
}
|
OcHashServicesLib: Runtime-verify MessageSize as it's untrusted input | @@ -65,9 +65,7 @@ HSHash (
HS_PRIVATE_DATA *PrivateData;
HS_CONTEXT_DATA CtxCopy;
- ASSERT (MessageSize <= MAX_UINTN);
-
- if (!This || !HashAlgorithm || !Message || !Hash || !MessageSize) {
+ if (!This || !HashAlgorithm || !Message || !Hash || !MessageSize || MessageSize > MAX_UINTN) {
return EFI_INVALID_PARAMETER;
}
|
xpath BUGFIX invalid memory access
Repeat is no longer mandatory. | @@ -145,7 +145,7 @@ print_expr_struct_debug(const struct lyxp_expr *exp)
for (i = 0; i < exp->used; ++i) {
sprintf(tmp, "\ttoken %s, in expression \"%.*s\"", lyxp_print_token(exp->tokens[i]), exp->tok_len[i],
&exp->expr[exp->tok_pos[i]]);
- if (exp->repeat[i]) {
+ if (exp->repeat && exp->repeat[i]) {
sprintf(tmp + strlen(tmp), " (repeat %d", exp->repeat[i][0]);
for (j = 1; exp->repeat[i][j]; ++j) {
sprintf(tmp + strlen(tmp), ", %d", exp->repeat[i][j]);
|
Add test generation for mpi_core_add_if | @@ -70,3 +70,22 @@ class BignumCoreOperation(bignum_common.OperationCommon, BignumCoreTarget, metac
for a_value, b_value in cls.get_value_pairs():
yield cls(a_value, b_value).create_test_case()
+
+
+class BignumCoreAddIf(BignumCoreOperation):
+ """Test cases for bignum core add if."""
+ count = 0
+ symbol = "+"
+ test_function = "mpi_core_add_if"
+ test_name = "mbedtls_mpi_core_add_if"
+
+ def result(self) -> str:
+ tmp = self.int_a + self.int_b
+ bound_val = max(self.int_a, self.int_b)
+ bound_4 = bignum_common.bound_mpi4(bound_val)
+ bound_8 = bignum_common.bound_mpi8(bound_val)
+ carry_4, remainder_4 = divmod(tmp, bound_4)
+ carry_8, remainder_8 = divmod(tmp, bound_8)
+ return "\"{:x}\":{}:\"{:x}\":{}".format(
+ remainder_4, carry_4, remainder_8, carry_8
+ )
|
add gmp library | @@ -20,6 +20,21 @@ if(NOT EXISTS ${LMDB_SRC_DIR})
execute_process(COMMAND git clone https://github.com/lmdb/lmdb.git ${LMDB_SRC_DIR})
endif()
+set(GMP_SRC_DIR ${CMAKE_CURRENT_SOURCE_DIR}/src/gmp-6.1.2)
+set(GMP_BUILD_DIR ${CMAKE_CURRENT_BINARY_DIR}/src/gmp-6.1.2)
+
+include(ExternalProject)
+
+ExternalProject_Add(libgmp
+ SOURCE_DIR ${GMP_SRC_DIR}
+ BINARY_DIR ${GMP_BUILD_DIR}
+ TMP_DIR ${GMP_BUILD_DIR}
+ STAMP_DIR ${GMP_BUILD_DIR}
+ CONFIGURE_COMMAND ${GMP_SRC_DIR}/configure --prefix=${LIB_DIR} --enable-static=no > /dev/null
+ PREFIX ${GMP_SRC_DIR}
+ BUILD_COMMAND $(MAKE) CFLAGS="${CMAKE_C_FLAGS}" all install > make.log
+ BUILD_ALWAYS 1)
+
add_custom_target(libtool DEPENDS libluajit liblmdb)
add_custom_target(libluajit $(MAKE) PREFIX=${LIB_DIR} ${CFLAGS} all install
|
read only 1023 bytes for option, 1024. byte zero terminated! | @@ -5210,7 +5210,11 @@ while(1)
padding = 4 -(len %4);
}
olpad = len +padding;
- if(olpad > 1024)
+ if(olpad > tl)
+ {
+ return;
+ }
+ if(olpad > 1023)
{
resseek = lseek(fd, olpad, SEEK_CUR);
if(resseek < 0)
@@ -5221,10 +5225,6 @@ while(1)
}
}
tl = tl -olpad -2;
- if(olpad > tl)
- {
- return;
- }
if(opthdr.option_code == 1)
{
memset(&pcapngoptioninfo, 0, 1024);
|
Remove warnings when calculating banks
getsymbank() is used for more things than just when the code explicitly
has a BANK() operator, which causes a lot of noise when building code
that has more than one object file and places variables on HRAM or OAM. | @@ -68,14 +68,8 @@ getsymbank(SLONG symid)
errx(1, "*INTERNAL* UNKNOWN SYMBOL TYPE");
}
- if (nBank == BANK_WRAM0 || nBank == BANK_ROM0) {
- /* This can have practical uses. */
- return 0;
- } else if (nBank == BANK_OAM) {
- warnx("Trying to calculate BANK() of label in OAM.");
- return 0;
- } else if (nBank == BANK_HRAM) {
- warnx("Trying to calculate BANK() of label in HRAM.");
+ if (nBank == BANK_WRAM0 || nBank == BANK_ROM0 || nBank == BANK_OAM ||
+ nBank == BANK_HRAM) {
return 0;
} else if (nBank >= BANK_WRAMX && nBank < (BANK_WRAMX + BANK_COUNT_WRAMX)) {
return nBank - BANK_WRAMX + 1;
|
use -lineinfo for debug symbol | @@ -63,7 +63,7 @@ function nf_symbol(self, level, target)
-- debug? generate *.pdb file
local flags = nil
if level == "debug" then
- flags = "-g -G"
+ flags = "-g -lineinfo"
if is_plat("windows") then
local host_flags = nil
local symbolfile = nil
|
travis: test new regex modes | @@ -22,7 +22,9 @@ script:
- |
if [ $TRAVIS_OS_NAME = osx ]; then
brew update > /dev/null
- brew install lz4 openssl
+ brew install lz4 openssl onigurama pcre pcre2
+ else
+ apt-get install libonig-dev libpcre3-dev libpcre2-dev
fi
# workaround git not retaining mtimes and bison/flex not being uptodate
- touch conffile.yy.c conffile.tab.c conffile.tab.h
@@ -36,23 +38,40 @@ script:
curl -s 'https://scan.coverity.com/scripts/travisci_build_coverity_scan.sh' | bash
else
# everything disabled, this MUST work
+ echo "==> base test, all disabled"
./configure --without-gzip --without-lz4 --without-ssl \
+ --without-onigurama --without-pcre2 --without-prce \
|| { cat config.log ; exit 1 ; }
make CFLAGS="-O3 -Wall -Werror -Wshadow -pipe" clean check || exit 1
# compile some enabled/disabled variants compile only
+ echo "==> gzip enabled"
if ./configure --with-gzip --without-lz4 --without-ssl ; then
make CFLAGS="-O3 -Wall -Werror -Wshadow -pipe" clean relay || exit 1
fi
+ echo "==> lz4 enabled"
if ./configure --without-gzip --with-lz4 --without-ssl ; then
make CFLAGS="-O3 -Wall -Werror -Wshadow -pipe" clean relay || exit 1
fi
+ echo "==> gzip,lz4 enabled"
if ./configure --with-gzip --with-lz4 --without-ssl ; then
make CFLAGS="-O3 -Wall -Werror -Wshadow -pipe" clean relay || exit 1
fi
+ echo "==> gzip,lz4,ssl enabled"
if ./configure --with-gzip --with-lz4 --with-ssl ; then
make CFLAGS="-O3 -Wall -Werror -Wshadow -pipe" clean relay || exit 1
fi
+ # test the regex implementations
+ echo "==> onigurama enabled"
+ ./configure --with-onigurama --without-pcre2 --without-pcre || exit
+ make CFLAGS="-O3 -Wall -Werror -Wshadow -pipe" clean check || exit 1
+ echo "==> pcre2 enabled"
+ ./configure --without-onigurama --with-pcre2 --without-pcre || exit
+ make CFLAGS="-O3 -Wall -Werror -Wshadow -pipe" clean check || exit 1
+ echo "==> pcre enabled"
+ ./configure --without-onigurama --without-pcre2 --with-pcre || exit
+ make CFLAGS="-O3 -Wall -Werror -Wshadow -pipe" clean check || exit 1
# final test with everything enabled that is detected
+ echo "==> everything default"
./configure || { cat config.log ; exit 1 ; }
make CFLAGS="-O3 -Wall -Werror -Wshadow -pipe" clean check || exit 1
fi
|
u3: use u3r_mug_words for all atoms | @@ -1387,7 +1387,7 @@ u3r_mug_chub(c3_d num_d)
c3_w buf_w[2];
buf_w[0] = (c3_w)(num_d & 0xffffffffULL);
- buf_w[1] = (c3_w)(num_d >> 32ULL);
+ buf_w[1] = (c3_w)(num_d >> 32);
return u3r_mug_words(buf_w, 2);
}
@@ -1438,8 +1438,7 @@ c3_w
u3r_mug_both(c3_w lef_w, c3_w rit_w)
{
c3_w ham_w = lef_w ^ (0x7fffffff ^ rit_w);
-
- return u3r_mug_words(&ham_w, (0 == ham_w) ? 0 : 1);
+ return u3r_mug_words(&ham_w, 1);
}
/* u3r_mug_cell(): Compute the mug of the cell `[hed tel]`.
@@ -1547,7 +1546,7 @@ u3r_mug(u3_noun veb)
// veb is a direct atom, mug is not memoized
//
if ( _(u3a_is_cat(veb)) ) {
- mug_w = u3r_mug_bytes((c3_y*)&veb, u3r_met(3, veb));
+ mug_w = u3r_mug_words(&veb, 1);
goto retreat;
}
// veb is indirect, a pointer into the loom
@@ -1565,7 +1564,7 @@ u3r_mug(u3_noun veb)
//
else if ( _(u3a_is_atom(veb)) ) {
u3a_atom* vat_u = (u3a_atom*)veb_u;
- mug_w = u3r_mug_bytes((c3_y*)vat_u->buf_w, u3r_met(3, veb));
+ mug_w = u3r_mug_words(vat_u->buf_w, vat_u->len_w);
vat_u->mug_w = mug_w;
goto retreat;
}
|
docs: fix merge damage in nat.h
Type: fix
Fixes: | @@ -1261,7 +1261,6 @@ void nat_free_session_data (snat_main_t * sm, snat_session_t * s,
u32 thread_index, u8 is_ha);
/**
-<<<<<<< bdfe5955f59a735fd8d70e9026f8c1867a4c8cc6
* @brief Set NAT44 session limit (session limit, vrf id)
*
* @param session_limit Session limit
@@ -1271,10 +1270,7 @@ void nat_free_session_data (snat_main_t * sm, snat_session_t * s,
int nat44_set_session_limit (u32 session_limit, u32 vrf_id);
/**
- * @brief Free NAT44 ED session data (lookup keys, external addrres port)
-=======
* @brief Free NAT44 ED session data (lookup keys, external address port)
->>>>>>> docs: clean up make docs job
*
* @param s NAT session
* @param thread_index thread index
|
hv: trusty: fix get_max_svn_index return type inconsistent
Function return type should consistent. | @@ -334,15 +334,10 @@ void switch_world(struct acrn_vcpu *vcpu, int next_world)
arch->cur_context = next_world;
}
-static int32_t get_max_svn_index(void)
+static inline uint32_t get_max_svn_index(void)
{
uint32_t i, max_svn_idx = 0U;
- if ((g_key_info.num_seeds == 0U) ||
- (g_key_info.num_seeds > BOOTLOADER_SEED_MAX_ENTRIES)) {
- return -1;
- }
-
for (i = 1U; i < g_key_info.num_seeds; i++) {
if (g_key_info.dseed_list[i].cse_svn >
g_key_info.dseed_list[i-1].cse_svn) {
@@ -358,17 +353,14 @@ static bool derive_aek(uint8_t *attkb_key)
const int8_t salt[] = "Attestation Keybox Encryption Key";
const uint8_t *ikm;
uint32_t ikm_len;
- int32_t max_svn_idx;
+ uint32_t max_svn_idx;
- if (!attkb_key) {
+ if ((!attkb_key) || (g_key_info.num_seeds == 0U) ||
+ (g_key_info.num_seeds > BOOTLOADER_SEED_MAX_ENTRIES)) {
return false;
}
max_svn_idx = get_max_svn_index();
- if (max_svn_idx < 0) {
- return false;
- }
-
ikm = g_key_info.dseed_list[max_svn_idx].seed;
/* only the low 32 bits of seed are valid */
ikm_len = 32;
|
lpc11u35_if: remove hid from lpc11u35_if (fixes | @@ -62,6 +62,10 @@ module:
- records/rtos/rtos-cm0.yaml
- records/hic_hal/lpc11u35.yaml
- records/usb/usb-hid.yaml
+ hic_lpc11u35_bulk: &module_hic_lpc11u35_bulk
+ - records/rtos/rtos-cm0.yaml
+ - records/hic_hal/lpc11u35.yaml
+ - records/usb/usb-bulk.yaml
hic_lpc4322: &module_hic_lpc4322
- records/rtos/rtos-cm3.yaml
- records/hic_hal/lpc4322.yaml
@@ -134,9 +138,8 @@ projects:
- records/family/all_family.yaml
lpc11u35_if:
- *module_if
- - *module_hic_lpc11u35
+ - *module_hic_lpc11u35_bulk
- records/family/all_family.yaml
- - records/usb/usb-bulk.yaml
lpc4322_bl:
- *module_bl
- records/hic_hal/lpc4322.yaml
|
BugID:16846667: fix bug that operating uint8 as uint32 in svc.S
Details:
- task struct member mode's type is uint8, however the operation
in svc.S treats it as uint32, thus pollutes other bits of the
structure.
modified: arch/arm/armv7m/gcc/syscall/svc/svc.S | @@ -69,9 +69,9 @@ SVC_Handler:
ldr r1, [r1]
// change utask.mode to 0x11
- ldr r2, [r1, #RHINO_CONFIG_TASK_MODE_OFFSET]
+ ldrb r2, [r1, #RHINO_CONFIG_TASK_MODE_OFFSET]
orr r2, r2, #0x01
- str r2, [r1, #RHINO_CONFIG_TASK_MODE_OFFSET]
+ strb r2, [r1, #RHINO_CONFIG_TASK_MODE_OFFSET]
// change mode to user thread, set control[0]
mrs r2, control
@@ -113,14 +113,14 @@ SVC_Handler:
ldr r1, =g_active_task
ldr r1, [r1]
- ldr r2, [r1, #RHINO_CONFIG_TASK_MODE_OFFSET]
+ ldrb r2, [r1, #RHINO_CONFIG_TASK_MODE_OFFSET]
and r2, r2, #0x02
cmp r2, #0x02
bne .return
// clear bit[0], set task to privilegend mode
bic r2, #0x01
- str r2, [r1, #RHINO_CONFIG_TASK_MODE_OFFSET]
+ strb r2, [r1, #RHINO_CONFIG_TASK_MODE_OFFSET]
// switch psp to utask.kstack
// copy utask.kstack to utask.ustack
@@ -172,7 +172,7 @@ do_syscall:
ldr r2, =g_active_task
ldr r2, [r2]
// load mode
- ldr r3, [r2, #RHINO_CONFIG_TASK_MODE_OFFSET]
+ ldrb r3, [r2, #RHINO_CONFIG_TASK_MODE_OFFSET]
and r3, r3, #0x02
cmp r3, #0x02
bne .ktask_return
|
debug_timer: harden against long-term overflow | @@ -24,7 +24,18 @@ void debug_timer_init() {
}
uint32_t debug_timer_micros() {
- return DWT->CYCCNT / (SystemCoreClock / 1000000L);
+ static uint32_t total_micros = 0;
+ static uint32_t last_micros = 0;
+
+ const uint32_t micros = DWT->CYCCNT / (SystemCoreClock / 1000000L);
+ if (micros >= last_micros) {
+ total_micros += micros - last_micros;
+ } else {
+ total_micros += ((UINT32_MAX / (SystemCoreClock / 1000000L)) + micros) - last_micros;
+ }
+
+ last_micros = micros;
+ return total_micros;
}
uint32_t debug_timer_millis() {
|
add wakeup enable for bt | @@ -1157,6 +1157,26 @@ esp_err_t esp_sleep_disable_wifi_wakeup(void)
#endif
}
+esp_err_t esp_sleep_enable_bt_wakeup(void)
+{
+#if SOC_PM_SUPPORT_BT_WAKEUP
+ s_config.wakeup_triggers |= RTC_BT_TRIG_EN;
+ return ESP_OK;
+#else
+ return ESP_ERR_NOT_SUPPORTED;
+#endif
+}
+
+esp_err_t esp_sleep_disable_bt_wakeup(void)
+{
+#if SOC_PM_SUPPORT_BT_WAKEUP
+ s_config.wakeup_triggers &= (~RTC_BT_TRIG_EN);
+ return ESP_OK;
+#else
+ return ESP_ERR_NOT_SUPPORTED;
+#endif
+}
+
esp_sleep_wakeup_cause_t esp_sleep_get_wakeup_cause(void)
{
if (esp_rom_get_reset_reason(0) != RESET_REASON_CORE_DEEP_SLEEP && !s_light_sleep_wakeup) {
|
Add documentation for Fiber.transfer methods | @@ -194,12 +194,71 @@ If the called fiber raises an error, it can no longer be used.
### **transfer**()
-**TODO**
+Pauses execution of the current running fiber, and transfers control to this fiber.
+
+[Read more][../../concurrency.html#transferring-control] about the difference
+between `call` and `transfer`. Unlike `call`, `transfer` doesn't track the origin of the transfer.
+
+<pre class="snippet">
+// keep hold of the fiber we start in
+var main = Fiber.current
+
+// create a new fiber, note it doesn't execute yet!
+var fiber = Fiber.new {
+ System.print("inside 'fiber'") //> #2: from #1
+ main.transfer() //> #3: go back to 'main'
+}
+
+fiber.transfer() //> #1: print "inside 'fiber'" via #2
+ //> this fiber is now paused by #1
+
+System.print("main") //> #4: prints "main", unpaused by #3
+</pre>
### **transfer**(value)
-**TODO**
+Pauses execution of the current running fiber, and transfers control to this fiber.
+
+Similar to `transfer`, but a value can be passed between the fibers.
+
+<pre class="snippet">
+// keep hold of the fiber we start in
+var main = Fiber.current
+
+// create a new fiber, note it doesn't execute yet
+// also note that we're accepting a 'value' parameter
+var fiber = Fiber.new {|value|
+ System.print("in 'fiber' = %(value)") //> #2: in 'fiber' = 5
+ var result = main.transfer("hello?") //> #3: send to 'message'
+ System.print("end 'fiber' = %(result)") //> #6: end 'fiber' = 32
+}
+
+var message = fiber.transfer(5) //> #1: send to 'value'
+System.print("... %(message)") //> #4: ... hello?
+fiber.transfer(32) //> #5: send to 'result'
+</pre>
### **transferError**(error)
-**TODO**
+Transfer to this fiber, but set this fiber into an error state.
+The `fiber.error` value will be populated with the value in `error`.
+
+<pre class="snippet">
+var A = Fiber.new {
+ System.print("transferred to A") //> #4
+ B.transferError("error!") //> #5
+}
+
+var B = Fiber.new {
+ System.print("started B") //> #2
+ A.transfer() //> #3
+ System.print("should not get here")
+}
+
+B.try() //> #1
+System.print(B.error) //> #6: prints "error!" from #5
+
+// B fiber can no longer be used
+
+B.call() //> #7: Cannot call an aborted fiber.
+</pre>
\ No newline at end of file
|
options/internal: add 'missing return' handler to ubsan | @@ -231,3 +231,10 @@ void __ubsan_handle_vla_bound_not_positive(VLABoundData *vlabd) {
<< LOG_NAME_LOC("VLA bound not positive", vlabd->loc)
<< frg::endlog;
}
+
+extern "C" [[gnu::visibility("hidden")]]
+void __ubsan_handle_missing_return(UnreachableData *data) {
+ mlibc::panicLogger()
+ << LOG_NAME_LOC("reached end of a value-returning function without returning a value", data->loc)
+ << frg::endlog;
+}
|
session server BUGFIX printing features in capability string
fix checking for the firstly printed feature for (not) printing comma
before it | @@ -974,7 +974,7 @@ nc_server_get_cpblts_version(struct ly_ctx *ctx, LYS_VERSION version)
ERRINT;
break;
}
- if (i) {
+ if (features_count) {
strcat(str, ",");
++str_len;
}
|
fix setmfact animation | @@ -3239,14 +3239,22 @@ void
setmfact(const Arg *arg)
{
float f;
-
+ int tmpanim = 0;
if (!arg || !selmon->lt[selmon->sellt]->arrange)
return;
f = arg->f < 1.0 ? arg->f + selmon->mfact : arg->f - 1.0;
if (f < 0.1 || f > 0.9)
return;
selmon->mfact = selmon->pertag->mfacts[selmon->pertag->curtag] = f;
+
+ if (animated && clientcount() > 2) {
+ tmpanim = 1;
+ animated = 0;
+ }
+
arrange(selmon);
+ if (tmpanim)
+ animated = 1;
}
void
|
Fix SC_EXIT_CODE_NONE value
The exit code on windows is stored in a DWORD, an unsigned long:
<https://docs.microsoft.com/en-us/openspecs/windows_protocols/ms-dtyp/262627d8-3418-4627-9218-4ffe110850b2>
Use the max value of this type for SC_EXIT_CODE_NONE. | // <https://stackoverflow.com/a/44383330/1987178>
# define SC_PRIsizet "Iu"
# define SC_PROCESS_NONE NULL
-# define SC_EXIT_CODE_NONE -1u // max value as unsigned
+# define SC_EXIT_CODE_NONE -1UL // max value as unsigned long
typedef HANDLE sc_pid;
typedef DWORD sc_exit_code;
typedef HANDLE sc_pipe;
|
dm:add UID parameter for acpidev_pt
Now the acpidev_pt module only use the hid to check the device,it can't
work well if there are more then one instance.
So this patch add UID to identify same type device to fix these issue.
Acked-by: Wang, Yu1 | @@ -74,11 +74,22 @@ static int is_tpm2_eventlog_supported(struct acpi_table_tpm2 *tpm2)
return ((tpm2->header.length == 76) && tpm2->lasa && tpm2->laml);
}
-static int is_hid_tpm2_device(char *hid)
+static int is_hid_tpm2_device(char *opts)
{
int ret;
struct acpi_dev_pt_ops *ops = &pt_acpi_dev;
- ret = get_more_acpi_dev_info(hid, 0, ops);
+ uint32_t uid = 0;
+ char *devopts, *hid, *vtopts;
+
+ if (!opts || !*opts)
+ return false;
+
+ devopts = vtopts = strdup(opts);
+ hid = strsep(&vtopts, ",");
+ uid = (vtopts != NULL) ? atoi(vtopts) : 0;
+
+ ret = get_more_acpi_dev_info(hid, uid, ops);
+ free(devopts);
if (ret)
return false;
return (strstr(ops->modalias, "MSFT0101") != NULL);
@@ -92,23 +103,39 @@ static int is_hid_tpm2_device(char *hid)
* @pre: hid should be a valid HID of the TPM2 device being passed-through.
* @pre: tpm2dev != NULL
*/
-static int init_tpm2_pt(char *hid, struct mmio_dev *tpm2dev)
+static int init_tpm2_pt(char *opts, struct mmio_dev *tpm2dev)
{
int err = 0;
uint64_t tpm2_buffer_hpa, tpm2_buffer_size;
uint32_t base = 0;
struct acpi_table_tpm2 tpm2 = { 0 };
+ char *devopts, *vtopts;
- /* TODO: Currently we did not validate if the hid is a valid one.
+ /* TODO: Currently we did not validate if the opts is a valid one.
* We trust it to be valid as specifying --acpidev_pt is regarded
* as root user operation.
*/
- if (!hid || !*hid)
+ if (!opts || !*opts) {
return -EINVAL;
+ }
+
+ devopts = strdup(opts);
+ vtopts = strstr(devopts,",");
+
+ /* Check whether user set the uid to identify same hid devices for
+ * several instances.
+ */
+ if (vtopts != NULL ){
+ vtopts[0] = ':';
+ }
/* parse /proc/iomem to find the address and size of tpm buffer */
- if (!get_mmio_hpa_resource(hid, &tpm2_buffer_hpa, &tpm2_buffer_size))
+ if (!get_mmio_hpa_resource(devopts, &tpm2_buffer_hpa, &tpm2_buffer_size)) {
+ free(devopts);
return -ENODEV;
+ }
+
+ free(devopts);
err = read_sysfs_tpm2_table(&tpm2);
if (err)
|
rand: allow lock/unlock functions to be absent | @@ -117,7 +117,7 @@ static void *evp_rand_from_dispatch(int name_id,
OSSL_PROVIDER *prov)
{
EVP_RAND *rand = NULL;
- int fnrandcnt = 0, fnctxcnt = 0, fnlockcnt = 0;
+ int fnrandcnt = 0, fnctxcnt = 0, fnlockcnt = 0, fnenablelockcnt = 0;
#ifdef FIPS_MODULE
int fnzeroizecnt = 0;
#endif
@@ -174,7 +174,7 @@ static void *evp_rand_from_dispatch(int name_id,
if (rand->enable_locking != NULL)
break;
rand->enable_locking = OSSL_FUNC_rand_enable_locking(fns);
- fnlockcnt++;
+ fnenablelockcnt++;
break;
case OSSL_FUNC_RAND_LOCK:
if (rand->lock != NULL)
@@ -243,7 +243,8 @@ static void *evp_rand_from_dispatch(int name_id,
*/
if (fnrandcnt != 3
|| fnctxcnt != 3
- || (fnlockcnt != 0 && fnlockcnt != 3)
+ || (fnenablelockcnt != 0 && fnenablelockcnt != 1)
+ || (fnlockcnt != 0 && fnlockcnt != 2)
#ifdef FIPS_MODULE
|| fnzeroizecnt != 1
#endif
|
release: add news entry | @@ -71,6 +71,10 @@ The text below summarizes updates to the [C (and C++)-based libraries](https://w
### Compatibility
+- We clarified compatibility requirements for Elektra and its plugins and bindings.
+ Furthermore, we renamed `system/elektra/version/constants/KDB_VERSION_MICRO`
+ to `system/elektra/version/constants/KDB_VERSION_PATCH` to be compatible
+ with [Semantic Versioning 2.0.0](https://semver.org/). _(Markus Raab)_
- <<TODO>>
- <<TODO>>
- <<TODO>>
|
Fix back-patch of "Under has_wal_read_bug, skip .../001_wal.pl."
Per buildfarm members tadarida, snapper, and kittiwake. Back-patch to
v10 (all supported versions). | @@ -3,7 +3,7 @@ use strict;
use warnings;
use PostgresNode;
use TestLib;
-use Test::More tests => 31;
+use Test::More;
if (TestLib::has_wal_read_bug)
{
@@ -11,6 +11,10 @@ if (TestLib::has_wal_read_bug)
# this test file to die(), not merely to fail.
plan skip_all => 'filesystem bug';
}
+else
+{
+ plan tests => 31;
+}
my $node_master;
my $node_standby;
|
vcl: fix crash problem for invalidation of vls_table_lock
Type: fix | @@ -219,7 +219,10 @@ vls_mt_add (void)
* vcl worker with vpp. Otherwise, all threads use the same vcl worker, so
* update the vcl worker's thread local worker index variable */
if (vls_mt_wrk_supported ())
- vls_register_vcl_worker ();
+ {
+ if (vppcom_worker_register () != VPPCOM_OK)
+ VERR ("failed to register worker");
+ }
else
vcl_set_worker_index (vlsl->vls_wrk_index);
}
@@ -1712,11 +1715,7 @@ vls_use_real_epoll (void)
void
vls_register_vcl_worker (void)
{
- if (vppcom_worker_register () != VPPCOM_OK)
- {
- VERR ("failed to register worker");
- return;
- }
+ vls_mt_add ();
}
/*
|
Add a failing test case for `Rugged::Tree.diff`. | @@ -1188,6 +1188,50 @@ class TreeDiffRegression < Rugged::TestCase
assert_equal "A Rugged::Commit, Rugged::Tree or Rugged::Index instance is required", ex.message
end
+ def test_self_is_nil_other_is_tree_does_not_fail
+ repo = FixtureRepo.from_libgit2("diff")
+
+ a = repo.lookup("d70d245ed97ed2aa596dd1af6536e4bfdb047b69")
+
+ diff = Rugged::Tree.diff(repo, nil, a.tree)
+ assert_equal 2, diff.size
+ assert_equal 2, diff.deltas.size
+
+ delta = diff.deltas[0]
+ assert_equal({
+ oid: "0000000000000000000000000000000000000000",
+ path: "another.txt",
+ size: 0,
+ flags: 4,
+ mode: 0
+ }, delta.old_file)
+
+ assert_equal({
+ oid: "3e5bcbad2a68e5bc60a53b8388eea53a1a7ab847",
+ path: "another.txt",
+ size: 0,
+ flags: 12,
+ mode: 0100644
+ }, delta.new_file)
+
+ delta = diff.deltas[1]
+ assert_equal({
+ oid: "0000000000000000000000000000000000000000",
+ path: "readme.txt",
+ size: 0,
+ flags: 4,
+ mode: 0
+ }, delta.old_file)
+
+ assert_equal({
+ oid: "7b808f723a8ca90df319682c221187235af76693",
+ path: "readme.txt",
+ size: 0,
+ flags: 12,
+ mode: 0100644
+ }, delta.new_file)
+ end
+
def test_other_tree_is_an_index_but_tree_is_nil
repo = FixtureRepo.from_libgit2("diff")
|
Fix division by zero in the non-x86 codepath | @@ -79,8 +79,12 @@ void NAME(FLOAT *DA, FLOAT *DB, FLOAT *C, FLOAT *S){
aa_i = fabs(da_r);
}
+ if (aa_r == ZERO) {
+ ada = 0.;
+ } else {
scale = (aa_i / aa_r);
ada = aa_r * sqrt(ONE + scale * scale);
+ }
bb_r = fabs(db_r);
bb_i = fabs(db_i);
@@ -90,9 +94,12 @@ void NAME(FLOAT *DA, FLOAT *DB, FLOAT *C, FLOAT *S){
bb_i = fabs(bb_r);
}
+ if (bb_r == ZERO) {
+ adb = 0.;
+ } else {
scale = (bb_i / bb_r);
adb = bb_r * sqrt(ONE + scale * scale);
-
+ }
scale = ada + adb;
aa_r = da_r / scale;
|
hv: io: fix MISRA-C violations related to style
This patch fixes the MISRA-C violations in arch/x86/io.c.
* add the required brackets for logical conjunctions
* add the required 'else' for 'if ... else if' case
Acked-by: Eddie Dong | @@ -378,6 +378,8 @@ int32_t pio_instr_vmexit_handler(struct acrn_vcpu *vcpu)
emulate_pio_post(vcpu, io_req);
} else if (status == IOREQ_PENDING) {
status = 0;
+ } else {
+ /* do nothing */
}
return status;
@@ -480,7 +482,7 @@ int32_t register_mmio_emulation_handler(struct acrn_vm *vm,
int32_t status = -EINVAL;
struct mem_io_node *mmio_node;
- if ((vm->hw.created_vcpus > 0U) && vm->hw.vcpu_array[0].launched) {
+ if ((vm->hw.created_vcpus > 0U) && (vm->hw.vcpu_array[0].launched)) {
ASSERT(false, "register mmio handler after vm launched");
return status;
}
|
BugID:17132084: [WhiteScan] Fix overrun issue for rtl8710bn ethernetif.c | @@ -235,7 +235,7 @@ void ethernetif_recv(struct netif *netif, int total_len)
// Copy received packet to scatter list from wrapper rx skb
//printf("\n\rwlan:%c: Recv sg_len: %d, tot_len:%d", netif->name[1],sg_len, total_len);
#if CONFIG_WLAN
- if (sg_len >= sizeof(sg_list)) {
+ if (sg_len >= MAX_ETH_DRV_SG) {
return;
}
|
TEST: disabled a test about the max item size more than 1mb for the time being. | #!/usr/bin/perl
use strict;
-use Test::More tests => 9;
+use Test::More tests => 7;
use FindBin qw($Bin);
use lib "$Bin/lib";
use MemcachedTest;
@@ -69,6 +69,8 @@ $server->stop();
# Test sets up to a large size around 2MB.
+# Fot the time being, we disable the test below.
+=head
$server = get_memcached($engine, '-I 2m');
my $stats = mem_stats($server->sock, ' settings');
is($stats->{item_size_max}, 2097152);
@@ -80,6 +82,7 @@ my $rst = "STORED";
my $msg = "stored size $len";
mem_cmd_is($server->sock, $cmd, $val, $rst);
$server->stop();
+=cut
# after test
release_memcached($engine, $server);
|
update ya tool arc
atomic write to TREE
list conflicts in short version of status | },
"arc": {
"formula": {
- "sandbox_id": [367180606],
+ "sandbox_id": [369798007],
"match": "arc"
},
"executable": {
|
Fix Bug updating synonyms | @@ -25,6 +25,7 @@ import java.io.PrintWriter;
import java.nio.charset.Charset;
import java.nio.file.Files;
import java.nio.file.Paths;
+import java.nio.file.StandardCopyOption;
import java.util.HashMap;
import java.util.Map;
@@ -45,7 +46,6 @@ import com.francelabs.datafari.service.indexer.IndexerServerManager.Core;
import com.francelabs.datafari.utils.Environment;
import com.francelabs.datafari.utils.ExecutionEnvironment;
-
/**
* Javadoc
*
@@ -151,29 +151,25 @@ public class Synonyms extends HttpServlet {
server = IndexerServerManager.getIndexerServer(Core.FILESHARE);
} catch (final IOException e1) {
final PrintWriter out = response.getWriter();
- out.append(
- "Error while getting the Solr core, please make sure the core dedicated to PromoLinks has booted up. Error code : 69000");
+ out.append("Error while getting the Solr core, please make sure the core dedicated to PromoLinks has booted up. Error code : 69000");
out.close();
- LOGGER.error(
- "Error while getting the Solr core in doGet, admin servlet, make sure the core dedicated to Promolink has booted up and is still called promolink or that the code has been changed to match the changes. Error 69000 ",
- e1);
+ LOGGER.error("Error while getting the Solr core in doGet, admin servlet, make sure the core dedicated to Promolink has booted up and is still called promolink or that the code has been changed to match the changes. Error 69000 ", e1);
return;
- } catch (Exception e) {
+ } catch (final Exception e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
-
try {
if (request.getParameter("synonymsList") == null) { // the user load an
// other page
} else { // The user clicked on confirm modification
- final String filePath = env + "/synonyms_" + request.getParameter("language") + ".txt";
- final String tempFilename = env + "/synonyms_" + request.getParameter("language").toString() + "_temp.txt";
+ final String language = request.getParameter("language").toLowerCase();
+ final String filePath = env + "/synonyms_" + language + ".txt";
final File file = new File(filePath);
- final File tempFile = new File(tempFilename);
+ final File tempFile = File.createTempFile("synonyms_" + language, ".txt");
try (BufferedReader br = new BufferedReader(new FileReader(file)); BufferedWriter bw = new BufferedWriter(new FileWriter(tempFile))) {
String line = br.readLine();
while (line != null && line.startsWith("#")) {
@@ -187,15 +183,14 @@ public class Synonyms extends HttpServlet {
}
} catch (final IOException e) {
- LOGGER.error("Error while rewriting the file synonyms_" + request.getParameter("language") + " Synonyms Servlet's doPost. Error 69019", e);
+ LOGGER.error("Error while rewriting the file synonyms_" + language + " Synonyms Servlet's doPost. Error 69019", e);
final PrintWriter out = response.getWriter();
out.append("Error while rewriting the synonyms file, please make sure the file exists and retry, if the problem persists contact your system administrator. Error code : 69015");
out.close();
+ tempFile.delete();
return;
}
- file.delete();
- tempFile.renameTo(file);
- final String[] params = { file.getName() };
+ Files.move(tempFile.toPath(), file.toPath(), StandardCopyOption.REPLACE_EXISTING);
server.uploadConfig(Paths.get(env), Core.FILESHARE.toString());
Thread.sleep(1000);
server.reloadCollection(Core.FILESHARE.toString());
|
chat-store: only evaluate our own %code
Sending a %code letter without output would cause its code to be evaluated on
the recipients' ships. While that shouldn't naturally occur post-#2009, and
evaluation of %code letters remains virtualized, it's still remote code
execution, and worth fixing as such. | =/ mailbox=(unit mailbox) (~(get by inbox) path.act)
?~ mailbox
[~ this]
- =. letter.envelope.act (evaluate-letter letter.envelope.act)
+ =. letter.envelope.act (evaluate-letter [author letter]:envelope.act)
=. u.mailbox (append-envelope u.mailbox envelope.act)
:- (send-diff path.act act)
this(inbox (~(put by inbox) path.act u.mailbox))
length.config.u.mailbox
evaluated-envelopes
==
- =. letter.i.envelopes.act (evaluate-letter letter.i.envelopes.act)
+ =. letter.i.envelopes.act (evaluate-letter [author letter]:i.envelopes.act)
=. evaluated-envelopes (snoc evaluated-envelopes i.envelopes.act)
=. u.mailbox (append-envelope u.mailbox i.envelopes.act)
$(envelopes.act t.envelopes.act)
this(inbox (~(put by inbox) path.act u.mailbox))
::
++ evaluate-letter
- |= =letter
+ |= [author=ship =letter]
^- ^letter
- =? letter &(?=(%code -.letter) ?=(~ output.letter))
+ =? letter
+ ?& ?=(%code -.letter)
+ ?=(~ output.letter)
+ (team:title our.bol author)
+ ==
=/ =hoon (ream expression.letter)
letter(output (eval bol hoon))
letter
|
integration/helpers: Return with error when scanner has one | @@ -78,6 +78,9 @@ func parseMultipleJSONArrayOutput[T any](output string, normalize func(*T)) ([]*
}
allEntries = append(allEntries, entries...)
}
+ if err := sc.Err(); err != nil {
+ return nil, fmt.Errorf("parsing multiple JSON arrays: %w", err)
+ }
return allEntries, nil
}
|
CI: separate build tasks for memcheck of crypto, fcrypt and gpgme | @@ -699,6 +699,55 @@ def generateFullBuildStages() {
[TEST.ALL, TEST.MEM]
)
+ // Run memory analysis of the crypto plugins in separate environment as theses tests are quite unstable
+ tasks << buildAndTest(
+ "debian-unstable-cryptoplugins",
+ DOCKER_IMAGES.sid,
+ CMAKE_FLAGS_BUILD_ALL+
+ CMAKE_FLAGS_DEBUG + [
+ 'PLUGINS': 'dump;resolver;list;spec;sync;crypto;fcrypt;gpgme',
+ 'TOOLS': '',
+ 'BINDINGS': '',
+ ],
+ [TEST.CRYPTOS]
+ )
+
+ tasks << buildAndTest(
+ "debian-stretch-cryptoplugins",
+ DOCKER_IMAGES.stretch,
+ CMAKE_FLAGS_BUILD_ALL+
+ CMAKE_FLAGS_DEBUG + [
+ 'PLUGINS': 'dump;resolver;list;spec;sync;crypto;fcrypt;gpgme',
+ 'TOOLS': '',
+ 'BINDINGS': '',
+ ],
+ [TEST.CRYPTOS]
+ )
+
+ tasks << buildAndTest(
+ "fedora-31-cryptoplugins",
+ DOCKER_IMAGES.fedora_31,
+ CMAKE_FLAGS_BUILD_ALL+
+ CMAKE_FLAGS_DEBUG + [
+ 'PLUGINS': 'dump;resolver;list;spec;sync;crypto;fcrypt;gpgme',
+ 'TOOLS': '',
+ 'BINDINGS': '',
+ ],
+ [TEST.CRYPTOS]
+ )
+
+ tasks << buildAndTest(
+ "alpine-cryptoplugins",
+ DOCKER_IMAGES.alpine,
+ CMAKE_FLAGS_BUILD_ALL+
+ CMAKE_FLAGS_DEBUG + [
+ 'PLUGINS': 'dump;resolver;list;spec;sync;crypto;fcrypt;gpgme',
+ 'TOOLS': '',
+ 'BINDINGS': '',
+ ],
+ [TEST.CRYPTOS]
+ )
+
// We need the webui_base image to build webui images later
tasks << buildImageStage(DOCKER_IMAGES.webui_base)
@@ -925,6 +974,7 @@ def buildAndTest(testName, image, extraCmakeFlags = [:],
def testMem = tests.contains(TEST.MEM)
def testNokdb = tests.contains(TEST.NOKDB)
def testAll = tests.contains(TEST.ALL)
+ def testCryptos = tests.contains(TEST.CRYPTOS)
def install = tests.contains(TEST.INSTALL)
def dockerOpts = [DOCKER_OPTS.MOUNT_MIRROR]
return [(testName): {
@@ -960,6 +1010,9 @@ def buildAndTest(testName, image, extraCmakeFlags = [:],
}
}
}
+ if(testCryptos) {
+ ctestcryptoplugins()
+ }
}
if(install) {
sh 'make install'
@@ -1330,7 +1383,6 @@ def cmemcheck(kdbtests=true) {
} else {
ctest("MemCheck -LE memleak||kdbtests")
}
- ctestcryptoplugins("MemCheck")
}
/* Helper for ctest to run tests without tests tagged as kdbtests.
|
use a les invasive fix for the prefork exit Redis problem | @@ -177,6 +177,10 @@ static redisContext * oidc_cache_redis_connect(request_rec *r,
if ((ctx == NULL) || (ctx->err != 0)) {
oidc_error(r, "failed to connect to Redis server (%s:%d): '%s'",
context->host_str, context->port, ctx->errstr);
+ if (ctx != NULL)
+ redisFree(ctx);
+ apr_pool_userdata_set(NULL, OIDC_CACHE_REDIS_CONTEXT,
+ apr_pool_cleanup_null, r->server->process->pool);
return NULL;
}
|
Update: minigrid_ona.py: timestep fix | @@ -209,9 +209,11 @@ for i in range(0, 10000000):
successes += 1
if max_steps == -1 or action != default_action: #only record values once for external mode
print("successes=" + str(successes) + " time="+str(timestep))
+ if timestep >= max_steps and max_steps != -1:
+ break
if action != default_action:
timestep += 1
- if done or (timestep+2 >= max_steps and max_steps != -1):
+ if done:
DisableToggle = False
NAR.AddInput("20") #don't temporally relate observations across reset
h+=1
@@ -237,6 +239,5 @@ for i in range(0, 10000000):
while timestep <= max_steps:
print("successes=" + str(successes) + " time="+str(timestep))
timestep += 1
-print(timestep, max_steps)
env.close()
|
dm: modify DIR handler reference postion
DIR handler is referenced after release, need to be adjusted before
released.
Acked-by: Yu Wang | @@ -234,7 +234,6 @@ static int pci_npk_init(struct vmctx *ctx, struct pci_vdev *dev, char *opts)
else
break;
}
- closedir(dir);
if (!dent) {
WPRINTF(("Cannot find NPK device\n"));
@@ -246,9 +245,10 @@ static int pci_npk_init(struct vmctx *ctx, struct pci_vdev *dev, char *opts)
dent->d_name);
if (rc >= PATH_MAX || rc < 0)
WPRINTF(("NPK device name is invalid!\n"));
+ closedir(dir);
fd = open(name, O_RDONLY);
if (fd == -1) {
- WPRINTF(("Cannot open host NPK config\n"));
+ WPRINTF(("Cannot open host NPK config:%s\n", name));
return error;
}
|
sysdeps/managarm: implement sys_uname | @@ -4682,5 +4682,23 @@ int sys_memfd_create(const char *name, int flags, int *fd) {
return 0;
}
+int sys_uname(struct utsname *buf) {
+ __ensure(buf);
+ mlibc::infoLogger() << "\e[31mmlibc: uname() returns static information\e[39m" << frg::endlog;
+ strcpy(buf->sysname, MLIBC_SYSTEM_NAME);
+ strcpy(buf->nodename, "?");
+ strcpy(buf->release, "?");
+ strcpy(buf->version, "?");
+#if defined(__x86_64__)
+ strcpy(buf->machine, "x86_64");
+#elif defined (__aarch64__)
+ strcpy(buf->machine, "aarch64");
+#else
+# error Unknown architecture
+#endif
+
+ return 0;
+}
+
} //namespace mlibc
|
py/objexcept: Fix hash of exc str created in mp_obj_new_exception_msg. | @@ -348,9 +348,9 @@ mp_obj_t mp_obj_new_exception_msg(const mp_obj_type_t *exc_type, const char *msg
// Create the string object and call mp_obj_exception_make_new to create the exception
o_str->base.type = &mp_type_str;
- o_str->hash = qstr_compute_hash(o_str->data, o_str->len);
o_str->len = strlen(msg);
o_str->data = (const byte*)msg;
+ o_str->hash = qstr_compute_hash(o_str->data, o_str->len);
mp_obj_t arg = MP_OBJ_FROM_PTR(o_str);
return mp_obj_exception_make_new(exc_type, 1, 0, &arg);
}
|
khan: no uv_connect_t, spacing | */
typedef struct _u3_khan {
u3_auto car_u; // driver
- uv_pipe_t pyp_u; // socket pipe
- uv_connect_t con_u; // connection state
- c3_l sev_l; // instance number
+ uv_pipe_t pyp_u; // socket
+ c3_l sev_l; // number (of instance)
} u3_khan;
static const c3_c URB_SOCK_PATH[] = ".urb/khan.sock";
|
raspberrypi-pico-w/telnet: enable more configs | @@ -17,11 +17,17 @@ CONFIG_ARCH_BOARD="raspberrypi-pico-w"
CONFIG_ARCH_BOARD_RASPBERRYPI_PICO_W=y
CONFIG_ARCH_CHIP="rp2040"
CONFIG_ARCH_CHIP_RP2040=y
+CONFIG_ARCH_INTERRUPTSTACK=2048
CONFIG_ARCH_RAMVECTORS=y
CONFIG_ARCH_STACKDUMP=y
CONFIG_BOARDCTL_RESET=y
CONFIG_BOARD_LOOPSPERMSEC=10450
CONFIG_BUILTIN=y
+CONFIG_DEBUG_ASSERTIONS=y
+CONFIG_DEBUG_ERROR=y
+CONFIG_DEBUG_FEATURES=y
+CONFIG_DEBUG_FULLOPT=y
+CONFIG_DEBUG_SYMBOLS=y
CONFIG_DISABLE_POSIX_TIMERS=y
CONFIG_DRIVERS_IEEE80211=y
CONFIG_DRIVERS_WIRELESS=y
@@ -29,10 +35,16 @@ CONFIG_EXAMPLES_HELLO=y
CONFIG_FS_PROCFS=y
CONFIG_FS_PROCFS_REGISTER=y
CONFIG_IEEE80211_BROADCOM_DEFAULT_COUNTRY="XX"
+CONFIG_IEEE80211_BROADCOM_DMABUF_ALIGNMENT=16
+CONFIG_IEEE80211_BROADCOM_FRAME_POOL_SIZE=32
CONFIG_IEEE80211_BROADCOM_FULLMAC_GSPI=y
CONFIG_IEEE80211_INFINEON_CYW43439=y
CONFIG_INIT_ENTRYPOINT="nsh_main"
+CONFIG_IOB_NBUFFERS=196
+CONFIG_IOB_NCHAINS=24
+CONFIG_LIBC_FLOATINGPOINT=y
CONFIG_MM_BACKTRACE=0
+CONFIG_NDEBUG=y
CONFIG_NET=y
CONFIG_NETDB_DNSCLIENT=y
CONFIG_NETDB_DNSCLIENT_RECV_TIMEOUT=3
@@ -50,6 +62,7 @@ CONFIG_NET_ICMP_SOCKET=y
CONFIG_NET_LOOPBACK=y
CONFIG_NET_LOOPBACK_PKTSIZE=1024
CONFIG_NET_TCP=y
+CONFIG_NET_TCP_DELAYED_ACK=y
CONFIG_NET_UDP=y
CONFIG_NSH_ARCHINIT=y
CONFIG_NSH_BUILTIN_APPS=y
@@ -58,19 +71,28 @@ CONFIG_RAM_SIZE=270336
CONFIG_RAM_START=0x20000000
CONFIG_READLINE_CMD_HISTORY=y
CONFIG_RR_INTERVAL=200
+CONFIG_SCHED_BACKTRACE=y
CONFIG_SCHED_HPWORK=y
CONFIG_SCHED_LPWORK=y
CONFIG_SCHED_WAITPID=y
+CONFIG_STACK_COLORATION=y
CONFIG_START_DAY=9
CONFIG_START_MONTH=2
CONFIG_START_YEAR=2021
-CONFIG_SYSLOG_CONSOLE=y
+CONFIG_SYSLOG_BUFFER=y
+CONFIG_SYSLOG_INTBUFFER=y
+CONFIG_SYSLOG_INTBUFSIZE=2048
+CONFIG_SYSLOG_PROCESSID=y
CONFIG_SYSTEM_DHCPC_RENEW=y
+CONFIG_SYSTEM_DUMPSTACK=y
CONFIG_SYSTEM_NSH=y
CONFIG_SYSTEM_PING=y
CONFIG_SYSTEM_TELNET_CLIENT=y
CONFIG_TESTING_GETPRIME=y
CONFIG_TESTING_OSTEST=y
+CONFIG_TTY_FORCE_PANIC=y
+CONFIG_TTY_SIGINT=y
+CONFIG_TTY_SIGTSTP=y
CONFIG_UART0_SERIAL_CONSOLE=y
CONFIG_WIRELESS_WAPI=y
CONFIG_WIRELESS_WAPI_CMDTOOL=y
|
input: add missing header and fix storage function name | #include <fluent-bit/flb_utils.h>
#include <fluent-bit/flb_engine.h>
#include <fluent-bit/flb_metrics.h>
+#include <fluent-bit/flb_storage.h>
#define protcmp(a, b) strncasecmp(a, b, strlen(a))
@@ -295,7 +296,7 @@ static void flb_input_free(struct flb_input_instance *in)
#endif
if (in->storage) {
- flb_input_storage_destroy(in);
+ flb_storage_input_destroy(in);
}
/* Unlink and release */
|
Additional run script that needed the AOMP_GPU update. | @@ -26,11 +26,18 @@ thisdir=$(getdname $0)
patchrepo $AOMP_REPOS_TEST/$AOMP_OMPTESTS_REPO_NAME
+# Setup AOMP variables
AOMP=${AOMP:-/usr/lib/aomp}
-AOMP_GPU=${AOMP_GPU:-`$AOMP/bin/mygpu`}
+
+# Use function to set and test AOMP_GPU
+setaompgpu
+
DEVICE_ARCH=${DEVICE_ARCH:-$AOMP_GPU}
DEVICE_TARGET=${DEVICE_TARGET:-amdgcn-amd-amdhsa}
+echo DEVICE_ARCH = $DEVICE_ARCH
+echo DEVICE_TARGET = $DEVICE_TARGET
+
pushd $AOMP_REPOS_TEST/$AOMP_OMPTESTS_REPO_NAME
rm -f runtime-fails.txt
rm -f compile-fails.txt
|
Remove unused constant
This now appears to live in devtools/import.py | @@ -210,22 +210,6 @@ if not os.path.exists(fn):
"from the repository"
.format(fn))
-# exclude sources that contain a main function
-EXCLUDE = {
- "samtools": (
- ),
- "bcftools": (
- "test", "plugins", "peakfit.c",
- "peakfit.h",
- # needs to renamed, name conflict with samtools reheader
- "reheader.c",
- "polysomy.c"),
- "htslib": (
- 'htslib/tabix.c',
- 'htslib/bgzip.c',
- 'htslib/htsfile.c'),
-}
-
print ("# pysam: htslib mode is {}".format(HTSLIB_MODE))
print ("# pysam: HTSLIB_CONFIGURE_OPTIONS={}".format(
HTSLIB_CONFIGURE_OPTIONS))
|
esp32c3: Default supported ESP32-C3 Revision ECO3 | @@ -25,7 +25,7 @@ menu "ESP32C3-Specific"
choice ESP32C3_REV_MIN
prompt "Minimum Supported ESP32-C3 Revision"
- default ESP32C3_REV_MIN_0
+ default ESP32C3_REV_MIN_3
help
Minimum revision that ESP-IDF would support.
|
Avoid NULL pointer arithmetic in MemContext unit test.
Similar to In this case add 1 to avoid a NULL pointer.
Found on MacOS M1. | @@ -170,7 +170,7 @@ testRun(void)
if (testBegin("memContextAlloc(), memNew*(), memGrow(), and memFree()"))
{
TEST_RESULT_UINT(sizeof(MemContextAlloc), 8, "check MemContextAlloc size (same for 32/64 bit)");
- TEST_RESULT_PTR(MEM_CONTEXT_ALLOC_BUFFER((void *)0), (void *)sizeof(MemContextAlloc), "check buffer macro");
+ TEST_RESULT_PTR(MEM_CONTEXT_ALLOC_BUFFER((void *)1), (void *)(sizeof(MemContextAlloc) + 1), "check buffer macro");
TEST_RESULT_PTR(MEM_CONTEXT_ALLOC_HEADER((void *)sizeof(MemContextAlloc)), (void *)0, "check header macro");
memContextSwitch(memContextTop());
|
pagecache_page_release(): add deallocation of struct pagecache_page
This change fixes a memory leak occurring when pages belonging to a
deallocated node are released. In addition, these pages are now
properly removed from the global free page list. | @@ -1370,7 +1370,11 @@ closure_function(1, 1, boolean, pagecache_page_release,
pagecache_lock_state(pc);
if (!pp->evicted)
pagecache_page_release_locked(pc, pp);
+ /* a pagecache node being released means no outstanding page references are possible */
+ assert(page_state(pp) == PAGECACHE_PAGESTATE_FREE);
+ pagelist_remove(&pc->free, pp);
pagecache_unlock_state(pc);
+ deallocate(pc->h, pp, sizeof(*pp));
return true;
}
|
[viostor] init device_address member | @@ -427,6 +427,15 @@ VirtIoFindAdapter(
}
#endif
+#if (NTDDI_VERSION > NTDDI_WIN7)
+ adaptExt->device_address.Type = STOR_ADDRESS_TYPE_BTL8;
+ adaptExt->device_address.Port = 0;
+ adaptExt->device_address.AddressLength = STOR_ADDR_BTL8_ADDRESS_LENGTH;
+ adaptExt->device_address.Path = 0;
+ adaptExt->device_address.Target = 0;
+ adaptExt->device_address.Lun = 0;
+#endif
+
/* initialize the virtual device */
res = InitVirtIODevice(DeviceExtension);
if (res != SP_RETURN_FOUND) {
|
doc: update fpgainfo documentation | ## SYNOPSIS ##
```console
-fpgainfo [-h | --help] [-b <bus>] [-d <device>] [-f <function>] <command> [<args>]
+fpgainfo [-h | --help] <command> [<args>]
```
## DESCRIPTION ##
-fpgainfo displays FPGA information derived from sysfs files. The command argument is one of the following: errors, power, or temp.
-Some commands may also have other arguments or options that control the behavior.
+fpgainfo displays FPGA information derived from sysfs files. The command argument is one of the following:
+errors, power, temp, port or fme.
+Some commands may also have other arguments or options that control their behavior.
-For systems with multiple devices, specify the BDF of the target device with -b, -d and -f.
+For systems with multiple FPGA devices, the BDF (or bus, device, function) may be specified to limit
+the output to the FPGA resource with the corresponding PCIe configuration. If not specified, information
+will be displayed for all resources for the given command.
### FPGAINFO COMMANDS ##
`errors`
@@ -39,20 +42,23 @@ For systems with multiple devices, specify the BDF of the target device with -b,
Prints help information and exit.
+## COMMON ARGUMENTS ##
+The following arguments are common to all commands and are optional.
+
`-b, --bus`
- PCIe bus number of the target FPGA.
+ PCIe bus number of resource.
`-d, --device`
- PCIe device number of the target FPGA.
+ PCIe device number of resource.
`-f, --function`
- PCIe function number of the target FPGA.
+ PCIe function number of resource.
-`--clear, -c`
+`--json`
- Clear errors for the given FPGA resource.
+ Display information as JSON string.
### ERRORS ARGUMENTS ###
The first argument to the `errors` command specifies the resource type. It must be one of the following:
@@ -70,6 +76,10 @@ The first argument to the `errors` command specifies the resource type. It must
Show/clear errors for all resources.
+`--clear, -c`
+
+ Clear errors for the given FPGA resource.
+
## EXAMPLES ##
This command shows the current power consumtion:
@@ -90,3 +100,7 @@ This command clears all errors on all resources:
```console
./fpgainfo errors all -c
```
+This command shows information of the FME on bus 0x5e
+```console
+./fpgainfo fme -b 0x5e
+```
|
hfuzz-cc: don't link -ldl under NetBSD | @@ -460,7 +460,9 @@ static int ldMode(int argc, char** argv) {
/* Needed by libhfcommon */
args[j++] = "-pthread";
+#if !defined(__NetBSD__)
args[j++] = "-ldl";
+#endif /* !defined(__NetBSD__) */
#if !defined(_HF_ARCH_DARWIN) && !defined(__OpenBSD__)
args[j++] = "-lrt";
#endif /* !defined(_HF_ARCH_DARWIN) && !defined(__OpenBSD__) */
|
Add a simple test for RSA_SSLV23_PADDING | /*
- * Copyright 1999-2018 The OpenSSL Project Authors. All Rights Reserved.
+ * Copyright 1999-2019 The OpenSSL Project Authors. All Rights Reserved.
*
* Licensed under the Apache License 2.0 (the "License"). You may not use
* this file except in compliance with the License. You can obtain a copy
@@ -268,6 +268,36 @@ err:
return ret;
}
+static int test_rsa_sslv23(int idx)
+{
+ int ret = 0;
+ RSA *key;
+ unsigned char ptext[256];
+ unsigned char ctext[256];
+ static unsigned char ptext_ex[] = "\x54\x85\x9b\x34\x2c\x49\xea\x2a";
+ unsigned char ctext_ex[256];
+ int plen;
+ int clen = 0;
+ int num;
+
+ plen = sizeof(ptext_ex) - 1;
+ clen = rsa_setkey(&key, ctext_ex, idx);
+
+ num = RSA_public_encrypt(plen, ptext_ex, ctext, key,
+ RSA_SSLV23_PADDING);
+ if (!TEST_int_eq(num, clen))
+ goto err;
+
+ num = RSA_private_decrypt(num, ctext, ptext, key, RSA_SSLV23_PADDING);
+ if (!TEST_mem_eq(ptext, num, ptext_ex, plen))
+ goto err;
+
+ ret = 1;
+err:
+ RSA_free(key);
+ return ret;
+}
+
static int test_rsa_oaep(int idx)
{
int ret = 0;
@@ -391,6 +421,7 @@ err:
int setup_tests(void)
{
ADD_ALL_TESTS(test_rsa_pkcs1, 3);
+ ADD_ALL_TESTS(test_rsa_sslv23, 3);
ADD_ALL_TESTS(test_rsa_oaep, 3);
ADD_ALL_TESTS(test_rsa_security_bit, OSSL_NELEM(rsa_security_bits_cases));
return 1;
|
Add additional message to python message count test | @@ -44,7 +44,7 @@ def test_table_count():
Test number of available messages to deserialize.
"""
- number_of_messages = 162
+ number_of_messages = 163
assert len(_SBP_TABLE) == number_of_messages
def test_table_unqiue_count():
|
[awm] Fix typo | @@ -132,8 +132,8 @@ awm_animation_open_window_t* awm_animation_open_window_init_ex(uint32_t duration
awm_animation_open_window_t* awm_animation_open_window_init(uint32_t duration, user_window_t* window, Rect dest_frame) {
Size screen_size = screen_resolution();
Size original_size = size_make(
- screen_size.width / 10.0
- screen_size.height / 10.0,
+ screen_size.width / 10.0,
+ screen_size.height / 10.0
);
Rect original_frame = rect_make(
point_make(
|
SANDBOX_TASK as multimodule. ISSUE: | @@ -1759,14 +1759,19 @@ module JTEST_FOR: JTEST {
JAVA_TEST()
}
-module SANDBOX_TASK: PY_PROGRAM {
+multimodule SANDBOX_TASK {
+ module SB_TASK_BIN: PY_PROGRAM {
PY_MAIN(sandbox.taskbox.binary)
- PEERDIR(sandbox/bin sandbox/sdk2)
+ PEERDIR(sandbox/bin sandbox/sdk2 sandbox/sandboxsdk)
SET_APPEND(NO_CHECK_IMPORTS_FOR_VALUE api.*)
SET_APPEND(NO_CHECK_IMPORTS_FOR_VALUE kernel.*)
SET_APPEND(NO_CHECK_IMPORTS_FOR_VALUE library.*)
SET_APPEND(NO_CHECK_IMPORTS_FOR_VALUE sky*)
}
+ module PY2: PY_LIBRARY {
+ PEERDIR(sandbox/sdk2 sandbox/sandboxsdk)
+ }
+}
NO_PYTHON_INCLS=no
macro NO_PYTHON_INCLUDES() {
|
moved the delete to after the data is used | @@ -555,9 +555,6 @@ avtPersistentParticlesFilter::IterateTraceData(int ts, avtDataTree_p tree)
if (nds == 0)
haveData = false;
- // Free the memory from the GetAllLeaves function call.
- delete [] dsets;
-
vtkDataSet *currDs = 0;
vtkPointSet *uGrid = 0;
vtkPoints *currPoints = 0;
@@ -647,6 +644,9 @@ avtPersistentParticlesFilter::IterateTraceData(int ts, avtDataTree_p tree)
}
}
+ // Free the memory from the GetAllLeaves function call.
+ delete [] dsets;
+
// Parallel
// Points can be scattered across ranks and there is no gaurantee
|
select sync node by best ping time if available | @@ -1813,7 +1813,10 @@ bool OpenNetworkConnection(const CAddress& addrConnect, CSemaphoreGrant *grantOu
// for now, use a very simple selection metric: the node from which we received
// most recently
+// patch: use pingtime, e.g. 200ms * -1 = -200, so 10ms *-1 = -10 would win.
static int64_t NodeSyncScore(const CNode *pnode) {
+ if (pnode->nPingUsecTime > 0)
+ return pnode->nPingUsecTime * -1;
return pnode->nLastRecv;
}
@@ -1886,7 +1889,7 @@ void ThreadMessageHandler2(void* parg)
vNodesCopy = vNodes;
BOOST_FOREACH(CNode* pnode, vNodesCopy) {
pnode->AddRef();
- if (pnode == pnodeSync)
+ if (pnode == pnodeSync && pnode->nLastRecv > GetTime() - 5) // only accept a node who has replied in last 5 secs, if they stop then swap nodes
fHaveSyncNode = true;
}
}
|
sse2: fix NEON simde_mm_cmp_pd implementation | @@ -1732,8 +1732,8 @@ simde_mm_cmpneq_pd (simde__m128d a, simde__m128d b) {
a_ = simde__m128d_to_private(a),
b_ = simde__m128d_to_private(b);
- #if defined(SIMDE_ARM_NEON_A32V7_NATIVE)
- r_.neon_u16 = vmvnq_u16(vceqq_s16(b_.neon_i16, a_.neon_i16));
+ #if defined(SIMDE_ARM_NEON_A64V8_NATIVE)
+ r_.neon_u32 = vmvnq_u32(vreinterpretq_u32_u64(vceqq_f64(b_.neon_f64, a_.neon_f64)));
#elif defined(SIMDE_WASM_SIMD128_NATIVE)
r_.wasm_v128 = wasm_f64x2_ne(a_.wasm_v128, b_.wasm_v128);
#elif defined(SIMDE_VECTOR_SUBSCRIPT_OPS)
|
[chore] Add the length method to state.array | @@ -1772,22 +1772,10 @@ func TestArray(t *testing.T) {
end
function len()
- return #counts
+ return counts:length()
end
function iter()
- local rv = {}
- for i, v in state.array_pairs(counts) do
- if v == nil then
- rv[i] = "nil"
- else
- rv[i] = v
- end
- end
- return rv
- end
-
- function iter2()
local rv = {}
for i, v in counts:ipairs() do
if v == nil then
@@ -1799,7 +1787,7 @@ func TestArray(t *testing.T) {
return rv
end
- abi.register(inc,get,set,len,iter,iter2)`
+ abi.register(inc,get,set,len,iter)`
bc, err := LoadDummyChain()
if err != nil {
@@ -1842,10 +1830,6 @@ func TestArray(t *testing.T) {
if err != nil {
t.Error(err)
}
- err = bc.Query("array", `{"Name":"iter2"}`, "", `[2,"ktlee","nil","nil","nil","nil","nil","nil","nil","nil"]`)
- if err != nil {
- t.Error(err)
- }
}
func TestPcall(t *testing.T) {
@@ -2460,7 +2444,7 @@ state.var {
}
function Length()
- return #fixedArray
+ return fixedArray:length()
end
abi.register(Length)
@@ -2485,7 +2469,7 @@ state.var {
}
function Append(val)
- dArr.append(val)
+ dArr:append(val)
end
function Get(idx)
@@ -2497,7 +2481,7 @@ function Set(idx, val)
end
function Length()
- return #dArr
+ return dArr:length()
end
abi.register(Append, Get, Set, Length)
|
Add custom_claims.h to Doxygen | // Copyright (c) Open Enclave SDK contributors.
// Licensed under the MIT License.
+/**
+ * @file custom_claims.h
+ *
+ * This file defines the programming interface for application software
+ * to access the OE SDK attestation custom claims functionality.
+ *
+ */
+
#ifndef _OE_CUSTOM_CLAIMS
#define _OE_CUSTOM_CLAIMS
@@ -15,9 +23,9 @@ OE_EXTERNC_BEGIN
*
* Free buffer of serialized custom claims.
*
- * @param[in] custom_claims_buffer Serialized Custom claims
+ * @param[in] custom_claims_buffer Serialized custom claims
* buffer to free.
- * @retval OE_OK on success.
+ * @retval OE_OK The function was successful.
*/
oe_result_t oe_free_serialized_custom_claims(uint8_t* custom_claims_buffer);
@@ -28,7 +36,7 @@ oe_result_t oe_free_serialized_custom_claims(uint8_t* custom_claims_buffer);
*
* @param[in] custom_claims Custom claims array to free.
* @param[in] custom_claims_length Length of custom_claims.
- * @retval OE_OK on success.
+ * @retval OE_OK The function was successful.
*/
oe_result_t oe_free_custom_claims(
oe_claim_t* custom_claims,
@@ -44,9 +52,10 @@ oe_result_t oe_free_custom_claims(
* @param[out] claims_out Pointer to the address of a dynamically
* allocated buffer holding the serialized custom claims.
* @param[out] claims_size_out Size of the serialized custom claims.
- * @retval OE_OK on success.
+ * @retval OE_OK The function was successful.
* @retval OE_INVALID_PARAMETER At least one parameter is invalid.
- * @retval An appropriate error code on failure.
+ * @retval OE_OUT_OF_MEMORY Failed to allocate memory.
+ * @retval OE_UNEXPECTED An unexpected error happened.
*/
oe_result_t oe_serialize_custom_claims(
const oe_claim_t* custom_claims,
@@ -65,9 +74,12 @@ oe_result_t oe_serialize_custom_claims(
* @param[out] claims_out Pointer to the address of a dynamically allocated
* buffer holding the list of custom claims.
* @param[out] claims_length_out The length of the claims_out list.
- * @retval OE_OK on success.
+ * @retval OE_OK The function was successful.
* @retval OE_INVALID_PARAMETER At least one parameter is invalid.
- * @retval An appropriate error code on failure.
+ * @retval OE_CONSTRAINT_FAILED The serialized custom claims buffer size is too
+ * small or invalid.
+ * @retval OE_OUT_OF_MEMORY Failed to allocate memory.
+ * @retval OE_UNEXPECTED An unexpected error happened.
*/
oe_result_t oe_deserialize_custom_claims(
const uint8_t* claims_buffer,
|
explains the relation between this file and github api docs | #include "http-common.h"
#include "github-v3-ua.h"
+/*
+ * There is a 1-1 mapping between https://docs.github.com/en/rest/reference
+ * and APIs defined here
+ */
namespace github {
namespace v3 {
namespace git_database {
|
YAJL: Fix minor spelling mistake | @@ -44,7 +44,7 @@ int elektraKeyNameReverseNext (keyNameReverseIterator * it)
if (*real == KDB_PATH_ESCAPE)
{
- ++real; // we skipped to much
+ ++real; // we skipped too much
}
const char * currentEnd = real; // now we know where the string will end
|
switch to scope_fs only before creating a new thread | @@ -600,14 +600,13 @@ go_switch(char *stackptr, void *cfunc, void *gfunc)
: // clobbered register
);
- // Switch to the libc TCB
+ void *thread_fs;
+ if ((thread_fs = lstFind(g_threadlist, go_fs)) == NULL) {
+ // Switch to the main thread TCB
if (arch_prctl(ARCH_SET_FS, scope_fs) == -1) {
scopeLog("arch_prctl set scope", -1, CFG_LOG_ERROR);
goto out;
}
-
- void *thread_fs;
- if ((thread_fs = lstFind(g_threadlist, go_fs)) == NULL) {
pthread_t thread;
pthread_create(&thread, NULL, dumb_thread, NULL);
|
Improved packaging script. | #
# Contact: [email protected]
-. ./debian.conf
+# ====== Obtain package information =========================================
CHANGELOG_HEADER="`head -n1 debian/changelog`"
-PACKAGE=`echo $CHANGELOG_HEADER | sed -e "s/(.*//" -e "s/ //g"`
+PACKAGE=`echo ${CHANGELOG_HEADER} | sed -e "s/(.*//" -e "s/ //g"`
+
+# ====== Clean up ===========================================================
rm -f *.deb *.dsc *.asc *.changes *.build *.upload *.tar.gz stamp-h* svn-commit* *~
-rm -rf $PACKAGE-*.gz $PACKAGE"_"*.gz $PACKAGE-*.bz2 $PACKAGE"_"*.bz2
+
+for type in gz bz2 xz ; do
+ find . -maxdepth 1 -name "${PACKAGE}-*.${type}" | xargs -r rm
+ find . -maxdepth 1 -name "${PACKAGE}_*.${type}" | xargs -r rm
+done
+find . -maxdepth 1 -name "*.buildinfo" | xargs -r rm
shopt -s extglob
-rm -rf $PACKAGE-+([0-9]).+([0-9]).+([0-9])*
+rm -rf ${PACKAGE}-+([0-9]).+([0-9]).+([0-9])*
|
Remove redundant memory allocation in struct imageblock
rgb_lns, alpha_lns, and nan_texel all store one value per texel,
not one value per color channel, so the multiply by 4 is
superfluous. | @@ -190,9 +190,9 @@ struct imageblock
float work_data[MAX_TEXELS_PER_BLOCK * 4]; // the data that we will compress, either linear or LNS (0..65535 in both cases)
float deriv_data[MAX_TEXELS_PER_BLOCK * 4]; // derivative of the conversion function used, used to modify error weighting
- uint8_t rgb_lns[MAX_TEXELS_PER_BLOCK * 4]; // 1 if RGB data are being treated as LNS
- uint8_t alpha_lns[MAX_TEXELS_PER_BLOCK * 4]; // 1 if Alpha data are being treated as LNS
- uint8_t nan_texel[MAX_TEXELS_PER_BLOCK * 4]; // 1 if the texel is a NaN-texel.
+ uint8_t rgb_lns[MAX_TEXELS_PER_BLOCK]; // 1 if RGB data are being treated as LNS
+ uint8_t alpha_lns[MAX_TEXELS_PER_BLOCK]; // 1 if Alpha data are being treated as LNS
+ uint8_t nan_texel[MAX_TEXELS_PER_BLOCK]; // 1 if the texel is a NaN-texel.
float red_min, red_max;
float green_min, green_max;
|
serial_vtx: add timeout to waiting for transfer_done | @@ -26,8 +26,9 @@ uint8_t volatile vtx_frame_length = 0;
uint8_t volatile vtx_frame_offset = 0;
void serial_vtx_send_data(uint8_t *data, uint32_t size) {
- while (vtx_transfer_done == 0)
+ for (uint32_t timeout = 0x1000; vtx_transfer_done == 0 && timeout; --timeout) {
__WFI();
+ }
vtx_transfer_done = 0;
|
docket: fix broket |install | ++ on-diff
|= =diff:hood
=+ !<(=diff:hood q.cage.sign)
+ ~& diff
?- -.diff
%commit (on-commit [desk arak]:diff)
%suspend (on-suspend [desk arak]:diff)
=. by-base (~(put by by-base) base.href.docket desk)
:: if the glob specification is unchanged, keep it
::
- ?: &(?=(^ pre) =(href.docket.u.pre href.docket))
+ ?: &(?=(^ pre) =(href.docket.u.pre href.docket) ?=(%glob -.chad.u.pre))
[~[add-fact:cha] state]
:: if the glob spec changed, but we already host it, keep it
:: (this is the "just locally uploaded" case)
==
++ docket-loc `path`/desk/docket-0
++ docket-exists
- ?& (~(has in .^((set ^desk) %cd (scry:io %$ ~))) desk)
+ ?: =(0 ud:.^(cass:clay %cw (scry:io desk ~))) %.n
.^(? %cu (scry:io desk docket-loc))
- ==
+ ::
++ docket .^(^docket %cx (scry:io desk docket-loc))
--
--
|
Strip whitespace in boot.dst | @@ -987,6 +987,7 @@ environment is needed, use run-context."
(defn checkmodule
[f testpath]
(if f f (do
+ (def p (string.replace-all "?" normname testpath))
(def p (string.replace-all "?" normname testpath))
(file.open p))))
(reduce checkmodule nil module.paths))
|
Jenkins: Add `-Werror` to Debian Sid Clang build | @@ -517,7 +517,8 @@ def generateFullBuildStages() {
"debian-unstable-full-clang",
DOCKER_IMAGES.sid,
CMAKE_FLAGS_BUILD_ALL +
- CMAKE_FLAGS_CLANG
+ CMAKE_FLAGS_CLANG +
+ CMAKE_FLAGS_WERROR
,
[TEST.ALL, TEST.MEM, TEST.INSTALL]
)
|
Cosmetic fixes in port.go.
This closes on GitHub.
From | @@ -134,7 +134,10 @@ func nxt_go_port_send(pid C.int, id C.int, buf unsafe.Pointer, buf_size C.int,
p := find_port(key)
- if p != nil {
+ if p == nil {
+ return 0
+ }
+
n, oobn, err := p.snd.WriteMsgUnix(C.GoBytes(buf, buf_size),
C.GoBytes(oob, oob_size), nil)
@@ -143,9 +146,7 @@ func nxt_go_port_send(pid C.int, id C.int, buf unsafe.Pointer, buf_size C.int,
}
return C.int(n)
- }
- return 0
}
//export nxt_go_main_send
@@ -154,7 +155,10 @@ func nxt_go_main_send(buf unsafe.Pointer, buf_size C.int, oob unsafe.Pointer,
p := main_port()
- if p != nil {
+ if p == nil {
+ return 0
+ }
+
n, oobn, err := p.snd.WriteMsgUnix(C.GoBytes(buf, buf_size),
C.GoBytes(oob, oob_size), nil)
@@ -165,9 +169,6 @@ func nxt_go_main_send(buf unsafe.Pointer, buf_size C.int, oob unsafe.Pointer,
return C.int(n)
}
- return 0
-}
-
func new_port(pid int, id int, t int, rcv int, snd int) *port {
p := &port{
key: port_key{
@@ -200,7 +201,9 @@ func (p *port) read(handler http.Handler) error {
if c_req == 0 {
m.Close()
- } else {
+ return nil
+ }
+
r := find_request(c_req)
go func(r *request) {
@@ -219,7 +222,6 @@ func (p *port) read(handler http.Handler) error {
} else {
m.Close()
}
- }
- return err
+ return nil
}
|
Better toolname conditionals and modulesflag shouldn't be initialized | @@ -124,10 +124,10 @@ end
function main(target, sourcebatch, opt)
-- do compile
- local modulesflag = "-fmodules"
+ local modulesflag = nil
local _, toolname = target:tool("cxx")
local compinst = compiler.load("cxx")
- if toolname == "clang" or toolname == "gcc" then
+ if toolname:find("clang", 1, true) or toolname:find("gcc", 1, true) then
if compinst:has_flags("-fmodules") then
modulesflag = "-fmodules"
elseif compinst:has_flags("-fmodules-ts") then
|
Allow to disable DNS SRV lookups
This
Tested-by: Build Bot | @@ -244,6 +244,24 @@ Connspec::parse_options(
if (sscanf(value, "%d", &m_loglevel) != 1) {
SET_ERROR("console_log_level must be a numeric value");
}
+ } else if (!strcmp(key, "dnssrv")) {
+ if ((m_flags & F_DNSSRV_EXPLICIT) == F_DNSSRV_EXPLICIT) {
+ SET_ERROR("Cannot use dnssrv scheme with dnssrv option");
+ }
+ int btmp = 0;
+ if (!strcmp(value, "on") || !strcmp(value, "true")) {
+ btmp = 1;
+ } else if (!strcmp(value, "off") || !strcmp(value, "false")) {
+ btmp = 0;
+ } else if (sscanf(value, "%d", &btmp) != 1) {
+ printf("Coldn't parse value!\n");
+ SET_ERROR("dnssrv must have numeric (boolean) value");
+ }
+ if (btmp) {
+ m_flags |= F_DNSSRV;
+ } else {
+ m_flags &= ~F_DNSSRV_EXPLICIT;
+ }
} else {
m_ctlopts.push_back(std::make_pair(key, value));
}
|
doc: document disabled ruby test | @@ -7,6 +7,7 @@ tests/shell/check_merge.sh for INI
tests/shell/shell_recorder/mathcheck.esr for INI (hard-coded ni)
doc/help/kdb-get.md for INI
src/bindings/io/glib/CMakeLists.txt with GLib >= 2.70.0 due to incompatible -Wpedantic flag (commit 74c3dad04bad1dd7a6be4d259ee6e93e4fed1726)
+src/bindings/swig/ruby/tests/CMakeLists.txt disabled testruby_tools_plugindatabase.rb in commit 87d1a4f1ec19a0cf86b877e6d2eb9e1d124d96ee
### Jenkins
|
fix: replace BoatIotSdkDeInit(); with BoatFree(); in test_002InitWallet_0008SetNodeUrlFailureNodeUrlOutOfLimit
fix the issue aitos-io#1050 | @@ -716,7 +716,7 @@ START_TEST(test_002InitWallet_0008SetNodeUrlFailureNodeUrlOutOfLimit)
/* 2-2. verify the global variables that be affected */
ck_assert(wallet_ptr->network_info.node_url_ptr == NULL);
- BoatIotSdkDeInit();
+ BoatFree(wallet_ptr);
}
END_TEST
|
misc: enable losf in obs | @@ -36,7 +36,7 @@ mpi_families=["openmpi3","mpich","mvapich2","impi"]
# define (standalone) component packages
standalone = ["charliecloud","cmake","conman","docs","easybuild","gnu-compilers","hwloc",
- "lmod","lustre-client","meta-packages","nagios","pbspro","pmix","singularity","slurm",
+ "lmod","losf","lustre-client","meta-packages","nagios","pbspro","pmix","singularity","slurm",
"spack","test-suite","valgrind"]
# define (compiler dependent) packages
|
README: update package/upgrade counts for v1.3.5 badges | ---
-[ ](https://github.com/openhpc/ohpc/wiki/Component-List-v1.3.5)
-[ ](https://github.com/openhpc/ohpc/releases/tag/v1.3.5.GA)
-[ ](https://github.com/openhpc/ohpc/releases/tag/v1.3.5.GA)
+[ ](https://github.com/openhpc/ohpc/wiki/Component-List-v1.3.5)
+[ ](https://github.com/openhpc/ohpc/releases/tag/v1.3.5.GA)
+[ ](https://github.com/openhpc/ohpc/releases/tag/v1.3.5.GA)
[ ](http://test.openhpc.community:8080/job/1.3.x/view/1.3.5/)
|
Fix small typo in test/recipes/05-test_pbe.t | @@ -24,5 +24,5 @@ plan tests => 1;
$ENV{OPENSSL_CONF} = abs_path(srctop_file("test", "default-and-legacy.cnf"));
-ok(run(test((["pbetest"])), "Running PBE test"));
+ok(run(test((["pbetest"]))), "Running PBE test");
|
py/pberror: fix message for I/O error
Fix typo "Try unplugging problem"
Add line about why to check the traceback: to see which motor or sensor is causing the problem
Put hub reboot suggestion last | @@ -61,11 +61,12 @@ void pb_assert(pbio_error_t error) {
mp_raise_OSError(os_err);
#else // MICROPY_ERROR_REPORTING == MICROPY_ERROR_REPORTING_TERSE
static const MP_DEFINE_STR_OBJ(msg_io_obj, "\n\n"
- "Unexpected hardware input/output error:\n"
- "--> Try unplugging problem sensor or motor and plug it back in again.\n"
- "--> Try rebooting the hub/brick if the problem persists.\n"
- "--> Check the line in your script that matches\n"
+ "Unexpected hardware input/output error with a motor or sensor:\n"
+ "--> Try unplugging the sensor or motor and plug it back in again.\n"
+ "--> To see which sensor or motor is causing the problem,\n"
+ " check the line in your script that matches\n"
" the line number given in the 'Traceback' above.\n"
+ "--> Try rebooting the hub/brick if the problem persists.\n"
"\n");
static const MP_DEFINE_STR_OBJ(msg_no_dev_obj, "\n\n"
"A sensor or motor is not connected to the specified port:\n"
|
Create files with FILE_ATTRIBUTE_NOT_CONTENT_INDEXED
Might avoid problems with the Windows Search Service, although my
earlier testing suggests that the only reliable solution is to
exclude the folder via Indexing Options in Control Panel. | @@ -399,7 +399,8 @@ S_init(FSFileHandleIVARS *ivars, String *path, uint32_t flags) {
char *path_ptr = Str_To_Utf8(path);
HANDLE handle
= CreateFileA(path_ptr, desired_access, share_mode, NULL,
- creation_disposition, FILE_ATTRIBUTE_NORMAL, NULL);
+ creation_disposition, FILE_ATTRIBUTE_NOT_CONTENT_INDEXED,
+ NULL);
FREEMEM(path_ptr);
if (handle == INVALID_HANDLE_VALUE) {
|
Fix behave tests after introducing relfilenode counter change.
A lot of tests assumed OID == relfilenode. We updated the tests to not assume
that anymore. | @@ -3741,7 +3741,7 @@ Feature: Validate command line arguments
"""
select relstorage,
reloptions,compresstype,columnstore,compresslevel,checksum from
- pg_class c , pg_appendonly a where c.relfilenode=a.relid and
+ pg_class c , pg_appendonly a where c.oid=a.relid and
c.relname='default_guc'
"""
Then validate that following rows are in the stored rows
@@ -3753,7 +3753,7 @@ Feature: Validate command line arguments
"""
select relstorage,
reloptions,compresstype,columnstore,compresslevel,checksum from
- pg_class c , pg_appendonly a where c.relfilenode=a.relid and
+ pg_class c , pg_appendonly a where c.oid=a.relid and
c.relname='role_guc_table'
"""
Then validate that following rows are in the stored rows
@@ -3765,7 +3765,7 @@ Feature: Validate command line arguments
"""
select relstorage,
reloptions,compresstype,columnstore,compresslevel,checksum from
- pg_class c , pg_appendonly a where c.relfilenode=a.relid and
+ pg_class c , pg_appendonly a where c.oid=a.relid and
c.relname='session_guc_table'
"""
Then validate that following rows are in the stored rows
|
luci-app-firewall: drop FullCone-NAT option | @@ -56,7 +56,6 @@ return view.extend({
};
o = s.option(form.Flag, 'drop_invalid', _('Drop invalid packets'));
- o = s.option(form.Flag, 'fullcone', _('Enable FullCone NAT'));
var p = [
s.option(form.ListValue, 'input', _('Input')),
|
ExtendedTools: disable Linklocal hostname | @@ -563,10 +563,10 @@ PPH_STRING EtFwGetNameFromAddress(
// if (!string) string = PhCreateString(L"[Multicast]");
// return PhReferenceObject(string);
//}
- else if (IN4_IS_ADDR_LINKLOCAL(&Address->InAddr))
- {
- static PPH_STRING string = NULL;
- if (!string) string = PhCreateString(L"[Linklocal]");
+ //else if (IN4_IS_ADDR_LINKLOCAL(&Address->InAddr))
+ //{
+ // static PPH_STRING string = NULL;
+ // if (!string) string = PhCreateString(L"[Linklocal]");
// return PhReferenceObject(string);
//}
|
iOS compilation flags | @@ -36,8 +36,12 @@ set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} /WINMD /NODEFAULTLIB
endif(WIN32)
if(IOS)
-set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Os -fvisibility=hidden -flto=thin")
-set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11 -ftemplate-depth=1024 -Os -fvisibility=hidden -flto=thin")
+set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fvisibility=hidden")
+set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11 -ftemplate-depth=1024 -fvisibility=hidden")
+if(NOT CMAKE_BUILD_TYPE STREQUAL "Debug")
+set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Os -flto=thin")
+set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Os -flto=thin")
+endif()
set(CMAKE_XCODE_ATTRIBUTE_ONLY_ACTIVE_ARCH YES)
set(CMAKE_XCODE_ATTRIBUTE_CLANG_ENABLE_MODULES YES)
|
user gszy comment
Comment was:
removing the MAX_FILE_SIZE ifdef/define/endif,
replacing the st.st_size > (off_t)SSIZE_MAX test with st.st_size > (intmax_t) SIZE_MAX,
perhaps removing the sizeof(st.st_size) != sizeof(size_t) test as well.
done here | #define O_BINARY 0
#endif
-#ifndef MAX_FILE_SIZE
-#define MAX_FILE_SIZE (1<<20) // signed long int max value
-#endif
-
#ifdef _MSC_VER
#define __attribute__(x)
#endif
@@ -2202,14 +2198,11 @@ static int map_file(mapped_file_t *mf, const char *path) {
goto on_error;
}
- if (sizeof(st.st_size) != sizeof(size_t)) {
- // on 32 bit systems, check if there is an overflow
- if (st.st_size > (off_t)MAX_FILE_SIZE /*1 GB*/ ) {
- // limit file size to 1 GB
+ if (st.st_size > (intmax_t) SIZE_MAX ) {
fprintf(stderr, "mmap() file %s too big\n", path);
goto on_error;
}
- }
+
mf->base =
(uint8_t *)mmap(NULL, (size_t)(st.st_size), PROT_READ, MAP_SHARED, fd, 0);
|
osi_input: leverage vlib_buffer_get_current | @@ -131,8 +131,8 @@ osi_input (vlib_main_t * vm,
b0 = vlib_get_buffer (vm, bi0);
b1 = vlib_get_buffer (vm, bi1);
- h0 = (void *) (b0->data + b0->current_data);
- h1 = (void *) (b1->data + b1->current_data);
+ h0 = vlib_buffer_get_current (b0);
+ h1 = vlib_buffer_get_current (b1);
next0 = lm->input_next_by_protocol[h0->protocol];
next1 = lm->input_next_by_protocol[h1->protocol];
@@ -201,7 +201,7 @@ osi_input (vlib_main_t * vm,
b0 = vlib_get_buffer (vm, bi0);
- h0 = (void *) (b0->data + b0->current_data);
+ h0 = vlib_buffer_get_current (b0);
next0 = lm->input_next_by_protocol[h0->protocol];
|
adds comment to and reformats +emsa:rs256 | [%seq [%obj sha-256:obj:asn1] [%nul ~] ~]
[%oct 32 (shax m)]
==
- =/ t=(list @) ~(ren raw:en:der pec)
- =/ tlen (lent t)
+ :: note: this asn.1 digest is rendered raw here, as we require
+ :: big-endian bytes, and the product of +en:der is little-endian
+ ::
+ =/ t=(list @D) ~(ren raw:en:der pec)
+ =/ tlen=@ud (lent t)
?: (lth emlen (add 11 tlen))
~|(%emsa-too-short !!)
- =/ ps (reap (sub emlen (add 3 tlen)) 0xff)
- %+ rep 3
- (flop (weld [0x0 0x1 ps] [0x0 t])) :: note: big-endian
+ =/ ps=(list @D)
+ (reap (sub emlen (add 3 tlen)) 0xff)
+ (rep 3 (flop (weld [0x0 0x1 ps] [0x0 t])))
:: +sign:rs256: sign message
::
:: An RSA signature is the primitive decryption of the message hash.
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.