message
stringlengths 6
474
| diff
stringlengths 8
5.22k
|
---|---|
rm removes container, not image | # See ./README.md for details.
#
+unset RMI
+unset PRUNE
+
USAGE="Usage: $(basename $0) [-h] [options] [test] ..."
COMPOSE=$(which docker-compose 2>/dev/null)
@@ -59,14 +62,14 @@ do
echo >&2 "error: can't use -r with -R"
exit 1
fi
- RM=" --rm"
+ RMI=1
;;
R)
if [ -z "$CI" ]; then
echo >&2 "error: -R is only available in a CI workflow"
exit 1
fi
- if [ -n "$RM" ]; then
+ if [ -n "$RMI" ]; then
echo >&2 "error: can't use -R with -r"
exit 1
fi
@@ -81,7 +84,7 @@ done
shift $((OPTIND-1))
BUILD="$COMPOSE build"
-RUN="$COMPOSE run$RM"
+RUN="$COMPOSE run --rm"
HR="========================================================================="
log() { echo; echo $HR; echo " $*"; echo $HR; }
@@ -125,6 +128,8 @@ for TEST in $TESTS; do
fi
fi
+ [ -z "$RMI" ] || $DOCKER rmi testcontainers_$TEST
+
[ -z "$PRUNE" ] || $DOCKER system prune --all --force
done
|
Rename the FORCE entries for 24K and 1004K to include the MIPS prefix | @@ -812,7 +812,7 @@ USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#else
#endif
-#ifdef FORCE_1004K
+#ifdef FORCE_MIPS1004K
#define FORCE
#define ARCHITECTURE "MIPS"
#define SUBARCHITECTURE "1004K"
@@ -826,7 +826,7 @@ USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#else
#endif
-#ifdef FORCE_24K
+#ifdef FORCE_MIPS24K
#define FORCE
#define ARCHITECTURE "MIPS"
#define SUBARCHITECTURE "24K"
|
ec/asm/ecp_nistz256-avx2.pl: harmonize clang version detection. | @@ -47,7 +47,7 @@ if (!$addx && $win64 && ($flavour =~ /masm/ || $ENV{ASM} =~ /ml64/) &&
$addx = ($1>=12);
}
-if (!$addx && `$ENV{CC} -v 2>&1` =~ /(^clang version|based on LLVM) ([3-9])\.([0-9]+)/) {
+if (!$addx && `$ENV{CC} -v 2>&1` =~ /((?:^clang|LLVM) version|based on LLVM) ([3-9])\.([0-9]+)/) {
my $ver = $2 + $3/100.0; # 3.1->3.01, 3.10->3.10
$avx = ($ver>=3.0) + ($ver>=3.01);
$addx = ($ver>=3.03);
|
add pnetcdf to io-libs metapackages | @@ -110,6 +110,8 @@ Requires: netcdf-fortran-gnu7-mpich%{PROJ_DELIM}
Requires: netcdf-fortran-gnu7-openmpi%{PROJ_DELIM}
Requires: netcdf-gnu7-mpich%{PROJ_DELIM}
Requires: netcdf-gnu7-openmpi%{PROJ_DELIM}
+Requires: pnetcdf-gnu7-mpich%{PROJ_DELIM}
+Requires: pnetcdf-gnu7-openmpi%{PROJ_DELIM}
Requires: phdf5-gnu7-mpich%{PROJ_DELIM}
Requires: phdf5-gnu7-openmpi%{PROJ_DELIM}
%ifnarch aarch64
@@ -117,6 +119,7 @@ Requires: adios-gnu7-mvapich2%{PROJ_DELIM}
Requires: netcdf-cxx-gnu7-mvapich2%{PROJ_DELIM}
Requires: netcdf-fortran-gnu7-mvapich2%{PROJ_DELIM}
Requires: netcdf-gnu7-mvapich2%{PROJ_DELIM}
+Requires: pnetcdf-gnu7-mvapich2%{PROJ_DELIM}
Requires: phdf5-gnu7-mvapich2%{PROJ_DELIM}
%endif
%description -n %{PROJ_NAME}-gnu7-io-libs
@@ -298,6 +301,11 @@ Requires: netcdf-intel-impi%{PROJ_DELIM}
Requires: netcdf-intel-mpich%{PROJ_DELIM}
Requires: netcdf-intel-mvapich2%{PROJ_DELIM}
Requires: netcdf-intel-openmpi%{PROJ_DELIM}
+Requires: pnetcdf-gnu7-impi%{PROJ_DELIM}
+Requires: pnetcdf-intel-impi%{PROJ_DELIM}
+Requires: pnetcdf-intel-mpich%{PROJ_DELIM}
+Requires: pnetcdf-intel-mvapich2%{PROJ_DELIM}
+Requires: pnetcdf-intel-openmpi%{PROJ_DELIM}
Requires: phdf5-gnu7-impi%{PROJ_DELIM}
Requires: phdf5-intel-impi%{PROJ_DELIM}
Requires: phdf5-intel-mpich%{PROJ_DELIM}
|
mm/Kconfig: remove wrong dependency and explanation for MM_KERNEL_HEAP
CONFIG_MM_KERNEL_HEAP is mandatory so that it should not be turned
off by user and it should not have any dependency. Explanation either
has regacy content.
This commit removes dependencies with PROTECTED_BUILD and KERNEL_BUILD
and remove config description to hide from user. | #
config MM_KERNEL_HEAP
- bool "Support a protected, kernel heap"
+ bool
default y
- depends on BUILD_PROTECTED || BUILD_KERNEL
- ---help---
- Partition heap memory into two parts: (1) a protected, kernel-mode
- heap accessible only by the TinyAra kernel, and (2) an unprotected
- user-mode heap for use by applications. If you are only interested
- in protected the kernel from read access, then this option is not
- necessary. If you wish to secure the kernel data as well, then
- this option should be selected.
-
- The kernel heap size that is used is provided a a platform-specific
- up_allocate_kheap() interface. This configuration setting is made
- available to that platform specific code. However, the
- up_allocate_kheap() interface may chose to ignore this setting if it
- has a more appropriate heap allocation strategy.
config REALLOC_DISABLE_NEIGHBOR_EXTENSION
bool "Disable Realloc Neighbor Extension"
|
gta2 zoom change | @@ -140,7 +140,7 @@ DWORD WINAPI Init(LPVOID bDelay)
if (strncmp(szCameraZoom, "auto", 4) != 0)
Screen.fCameraZoom = iniReader.ReadFloat("MAIN", "CameraZoomFactor", 1.0f);
else
- Screen.fCameraZoom = (Screen.fAspectRatio / (4.0f / 3.0f)) * 2.25f;
+ Screen.fCameraZoom = (Screen.fAspectRatio / (4.0f / 3.0f)) * 2.5f;
//Res change
pattern = hook::pattern("8B 2D ? ? ? ? 56 8B 35 ? ? ? ? 57 8B 3D"); //0x4CB29F
|
Updated README.md download section. | @@ -95,9 +95,9 @@ GoAccess can be compiled and used on *nix systems.
Download, extract and compile GoAccess with:
- $ wget https://tar.goaccess.io/goaccess-1.2.tar.gz
- $ tar -xzvf goaccess-1.2.tar.gz
- $ cd goaccess-1.2/
+ $ wget https://tar.goaccess.io/goaccess-1.3.tar.gz
+ $ tar -xzvf goaccess-1.3.tar.gz
+ $ cd goaccess-1.3/
$ ./configure --enable-utf8 --enable-geoip=legacy
$ make
# make install
|
Address analysis bug | @@ -8115,7 +8115,7 @@ int direct_receive_test()
0, NULL, NULL);
if (ret == 0) {
- int ret = tls_api_one_scenario_body_connect(test_ctx, &simulated_time, 0, 0, 0);
+ ret = tls_api_one_scenario_body_connect(test_ctx, &simulated_time, 0, 0, 0);
/* Prepare to send data */
if (ret == 0) {
|
fixing Rho.System.Platform | @@ -4243,7 +4243,9 @@ namespace "run" do
sim_conf += "#{key}=#{value}\r\n"
end
+ if ! (sim_conf.include? "platform=") || (sim_conf.include? "platform='UNKNOWN'")
sim_conf += "platform=#{RUBY_PLATFORM}\r\n"
+ end
fname = File.join(fdir, 'rhosimconfig.txt')
File.open(fname, "wb") do |fconf|
|
CCode: Move code to read config into function | @@ -62,6 +62,28 @@ void setDefaultConfig (CCodeData * mapping)
mapping->decode['0'_uc] = '\0'_uc;
}
+void readConfig (CCodeData * const mapping, KeySet * const config, Key const * const root)
+{
+ Key * cur = 0;
+ while ((cur = ksNext (config)) != 0)
+ {
+ /* Ignore keys that are not directly below the config root key or have an incorrect size */
+ if (keyRel (root, cur) != 1 || keyGetBaseNameSize (cur) != 3 || keyGetValueSize (cur) != 3) continue;
+
+ int res;
+ res = elektraHexcodeConvFromHex (keyBaseName (cur)[1]);
+ res += elektraHexcodeConvFromHex (keyBaseName (cur)[0]) * 16;
+
+ int val;
+ val = elektraHexcodeConvFromHex (keyString (cur)[1]);
+ val += elektraHexcodeConvFromHex (keyString (cur)[0]) * 16;
+
+ /* Hexencode this character! */
+ mapping->encode[res & 255] = val;
+ mapping->decode[val & 255] = res;
+ }
+}
+
int elektraCcodeOpen (Plugin * handle, Key * key ELEKTRA_UNUSED)
{
CCodeData * mapping = new CCodeData ();
@@ -85,29 +107,13 @@ int elektraCcodeOpen (Plugin * handle, Key * key ELEKTRA_UNUSED)
Key * root = ksLookupByName (config, "/chars", 0);
- if (!root)
+ if (root)
{
- setDefaultConfig (mapping);
- return 0;
+ readConfig (mapping, config, root);
}
-
- Key * cur = 0;
- while ((cur = ksNext (config)) != 0)
+ else
{
- /* Ignore keys that are not directly below the config root key or have an incorrect size */
- if (keyRel (root, cur) != 1 || keyGetBaseNameSize (cur) != 3 || keyGetValueSize (cur) != 3) continue;
-
- int res;
- res = elektraHexcodeConvFromHex (keyBaseName (cur)[1]);
- res += elektraHexcodeConvFromHex (keyBaseName (cur)[0]) * 16;
-
- int val;
- val = elektraHexcodeConvFromHex (keyString (cur)[1]);
- val += elektraHexcodeConvFromHex (keyString (cur)[0]) * 16;
-
- /* Hexencode this character! */
- mapping->encode[res & 255] = val;
- mapping->decode[val & 255] = res;
+ setDefaultConfig (mapping);
}
return 0;
|
lib /libc/README.txt : spelling error
End of the line 9 : kerne -->kernel | @@ -6,7 +6,7 @@ what you would expect to find in a standard C library. The sub-directories
in this directory contain standard interface that can be executed by user-
mode programs.
-Normally, TinyAra is built with no protection and all threads running in kerne-
+Normally, TinyAra is built with no protection and all threads running in kernel-
mode. In that model, there is no real architectural distinction between
what is a kernel-mode program and what is a user-mode program; the system is
more like on multi-threaded program that all runs in kernel-mode.
|
bugID:18638526:[breeze] Avoid mebedtls conflicts in esp32. | @@ -13,7 +13,7 @@ endif
$(NAME)_INCLUDES += include/mbedtls
-inter_breeze_crypto ?= 0
+inter_breeze_crypto ?= 1
ifeq ($(inter_breeze_crypto),0)
$(NAME)_COMPONENTS-y += mbedtls
GLOBAL_DEFINES-y += USE_EXTERNAL_MEBDTLS
|
BugID:18934873:Opt ble poll sem usage | #include <zephyr.h>
-//#include <init.h>
#include <device.h>
#include <clock_control.h>
#include <atomic.h>
hdr.onion.node)
static inline struct net_buf *process_node(struct radio_pdu_node_rx *node_rx);
-struct k_poll_signal g_pkt_recv = K_POLL_SIGNAL_INITIALIZER(g_pkt_recv);
int hci_driver_recv(void)
{
- g_pkt_recv.signaled = 0;
-
while (1) {
struct radio_pdu_node_rx *node_rx = NULL;
struct net_buf *buf = NULL;
@@ -187,7 +183,6 @@ static int hci_driver_send(struct net_buf *buf)
#endif /* CONFIG_BT_CONN */
case BT_BUF_CMD:
err = cmd_handle(buf);
-
break;
default:
BT_ERR("Unknown HCI type %u", type);
@@ -197,9 +192,6 @@ static int hci_driver_send(struct net_buf *buf)
if (!err) {
net_buf_unref(buf);
}
- else
- {
- }
BT_DBG("exit: %d", err);
@@ -208,14 +200,7 @@ static int hci_driver_send(struct net_buf *buf)
void pkt_recv_callback(void)
{
- extern struct k_sem g_poll_sem;
- unsigned int key;
-
- key = irq_lock();
- g_pkt_recv.signaled = 1;
- irq_unlock(key);
-
- k_sem_give(&g_poll_sem);
+ event_callback(K_POLL_TYPE_DATA_RECV);
}
static int hci_driver_open(void)
|
Minor re-styling in PE module. | @@ -2187,18 +2187,26 @@ define_function(is_64bit)
}
-static uint64_t rich_internal(
+// _rich_version
+//
+// Returns the number of rich signatures that match the specified version and
+// toolid numbers.
+//
+static uint64_t _rich_version(
YR_OBJECT* module,
uint64_t version,
uint64_t toolid)
{
int64_t rich_length;
int64_t rich_count;
+
int i;
PRICH_SIGNATURE clear_rich_signature;
SIZED_STRING* rich_string;
+ uint64_t result = 0;
+
// Check if the required fields are set
if (is_undefined(module, "rich_signature.length"))
return UNDEFINED;
@@ -2220,8 +2228,6 @@ static uint64_t rich_internal(
rich_count = \
(rich_length - sizeof(RICH_SIGNATURE)) / sizeof(RICH_VERSION_INFO);
-
- uint64_t count_sum = 0;
for (i = 0; i < rich_count; i++)
{
DWORD id_version = yr_le32toh(clear_rich_signature->versions[i].id_version);
@@ -2232,39 +2238,39 @@ static uint64_t rich_internal(
if ((version == UNDEFINED || match_version) &&
(toolid == UNDEFINED || match_toolid))
{
- count_sum += yr_le32toh(clear_rich_signature->versions[i].times);
+ result += yr_le32toh(clear_rich_signature->versions[i].times);
}
}
- return count_sum;
+ return result;
}
define_function(rich_version)
{
return_integer(
- rich_internal(module(), integer_argument(1), UNDEFINED));
+ _rich_version(module(), integer_argument(1), UNDEFINED));
}
define_function(rich_version_toolid)
{
return_integer(
- rich_internal(module(), integer_argument(1), integer_argument(2)));
+ _rich_version(module(), integer_argument(1), integer_argument(2)));
}
define_function(rich_toolid)
{
return_integer(
- rich_internal(module(), UNDEFINED, integer_argument(1)));
+ _rich_version(module(), UNDEFINED, integer_argument(1)));
}
define_function(rich_toolid_version)
{
return_integer(
- rich_internal(module(), integer_argument(2), integer_argument(1)));
+ _rich_version(module(), integer_argument(2), integer_argument(1)));
}
|
GA: Replace working-directory with cd | @@ -165,5 +165,6 @@ jobs:
- name: Build Packages
shell: bash
- working-directory: ${{runner.workspace}}/tools/ci
- run: ./build.sh
+ run: |
+ cd $GITHUB_WORKSPACE/tools/ci
+ ./build.sh
|
Mirror fix from CUPS upstream. | @@ -1270,7 +1270,7 @@ do_test(_ipp_file_t *f, /* I - IPP data file */
if (ippGetName(attrptr))
{
- if (cupsArrayFind(a, (void *)ippGetName(attrptr)))
+ if (cupsArrayFind(a, (void *)ippGetName(attrptr)) && data->format < _CUPS_OUTPUT_LIST)
add_stringf(data->errors, "Duplicate \"%s\" attribute in %s group",
ippGetName(attrptr), ippTagString(group));
|
Add warning to build tool about asan in debug builds with portmidi | @@ -316,6 +316,9 @@ build_target() {
if [[ $portmidi_enabled = 1 ]]; then
add libraries -lportmidi
add cc_flags -DFEAT_PORTMIDI
+ if [[ $1 = debug ]]; then
+ echo -e "Warning: The PortMIDI library contains bugs.\nIt may trigger address sanitizer in debug builds.\nThese are not bugs in orca." >&2
+ fi
fi
;;
esac
|
[catboost] fix dimenciality of test set; it was working because method resizes to be doc_count*factor_count in size initialized by zeroes
[catboost] fix dimenciality of test set; it was working because method resizes to be doc_count*factor_count in size initialized by zeroes
([arc::mergeid] df882f7e-ecaa8ac6-632bd2ca-16) | @@ -25,7 +25,9 @@ Y_UNIT_TEST_SUITE(TrainModelTests) {
TPool test;
test.Docs.Resize(/*doc count*/1, /*factors count*/ 3, /*baseline dimension*/ 0, /*has queryId*/ false, /*has subgroupId*/ false);
- test.Docs.Factors[0] = {std::numeric_limits<float>::quiet_NaN(), +1.5f, -2.5f};
+ test.Docs.Factors[0] = {std::numeric_limits<float>::quiet_NaN()};
+ test.Docs.Factors[1] = {+1.5f};
+ test.Docs.Factors[2] = {-2.5f};
test.Docs.Target = {1.0f};
TFullModel model;
|
Hide config/reachable and swversion attributes for ZGP sensors (hue tap) | @@ -1057,6 +1057,12 @@ bool DeRestPluginPrivate::sensorToMap(const Sensor *sensor, QVariantMap &map)
continue;
}
+ if (rid.suffix == RConfigReachable &&
+ sensor->type().startsWith(QLatin1String("ZGP")))
+ {
+ continue; // don't provide reachable for green power devices
+ }
+
if (strncmp(rid.suffix, "config/", 7) == 0)
{
const char *key = item->descriptor().suffix + 7;
@@ -1081,7 +1087,7 @@ bool DeRestPluginPrivate::sensorToMap(const Sensor *sensor, QVariantMap &map)
{
map["ep"] = sensor->fingerPrint().endpoint;
}
- if (!sensor->swVersion().isEmpty())
+ if (!sensor->swVersion().isEmpty() && !sensor->type().startsWith(QLatin1String("ZGP")))
{
map["swversion"] = sensor->swVersion();
}
|
In case an llvm or clang is set, we need to ensure that cmake finds the Clang package in AOMP. So we need to set Clang_DIR and LLVM_DIR | @@ -79,8 +79,9 @@ if [ "$1" != "nocmake" ] && [ "$1" != "install" ] ; then
BUILDTYPE="Release"
echo $SUDO rm -rf $BUILD_AOMP/build/comgr
$SUDO rm -rf $BUILD_AOMP/build/comgr
- export LLVM_DIR=$AOMP
- MYCMAKEOPTS="-DCMAKE_INSTALL_PREFIX=$INSTALL_COMGR -DCMAKE_BUILD_TYPE=$BUILDTYPE -DCMAKE_INSTALL_RPATH_USE_LINK_PATH=ON -DCMAKE_INSTALL_RPATH=$AOMP_INSTALL_DIR/lib -DLLVM_BUILD_MAIN_SRC_DIR=$AOMP_REPOS/$AOMP_PROJECT_REPO_NAME/llvm -DLLVM_DIR=$LLVM_DIR"
+ export LLVM_DIR=$AOMP_INSTALL_DIR
+ export Clang_DIR=$AOMP_INSTALL_DIR
+ MYCMAKEOPTS="-DCMAKE_INSTALL_PREFIX=$INSTALL_COMGR -DCMAKE_BUILD_TYPE=$BUILDTYPE -DCMAKE_INSTALL_RPATH_USE_LINK_PATH=ON -DCMAKE_INSTALL_RPATH=$AOMP_INSTALL_DIR/lib -DLLVM_BUILD_MAIN_SRC_DIR=$AOMP_REPOS/$AOMP_PROJECT_REPO_NAME/llvm -DLLVM_DIR=$AOMP_INSTALL_DIR -DClang_DIR=$AOMP_INSTALL_DIR"
mkdir -p $BUILD_AOMP/build/comgr
cd $BUILD_AOMP/build/comgr
echo " -----Running comgr cmake ---- "
|
out_syslog: register upstream with instance | @@ -885,6 +885,7 @@ static int cb_syslog_init(struct flb_output_instance *ins, struct flb_config *co
flb_syslog_config_destroy(ctx);
return -1;
}
+ flb_output_upstream_set(ctx->u, ins);
}
/* Set the plugin context */
|
Sockeye: Code cleanup in parser | @@ -18,7 +18,6 @@ module SockeyeParser
import Text.Parsec
import Text.Parsec.Expr
-import Text.Parsec.Expr
import qualified Text.Parsec.Token as P
import Text.Parsec.Language (emptyDef)
@@ -431,11 +430,26 @@ propertyExpr = buildExpressionParser opTable term <?> "property expression"
{- Helper functions -}
lexer = P.makeTokenParser (
emptyDef {
- {- List of reserved Names -}
- P.reservedNames = keywords,
+ {- List of reserved names -}
+ P.reservedNames =
+ [ "import", "module"
+ , "input", "output"
+ , "type", "const"
+ , "memory", "intr", "power", "clock", "instance"
+ , "of"
+ , "forall", "in"
+ , "accepts", "maps", "converts", "overlays"
+ , "instantiates", "binds"
+ , "to", "at"
+ , "bits"
+ ],
{- List of operators -}
- P.reservedOpNames = operators,
+ P.reservedOpNames =
+ [ "+", "-", "*", "/", "++"
+ , "!", "&&", "||"
+ , "."
+ ],
{- Valid identifiers -}
P.identStart = letter,
@@ -457,7 +471,6 @@ reservedOp = P.reservedOp lexer
parens = P.parens lexer
brackets = P.brackets lexer
braces = P.braces lexer
-symbol = P.symbol lexer
commaSep = P.commaSep lexer
commaSep1 = P.commaSep1 lexer
semiSep = P.semiSep lexer
@@ -465,25 +478,6 @@ semiSep1 = P.semiSep1 lexer
identString = P.identifier lexer
natural = P.natural lexer
-keywords =
- [ "import", "module"
- , "input", "output"
- , "type", "const"
- , "memory", "intr", "power", "clock", "instance"
- , "of"
- , "forall", "in"
- , "accepts", "maps", "converts", "overlays"
- , "instantiates", "binds"
- , "to", "at"
- , "bits"
- ]
-
-operators =
- [ "+", "-", "*", "/", "++"
- , "!", "&&", "||"
- , "."
- ]
-
typeName = identString <?> "type name"
constName = identString <?> "constant name"
moduleName = identString <?> "module name"
|
host_command: Add flags1 to host_command_get_features
There are two entries in feature flags array. Report back flags1 along
with flag0 while responding to host queries.
BRANCH=None
TEST=make -j buildall | @@ -715,6 +715,7 @@ static int host_command_get_features(struct host_cmd_handler_args *args)
memset(r, 0, sizeof(*r));
r->flags[0] = get_feature_flags0();
+ r->flags[1] = get_feature_flags1();
return EC_RES_SUCCESS;
}
DECLARE_HOST_COMMAND(EC_CMD_GET_FEATURES,
|
Add note about aliasing of operands for mbedtls_mpi_mod_raw_add() | @@ -158,15 +158,19 @@ int mbedtls_mpi_mod_raw_write( const mbedtls_mpi_uint *A,
/**
* \brief Perform a known-size modular addition.
*
- * Calculate `A + B modulo N` where \p A, \p B, and \p N have the same size.
+ * Calculate `A + B modulo N`.
+ *
+ * The number of limbs in each operand, and the result, is given by the
+ * modulus \p N.
+ *
+ * \p X may be aliased to \p A or \p B, or even both, but may not overlap
+ * either otherwise.
*
* \param[out] X The result of the modular addition.
* \param[in] A Little-endian presentation of the left operand. This
- * must be smaller than \p N, and have the same number of
- * limbs.
+ * must be smaller than \p N.
* \param[in] B Little-endian presentation of the right operand. This
- * must be smaller than \p N, and have the same number of
- * limbs.
+ * must be smaller than \p N.
* \param[in] N The address of the modulus.
*/
void mbedtls_mpi_mod_raw_add( mbedtls_mpi_uint *X,
|
fs/mtd/smart: fix typo, - => ,
To split the arguments, comma should be used.
fdbg(".." - ret, ..); => fdbg("..", ret, ..); | @@ -3049,7 +3049,7 @@ static int smart_relocate_sector(FAR struct smart_struct_s *dev, uint16_t oldsec
offset = oldsector * dev->mtdBlksPerSector * dev->geo.blocksize + offsetof(struct smart_sect_header_s, status);
ret = smart_bytewrite(dev, offset, 1, &newstatus);
if (ret < 0) {
- fdbg("Error %d releasing old sector %d\n" - ret, oldsector);
+ fdbg("Error %d releasing old sector %d\n", ret, oldsector);
}
#ifndef CONFIG_MTD_SMART_ENABLE_CRC
|
acrn-config: add IVSHMEM config in hybrid_rt of tgl-rvp
add IVSHMEM config in hybrid_rt scenario on tgl-rvp board.
Acked-by: Victor Sun | <ACPI_PARSE_ENABLED desc="Enable ACPI runtime parsing.">y</ACPI_PARSE_ENABLED>
<L1D_VMENTRY_ENABLED desc="Enable L1 cache flush before VM entry.">n</L1D_VMENTRY_ENABLED>
<MCE_ON_PSC_DISABLED desc="Force to disable software workaround for Machine Check Error on Page Size Change.">n</MCE_ON_PSC_DISABLED>
+ <IVSHMEM desc="IVSHMEM configuration">
+ <IVSHMEM_ENABLED desc="Enable Share Memory between VMs by IVSHMEM.">n</IVSHMEM_ENABLED>
+ <IVSHMEM_REGION desc="the name, size, colon separated IDs of communication VMs of share memory region, separated by comma like this: hv:/shm_region_0, 0x200000, 0:2"></IVSHMEM_REGION>
+ </IVSHMEM>
</FEATURES>
<MEMORY>
|
in_event_type: use proper API to generate id | @@ -234,10 +234,10 @@ static int send_traces(struct flb_input_instance *ins)
ctr_scope_span_set_instrumentation_scope(scope_span, instrumentation_scope);
/* generate a random trace_id */
- trace_id = ctr_id_create_random();
+ trace_id = ctr_id_create_random(CTR_ID_OTEL_TRACE_SIZE);
/* generate a random ID for the new span */
- span_id = create_random_span_id();
+ span_id = ctr_id_create_random(CTR_ID_OTEL_SPAN_SIZE);
/* Create a root span */
span_root = ctr_span_create(ctx, scope_span, "main", NULL);
@@ -314,8 +314,8 @@ static int send_traces(struct flb_input_instance *ins)
ctr_span_kind_set(span_child, CTRACE_SPAN_CLIENT);
/* create a Link (no valid IDs of course) */
- trace_id = ctr_id_create_random();
- span_id = create_random_span_id();
+ trace_id = ctr_id_create_random(CTR_ID_OTEL_TRACE_SIZE);
+ span_id = ctr_id_create_random(CTR_ID_OTEL_SPAN_SIZE);
link = ctr_link_create_with_cid(span_child, trace_id, span_id);
ctr_link_set_trace_state(link, "aaabbbccc");
@@ -344,12 +344,15 @@ static int cb_collector_time(struct flb_input_instance *ins,
if (ctx->type == FLB_EVENT_TYPE_LOGS) {
ret = send_logs(ins);
+ flb_plg_debug(ins, "logs, ret=%i", ret);
}
else if (ctx->type == FLB_EVENT_TYPE_METRICS) {
ret = send_metrics(ins);
+ flb_plg_debug(ins, "metrics, ret=%i", ret);
}
else if (ctx->type == FLB_EVENT_TYPE_TRACES) {
ret = send_traces(ins);
+ flb_plg_debug(ins, "traces, ret=%i", ret);
}
flb_plg_info(ins, "[OK] collector_time");
@@ -360,12 +363,9 @@ static int cb_collector_time(struct flb_input_instance *ins,
static int cb_event_type_init(struct flb_input_instance *ins,
struct flb_config *config, void *data)
{
- int fd;
int ret;
char *tmp;
- struct unit_test *ut;
struct event_type *ctx = NULL;
- struct flb_upstream *upstream;
ctx = flb_calloc(1, sizeof(struct event_type));
if (!ctx) {
@@ -380,7 +380,7 @@ static int cb_event_type_init(struct flb_input_instance *ins,
ctx->type = FLB_EVENT_TYPE_LOGS;
- tmp = flb_input_get_property("type", ins);
+ tmp = (char *) flb_input_get_property("type", ins);
if (tmp) {
if (strcasecmp(tmp, "logs") == 0) {
ctx->type = FLB_EVENT_TYPE_LOGS;
@@ -412,8 +412,6 @@ static int cb_event_type_init(struct flb_input_instance *ins,
static int cb_event_type_exit(void *data, struct flb_config *config)
{
- int i;
- int failed = FLB_FALSE;
struct event_type *ctx = data;
flb_free(ctx);
|
CMake: macOS links against Vulkan;
But shh in the build script we're going to make the Vulkan library
variable point to MoltenVK. | @@ -201,6 +201,10 @@ endif()
# Vulkan
if(LOVR_USE_VULKAN)
include_directories(deps/vulkan-headers/include)
+ if(APPLE)
+ find_package(Vulkan REQUIRED)
+ set(LOVR_VULKAN Vulkan::Vulkan)
+ endif()
endif()
# OpenXR
@@ -368,6 +372,7 @@ target_link_libraries(lovr
${LOVR_MSDF}
${LOVR_ODE}
${LOVR_GLSLANG}
+ ${LOVR_VULKAN}
${LOVR_OPENXR}
${LOVR_OCULUS_AUDIO}
${LOVR_PTHREADS}
@@ -724,6 +729,7 @@ elseif(APPLE)
move_lib(${LOVR_LUA})
move_lib(${LOVR_ODE})
move_lib(${LOVR_MSDF})
+ move_lib(${LOVR_VULKAN})
move_lib(${LOVR_OCULUS_AUDIO})
move_lib(${LOVR_PHONON})
foreach(target ${ALL_PLUGIN_TARGETS})
|
Add pragma for Wstrict-aliasing
(build failing for STM32F091, but that's expected on the warning there with GCC 5) | @@ -677,11 +677,21 @@ CLR_RT_HeapBlock* Interop_Marshal_RetrieveManagedObject( CLR_RT_StackFrame &stac
**
** Returns: Reference to the field.
**********************************************************************/
+
+#ifdef __GNUC__
+#pragma GCC diagnostic push
+#pragma GCC diagnostic ignored "-Wstrict-aliasing"
+#endif
+
bool &Interop_Marshal_GetField_bool( CLR_RT_HeapBlock *pThis, unsigned int fieldIndex )
{
return (bool&)pThis[ fieldIndex ].NumericByRef().u1;
}
+#ifdef __GNUC__
+#pragma GCC diagnostic pop
+#endif
+
unsigned char &Interop_Marshal_GetField_UINT8( CLR_RT_HeapBlock *pThis, unsigned int fieldIndex )
{
return pThis[ fieldIndex ].NumericByRef().u1;
|
channel.js: ack every 30 events *even if this.outstandingJSON is empty* | @@ -182,9 +182,6 @@ class Channel {
// sends a JSON command command to the server.
//
sendJSONToChannel(j) {
- if(!j && this.outstandingJSON.length === 0) {
- return;
- }
let req = new XMLHttpRequest();
req.open("PUT", this.channelURL());
req.setRequestHeader("Content-Type", "application/json");
@@ -193,8 +190,11 @@ class Channel {
if (j) {
this.outstandingJSON.push(j);
}
+
+ if (this.outstandingJSON.length > 0) {
let x = JSON.stringify(this.outstandingJSON);
req.send(x);
+ }
} else {
// we add an acknowledgment to clear the server side queue
//
|
Provider config module: allow providers to already be loaded
This allows 'default' to be configured in the config file, if needed. | @@ -113,6 +113,8 @@ static int provider_conf_load(OPENSSL_CTX *libctx, const char *name,
activate = 1;
}
+ prov = ossl_provider_find(libctx, name);
+ if (prov == NULL)
prov = ossl_provider_new(libctx, name, NULL);
if (prov == NULL) {
if (soft)
|
mmapstorage: remove unneccessarry manual ksRewind | @@ -725,8 +725,6 @@ static void mmapToKeySet (char * mappedRegion, KeySet * returned)
returned->array = keySet->array;
returned->size = keySet->size;
returned->alloc = keySet->alloc;
- returned->cursor = 0;
- returned->current = 0;
returned->mmapMetaData = (MmapMetaData *) (mappedRegion + OFFSET_REAL_MMAPMETADATA);
// to be able to free() the returned KeySet, just set the array flag here
returned->flags = KS_FLAG_MMAP_ARRAY;
@@ -979,8 +977,6 @@ static void unlinkFile (Key * parentKey)
keySet->array = copy->array;
keySet->size = copy->size;
keySet->alloc = copy->alloc;
- keySet->cursor = 0;
- keySet->current = 0;
keySet->mmapMetaData = 0;
keySet->flags = 0;
// keySet->opmphm invalidated by ksClose already
|
ra-tls: fix the build conflict of wolfssl | @@ -65,11 +65,10 @@ $(LIBDIR)/libwolfssl.a: $(LIBDIR) wolfssl
wolfssl: WOLFSSL_CONFIGURE_FLAGS := --prefix=$(shell readlink -f $(PREFIX)) --enable-writedup --enable-static --enable-keygen --enable-certgen --enable-certext --with-pic --disable-examples --disable-crypttests --enable-aesni --enable-tlsv10 $(WOLFSSL_CONFFLAGS)
wolfssl:
- test -d wolfssl || git clone https://github.com/wolfSSL/wolfssl
- cd wolfssl && git stash && git checkout 57e5648a5dd734d1c219d385705498ad12941dd0 && \
- patch -p1 < ../patch/wolfssl.patch && \
- ./autogen.sh && \
- CFLAGS="$(CFLAGS)" ./configure $(WOLFSSL_CONFIGURE_FLAGS)
+ [ ! -d wolfssl ] && git clone https://github.com/wolfSSL/wolfssl && \
+ cd wolfssl && git checkout 57e5648a5dd734d1c219d385705498ad12941dd0 && \
+ patch -p1 < ../patch/wolfssl.patch && ./autogen.sh && \
+ CFLAGS="$(CFLAGS)" ./configure $(WOLFSSL_CONFIGURE_FLAGS) || true
ifdef ECDSA
$(LIBDIR)/libra-challenger.a: $(SGX_RA_TLS)/ecdsa-sample-data/real/sample_data.o
|
Updated struct comment. | @@ -110,7 +110,7 @@ typedef struct GLog_ {
uint8_t log_erridx;
uint32_t read; /* lines read/parsed */
uint32_t inode; /* inode of the log */
- uint64_t bytes; /* bytes read */
+ uint64_t bytes; /* bytes read on each iteration */
uint64_t size; /* original size of log */
uint64_t length; /* length read from the log so far */
uint64_t invalid; /* invalid lines for this log */
|
fix mixgo touch | @@ -208,7 +208,7 @@ Blockly.Python.number1 = function(){
Blockly.Python.sensor_mixgo_pin_pressed = function(){
Blockly.Python.definitions_['import_mixgo'] = 'import mixgo';
var pin = Blockly.Python.valueToCode(this, 'button', Blockly.Python.ORDER_ATOMIC);
- var code = pin+'.is_touched()';
+ var code = 'mixgo.'+pin+'.is_touched()';
return [code, Blockly.Python.ORDER_ATOMIC];
};
|
fix warning in vs2019 | @@ -659,7 +659,8 @@ static mi_segment_t* mi_segment_init(mi_segment_t* segment, size_t required, mi_
// initialize pages info
for (size_t i = 0; i < capacity; i++) {
- segment->pages[i].segment_idx = i;
+ mi_assert_internal(i <= 255);
+ segment->pages[i].segment_idx = (uint8_t)i;
segment->pages[i].is_reset = false;
segment->pages[i].is_committed = commit;
segment->pages[i].is_zero_init = is_zero;
|
Removing duplicate macro definitions.
This issue was introduced in | #include <linux/memfd.h>
#endif
-#define NXT_UNIT_MAX_PLAIN_SIZE 1024
-#define NXT_UNIT_LOCAL_BUF_SIZE \
- (NXT_UNIT_MAX_PLAIN_SIZE + sizeof(nxt_port_msg_t))
-
#define NXT_UNIT_MAX_PLAIN_SIZE 1024
#define NXT_UNIT_LOCAL_BUF_SIZE \
(NXT_UNIT_MAX_PLAIN_SIZE + sizeof(nxt_port_msg_t))
|
Remove macos-10.15 from test-lua. | @@ -258,13 +258,9 @@ jobs:
runs-on: ${{ matrix.os }}
strategy:
matrix:
- os: [ubuntu-latest, macos-10.15, macos-latest]
+ os: [ubuntu-latest, macos-latest]
luaVersion: ["5.1", "5.2", "5.3", "5.4", "luajit"]
exclude:
- - os: macos-10.15
- luaVersion: 5.1
- - os: macos-10.15
- luaVersion: luajit
- os: macos-latest
luaVersion: 5.1
- os: macos-latest
|
Add menu portal to scene select | @@ -10,6 +10,8 @@ import {
} from "../../reducers/entitiesReducer";
import { createCacheFunction } from "../../lib/helpers/cache";
+const menuPortalEl = document.getElementById("MenuPortal");
+
const cachedObj = createCacheFunction();
const filterOption = ({ label }, string) => {
@@ -91,6 +93,7 @@ class SceneSelect extends Component {
Option,
}}
menuPlacement="auto"
+ menuPortalTarget={menuPortalEl}
/>
);
}
|
Update changelog entry to mention PSA API compliance | Bugfix
* Consistently return PSA_ERROR_INVALID_ARGUMENT on invalid cipher input
- sizes, as opposed to PSA_ERROR_BAD_STATE in some cases.
+ sizes (instead of PSA_ERROR_BAD_STATE in some cases) to make the
+ psa_cipher_* functions compliant with the PSA Crypto API specification.
|
ble_mesh: fix rejecting invalid remote public key | @@ -937,6 +937,20 @@ static void send_pub_key(void)
PROV_BUF(buf, 65);
const u8_t *key;
+ /* Copy remote key in little-endian for bt_mesh_dh_key_gen().
+ * X and Y halves are swapped independently. Use response
+ * buffer as a temporary storage location. The validating of
+ * the remote public key is finished when it is received.
+ */
+ sys_memcpy_swap(buf.data, &link.conf_inputs[17], 32);
+ sys_memcpy_swap(&buf.data[32], &link.conf_inputs[49], 32);
+
+ if (bt_mesh_dh_key_gen(buf.data, prov_dh_key_cb, 0)) {
+ BT_ERR("%s, Unable to generate DHKey", __func__);
+ prov_send_fail_msg(PROV_ERR_UNEXP_ERR);
+ return;
+ }
+
key = bt_mesh_pub_key_get();
if (!key) {
BT_ERR("%s, No public key available", __func__);
@@ -954,18 +968,8 @@ static void send_pub_key(void)
memcpy(&link.conf_inputs[81], &buf.data[1], 64);
- prov_send(&buf);
-
- /* Copy remote key in little-endian for bt_mesh_dh_key_gen().
- * X and Y halves are swapped independently.
- */
- net_buf_simple_reset(&buf);
- sys_memcpy_swap(buf.data, &link.conf_inputs[17], 32);
- sys_memcpy_swap(&buf.data[32], &link.conf_inputs[49], 32);
-
- if (bt_mesh_dh_key_gen(buf.data, prov_dh_key_cb, 0)) {
- BT_ERR("%s, Unable to generate DHKey", __func__);
- prov_send_fail_msg(PROV_ERR_UNEXP_ERR);
+ if (prov_send(&buf)) {
+ BT_ERR("Failed to send Public Key");
return;
}
|
Eliminate uses of CREAL on left-hand side of assignments | @@ -198,8 +198,8 @@ extern int blas_level1_thread_with_return_value(int mode, BLASLONG m, BLASLONG n
static void zdot_compute(BLASLONG n, FLOAT *x, BLASLONG inc_x, FLOAT *y, BLASLONG inc_y, OPENBLAS_COMPLEX_FLOAT *result)
{
FLOAT dotr = 0.0, doti = 0.0;
- CREAL(*result) = 0.0;
- CIMAG(*result) = 0.0;
+ OPENBLAS_COMPLEX_FLOAT cf = OPENBLAS_MAKE_COMPLEX_FLOAT(0.0, 0.0);
+ *result = cf;
if ( n < 0 ) return;
@@ -290,8 +290,8 @@ static void zdot_compute(BLASLONG n, FLOAT *x, BLASLONG inc_x, FLOAT *y, BLASLON
"d0", "d1", "d2", "d3", "d4", "d5", "d6", "d7"
);
- CREAL(*result) = dotr;
- CIMAG(*result) = doti;
+ cf=OPENBLAS_MAKE_COMPLEX_FLOAT(dotr, doti);
+ *result = cf;
return;
}
@@ -312,9 +312,7 @@ OPENBLAS_COMPLEX_FLOAT CNAME(BLASLONG n, FLOAT *x, BLASLONG inc_x, FLOAT *y, BLA
int nthreads;
FLOAT dummy_alpha;
#endif
- OPENBLAS_COMPLEX_FLOAT zdot;
- CREAL(zdot) = 0.0;
- CIMAG(zdot) = 0.0;
+ OPENBLAS_COMPLEX_FLOAT zdot = OPENBLAS_MAKE_COMPLEX_FLOAT(0.0,0.0);
#if defined(SMP)
if (inc_x == 0 || inc_y == 0 || n <= 10000)
@@ -341,8 +339,7 @@ OPENBLAS_COMPLEX_FLOAT CNAME(BLASLONG n, FLOAT *x, BLASLONG inc_x, FLOAT *y, BLA
ptr = (OPENBLAS_COMPLEX_FLOAT *)result;
for (i = 0; i < nthreads; i++) {
- CREAL(zdot) = CREAL(zdot) + CREAL(*ptr);
- CIMAG(zdot) = CIMAG(zdot) + CIMAG(*ptr);
+ zdot = OPENBLAS_MAKE_COMPLEX_FLOAT (CREAL(zdot) + CREAL(*ptr), CIMAG(zdot) + CIMAG(*ptr));
ptr = (void *)(((char *)ptr) + sizeof(double) * 2);
}
}
|
graph-fe: fix loading of inbox | @@ -390,6 +390,7 @@ export default class GraphApi extends BaseApi<StoreState> {
const data = await this.scry<any>('graph-store',
`/shallow-children/${ship}/${name}${idx}`
);
+ data['graph-update'].fetch = true;
this.store.handleEvent({ data });
}
|
[name] The owner normally receives the costs of his request | @@ -25,10 +25,14 @@ func ExecuteNameTx(bs *state.BlockState, scs *state.ContractState, txBody *types
var nameState *state.V
owner := getOwner(scs, []byte(types.AergoName), false)
if owner != nil {
+ if bytes.Equal(sender.ID(), owner) {
+ nameState = sender
+ } else {
nameState, err = bs.GetAccountStateV(owner)
if err != nil {
return nil, err
}
+ }
} else {
nameState = receiver
}
|
Remove unnecessary printf. | @@ -583,14 +583,6 @@ u3m_bail(u3_noun how)
abort();
}
-#ifdef U3_PRINT_WATERMARK
- if ( c3__meme == how ) {
- fprintf(stderr, "u3R %p, parent %x\n", u3R, u3R->par_p);
- fprintf(stderr, "max %dMB\r\n", u3R->all.max_w / 256000);
- abort();
- }
-#endif
-
/* Printf some metadata.
*/
if ( c3__exit != how && (_(u3ud(how)) || 1 != u3h(how)) ) {
|
dont bother checking old blocks, the network has verified them for us | @@ -2478,7 +2478,7 @@ bool CBlock::ConnectBlock(CTxDB& txdb, CBlockIndex* pindex, bool fJustCheck)
}
}
- if(!fJustCheck && pindex->GetBlockTime() > GetTime() - 30*nCoinbaseMaturity && (pindex->nHeight < pindexBest->nHeight+5) && !IsInitialBlockDownload() && FortunastakePayments == true)
+ if(!fJustCheck && pindex->GetBlockTime() > GetTime() - 20*nCoinbaseMaturity && (pindex->nHeight < pindexBest->nHeight+5) && !IsInitialBlockDownload() && FortunastakePayments == true)
{
LOCK2(cs_main, mempool.cs);
|
test/qemu-jessie: bail out fast on kernel panic | @@ -49,6 +49,7 @@ expect {
timeout { send_user "\nTimeout waiting for petitboot\n"; exit 1 }
eof { send_user "\nUnexpected EOF\n;" exit 1 }
"Machine Check Stop" { exit 1;}
+"Kernel panic - not syncing" { exit 2;}
"Starting system log daemon"
}
close
|
Oculus mobile: Promote Lua print() statements to INFO
This means Lua print() statements can be uniquely filtered out vs anything else (because internal Lovr logging uses loglevel DEBUG and lovr errors use loglevel WARN). | #include "platform.h"
#define LOG(...) __android_log_print(ANDROID_LOG_DEBUG, "LOVR", __VA_ARGS__)
+#define INFO(...) __android_log_print(ANDROID_LOG_INFO, "LOVR", __VA_ARGS__)
#define WARN(...) __android_log_print(ANDROID_LOG_WARN, "LOVR", __VA_ARGS__)
// Data passed from bridge code to headset code
@@ -349,7 +350,7 @@ int luax_print(lua_State* L) {
luaL_addvalue(&buffer);
}
luaL_pushresult(&buffer);
- LOG("%s", lua_tostring(L, -1));
+ INFO("%s", lua_tostring(L, -1));
return 0;
}
|
Free dict element string when done | @@ -380,6 +380,8 @@ char *objectToString(Value value) {
dictStringLength += snprintf(dictString + dictStringLength, size - dictStringLength, "%s", element);
+ free(element);
+
if (count != dict->count) {
dictStringLength += snprintf(dictString + dictStringLength, size - dictStringLength, ", ");
}
|
net/devif: replace redundant code to iob_clone_partial() | @@ -58,7 +58,6 @@ void devif_iob_send(FAR struct net_driver_s *dev, FAR struct iob_s *iob,
{
unsigned int limit = NETDEV_PKTSIZE(dev) -
NET_LL_HDRLEN(dev) - target_offset;
- unsigned int copyin;
int ret;
if (dev == NULL || len == 0 || len > limit)
@@ -76,51 +75,27 @@ void devif_iob_send(FAR struct net_driver_s *dev, FAR struct iob_s *iob,
/* Append the send buffer after device buffer */
if (dev->d_iob != NULL)
- {
- if (len > iob_navail(false) * CONFIG_IOB_BUFSIZE)
{
dev->d_sndlen = 0;
- return;
- }
- /* Skip the l3/l4 offset before append */
-
- iob_update_pktlen(dev->d_iob, target_offset);
-
- /* Skip to the I/O buffer containing the data offset */
-
- while (iob != NULL && offset > iob->io_len)
+ if (len > iob_navail(false) * CONFIG_IOB_BUFSIZE)
{
- offset -= iob->io_len;
- iob = iob->io_flink;
+ return;
}
- dev->d_sndlen = len;
-
/* Clone the iob to target device buffer */
- while (iob != NULL && len > 0)
- {
- copyin = (len > iob->io_len - offset) ?
- iob->io_len - offset : len;
-
- ret = iob_trycopyin(dev->d_iob, iob->io_data +
- iob->io_offset + offset,
- copyin, target_offset, false);
- if (ret != copyin)
+ ret = iob_clone_partial(iob, len, offset, dev->d_iob,
+ target_offset, false, false);
+ if (ret != OK)
{
netdev_iob_release(dev);
- dev->d_sndlen = 0;
nerr("devif_iob_send error, not enough iob entries, "
"send len: %u\n", len);
return;
}
- target_offset += copyin;
- len -= copyin;
- offset = 0;
- iob = iob->io_flink;
- }
+ dev->d_sndlen = len;
}
else
{
|
Rever drag limit integration as it makes rotary control too granular | @@ -409,9 +409,6 @@ static lv_res_t lv_rotary_signal(lv_obj_t * rotary, lv_signal_t sign, void * par
}
else if(sign == LV_SIGNAL_PRESSING) {
- lv_indev_t * indev = lv_indev_get_act();
- if(indev == NULL) return res;
-
lv_indev_get_point(param, &p);
lv_coord_t drag_x_diff = p.x -ext->last_drag_x;
@@ -419,7 +416,6 @@ static lv_res_t lv_rotary_signal(lv_obj_t * rotary, lv_signal_t sign, void * par
if (drag_x_diff > 0) drag_x_diff = ext->threshold;
else drag_x_diff = -ext->threshold;
}
- if (LV_MATH_ABS(drag_x_diff) > indev->driver.drag_limit) {
ext->last_drag_x = p.x;
if (ext->knob_area.y1 < p.y && p.y < ext->knob_area.y2) {
@@ -436,7 +432,6 @@ static lv_res_t lv_rotary_signal(lv_obj_t * rotary, lv_signal_t sign, void * par
}
}
}
- }
else if(sign == LV_SIGNAL_RELEASED || sign == LV_SIGNAL_PRESS_LOST) {
ext->dragging = false;
|
another usage tip in main docs | @@ -25,7 +25,7 @@ Important notes
- `bedtools` also assumes that all input files use UNIX line endings.
- Unless you use the `-sorted` option, `bedtools` currently does not support chromosomes larger than 512Mb
- When using the -sorted option with files whose chromosomes are not lexicographically sorted (e.g., sort -k1,1 -k2,2n for BED files), one must provide a genome file (`-g`) defining the expected chromosome order.
-
+- `bedtools` requires that chromosome naming schemes are identical in files that you are comparing (e.g., 'chr1' in one file and '1' in another won't work).
==========================
Interesting Usage Examples
|
[Bootloader] boot modifications for Bootloader Updater | @@ -41,8 +41,10 @@ bool load_flag = false;
uint16_t source_id = 0; // used to save source_id, ie gate_id
uint32_t tickstart = 0;
+ #ifndef BOOTLOADER_UPDATER
// Create a variable of the size of mode flash value allowing to init the shared flash section
const uint8_t __attribute__((used)) __attribute__((section(".boot_flags"))) sharedSection = BOOT_MODE;
+ #endif
/*******************************************************************************
* Function
@@ -88,7 +90,11 @@ void LuosBootloader_JumpToBootloader(void)
void LuosBootloader_Init(void)
{
revision_t version = {.major = 2, .minor = 0, .build = 0};
+ #ifdef BOOTLOADER_UPDATER
+ Luos_CreateService(0, VOID_TYPE, "boot_updater", version);
+ #else
Luos_CreateService(0, VOID_TYPE, "boot_service", version);
+ #endif
// set ID node saved in flash
LuosBootloader_SetNodeID();
@@ -161,7 +167,11 @@ void LuosBootloader_SetNodeID(void)
******************************************************************************/
uint8_t LuosBootloader_IsEnoughSpace(uint32_t binary_size)
{
+ #ifdef BOOTLOADER_UPDATER
+ uint32_t free_space = BOOT_START_ADDRESS - APP_START_ADDRESS - 1;
+ #else
uint32_t free_space = APP_END_ADDRESS - APP_START_ADDRESS;
+ #endif
if (free_space > binary_size)
{
return SUCCEED;
|
install clusterd dependencies after installing client dependencies | "redux-promises": "^1.0.0"
},
"scripts": {
+ "postinstall": "npm install --prefix ../clusterd",
"start": "npm run server",
"server": "cd ../clusterd && npm start",
"start:dev": "concurrently \"react-scripts start\" \"npm run server:dev\"",
|
gitlab-ci: use UBSAN=1 instead of CFLAGS
and switch Integration_Test_UBSan to debian:testing, as Build_UBSan and
Unit_Test_UBSan also use debian:testing | @@ -55,7 +55,7 @@ Build_UBSan:
image: debian:testing
stage: build
script:
- - CFLAGS="-O2 -fsanitize=undefined -fsanitize=address" make all
+ - UBSAN=1 make all
artifacts:
paths:
- bart
@@ -126,7 +126,7 @@ Unit_Test_UBSan:
image: debian:testing
stage: test1
script:
- - AUTOCLEAN=0 CFLAGS="-O2 -fsanitize=undefined -fsanitize=address" make utest
+ - AUTOCLEAN=0 UBSAN=1 make utest
needs: [Build_UBSan]
dependencies:
- Build_UBSan
@@ -200,10 +200,10 @@ Integration_Test_Clang:
Integration_Test_UBSan:
- image: debian:stable
+ image: debian:testing
stage: test2
script:
- - AUTOCLEAN=0 CFLAGS="-O2 -fsanitize=undefined -fsanitize=address" make test
+ - AUTOCLEAN=0 UBSAN=1 make test
needs: [Build_UBSan]
dependencies:
- Build_UBSan
|
bugfix by disabling IRAM attr on ISR | @@ -82,7 +82,7 @@ static void example_timer_init(int timer_idx, bool auto_reload)
ret = timer_enable_intr(TIMER_GROUP_0, TIMER_0);
ESP_ERROR_CHECK(ret);
/* Register an ISR handler */
- timer_isr_register(TIMER_GROUP_0, timer_idx, timer0_ISR, (void *)raw_val, ESP_INTR_FLAG_IRAM, NULL);
+ timer_isr_register(TIMER_GROUP_0, timer_idx, timer0_ISR, (void *)raw_val, 0, NULL);
}
static void prepare_data(int pnt_num)
|
soc: fix trace memory region for single core mode | @@ -156,9 +156,9 @@ SOC_RESERVE_MEMORY_REGION(0x3ffae000, 0x3ffae6e0, rom_data);
#if CONFIG_MEMMAP_TRACEMEM
#if CONFIG_MEMMAP_TRACEMEM_TWOBANKS
-SOC_RESERVE_MEMORY_REGION(0x3fff8000, 0x40000000, trace_mem); //Reserve trace mem region
+SOC_RESERVE_MEMORY_REGION(0x3fff8000, 0x40000000, trace_mem); //Reserve trace mem region, 32K for both cpu
#else
-SOC_RESERVE_MEMORY_REGION(0x3fff8000, 0x3fffc000, trace_mem); //Reserve trace mem region
+SOC_RESERVE_MEMORY_REGION(0x3fffc000, 0x40000000, trace_mem); //Reserve trace mem region, 16K (upper-half) for pro cpu
#endif
#endif
|
Fix: textview placeholder not visible | @@ -444,6 +444,7 @@ void TextEdit_SetUsingStyleTags( LCUI_Widget widget, LCUI_BOOL is_true )
void TextEdit_SetMultiline( LCUI_Widget widget, LCUI_BOOL is_true )
{
LCUI_TextEdit edit = Widget_GetData( widget, self.prototype );
+ TextLayer_SetMultiline( edit->layer_placeholder, is_true );
TextLayer_SetMultiline( edit->layer_source, is_true );
TextLayer_SetMultiline( edit->layer_mask, is_true );
edit->is_multiline_mode = is_true;
@@ -454,7 +455,7 @@ void TextEdit_ClearText( LCUI_Widget widget )
LCUI_TextEdit edit;
edit = Widget_GetData( widget, self.prototype );
LCUIMutex_Lock( &edit->mutex );
- TextLayer_ClearText( edit->layer );
+ TextLayer_ClearText( edit->layer_source );
StyleTags_Clear( &edit->text_tags );
edit->tasks[TASK_UPDATE] = TRUE;
Widget_AddTask( widget, WTT_USER );
|
Specify default types. | @@ -722,6 +722,11 @@ TABLE OF CONTENTS:
to be repeated a number of times, although this is rare: Usually
a single pass suffices.
+ At this point, default types are applied. An unconstrained type
+ with type $t::(numeric,integral) is replaced with int. An
+ unconstrained type with $t::(numeric,floating) is replaced with
+ flt64.
+
4.6. Built In Traits:
4.6.1. numeric:
|
subproc: missing abort() | @@ -250,9 +250,9 @@ static bool subproc_New(honggfuzz_t * hfuzz, fuzzer_t * fuzzer)
if (!arch_launchChild(hfuzz, fuzzer->fileName)) {
LOG_E("Error launching child process");
kill(hfuzz->mainPid, SIGKILL);
- abort();
_exit(EXIT_FAILURE);
}
+ abort();
}
// Parent
LOG_D("Launched new process, pid: %d, (concurrency: %zd)", fuzzer->pid, hfuzz->threadsMax);
|
Fix rand_lib.c for no-engine configuration
When configured no-engine, we still refered to rand_engine_lock.
Rework the lock init code to avoid that. | @@ -26,11 +26,14 @@ static CRYPTO_ONCE rand_lock_init = CRYPTO_ONCE_STATIC_INIT;
DEFINE_RUN_ONCE_STATIC(do_rand_lock_init)
{
+ int ret = 1;
#ifndef OPENSSL_NO_ENGINE
rand_engine_lock = CRYPTO_THREAD_lock_new();
+ ret &= rand_engine_lock != NULL;
#endif
rand_meth_lock = CRYPTO_THREAD_lock_new();
- return rand_engine_lock != NULL && rand_meth_lock != NULL;
+ ret &= rand_meth_lock != NULL;
+ return ret;
}
int RAND_set_rand_method(const RAND_METHOD *meth)
|
activate option -k | @@ -5493,7 +5493,6 @@ while((auswahl = getopt_long (argc, argv, short_options, long_options, &index))
break;
case HCXT_HC_OUT_PMKID:
- usageerror(basename(argv[0]));
hcpmkidoutname = optarg;
verboseflag = true;
break;
|
Update qlog reference for tests | [0, "transport", "packet_sent", { "packet_type": "1RTT", "header": { "packet_size": 17, "packet_number": 25, "dcid": "01020304" }, "frames": [{
"frame_type": "datagram"}]}],
[0, "transport", "packet_sent", { "packet_type": "1RTT", "header": { "packet_size": 18, "packet_number": 26, "dcid": "01020304" }, "frames": [{
- "frame_type": "datagram", length: 16}]}],
+ "frame_type": "datagram", "length": 16}]}],
[0, "transport", "packet_sent", { "packet_type": "1RTT", "header": { "packet_size": 1, "packet_number": 27, "dcid": "01020304" }, "frames": [{
"frame_type": "handshake_done"}]}],
[0, "transport", "packet_sent", { "packet_type": "1RTT", "header": { "packet_size": 7, "packet_number": 28, "dcid": "01020304" }, "frames": [{
|
Suppress more warnings in parson.c | #include <math.h>
#include <errno.h>
-/* Suppress some MSVC warnings. */
+/* Suppress some useless MSVC warnings. */
#ifdef _MSC_VER
#pragma warning(push)
+/* address of dllimport */
+#pragma warning(disable:4232)
+/* function not inlined */
+#pragma warning(disable:4710)
+/* byte padding */
+#pragma warning(disable:4820)
/* Spectre mitigation */
#pragma warning(disable:5045)
#endif
|
RISCV64: Correcting hal_cpuGetCycles() and hal_cpuGetCycles2() functions | @@ -218,7 +218,7 @@ static inline cycles_t hal_cpuGetCycles2(void)
register cycles_t n;
__asm__ __volatile__ (
- "rdcycle %0"
+ "rdtime %0"
: "=r" (n));
return n;
}
@@ -226,10 +226,13 @@ static inline cycles_t hal_cpuGetCycles2(void)
static inline void hal_cpuGetCycles(void *cb)
{
- *(cycles_t*)cb = hal_cpuGetCycles2();
+ __asm__ __volatile__ (
+ "rdcycle %0"
+ : "=r" (*(cycles_t *)cb));
return;
}
+
/* memory management */
|
BugID:17401891: fix whitescan problem of INCOMPATIBLE_CAST in SysTimeGet | @@ -121,10 +121,15 @@ SysTime_t SysTimeGet( void )
SysTime_t calendarTime = { .Seconds = 0, .SubSeconds = 0 };
SysTime_t sysTime = { .Seconds = 0, .SubSeconds = 0 };
SysTime_t deltaTime;
+ uint32_t deltaSeconds;
+ uint32_t deltaSubSeconds;
calendarTime.Seconds = HW_RTC_GetCalendarTime( ( uint16_t* )&calendarTime.SubSeconds );
- HW_RTC_BkupRead( &deltaTime.Seconds, ( uint32_t* )&deltaTime.SubSeconds );
+ HW_RTC_BkupRead( &deltaSeconds, &deltaSubSeconds );
+
+ deltaTime.Seconds = deltaSeconds;
+ deltaTime.SubSeconds = (int16_t)deltaSubSeconds;
sysTime = SysTimeAdd( deltaTime, calendarTime );
@@ -152,6 +157,7 @@ uint32_t SysTime2Ms( SysTime_t sysTime )
deltaTime.SubSeconds = (int16_t)deltaSubSeconds;
SysTime_t calendarTime = SysTimeSub( sysTime, deltaTime );
+
return calendarTime.Seconds * 1000 + calendarTime.SubSeconds;
}
|
fixed Ruby return type error | #include <loader/loader_impl.h>
#include <reflect/reflect_type.h>
+#include <reflect/reflect_type_id.h>
#include <reflect/reflect_function.h>
#include <reflect/reflect_scope.h>
#include <reflect/reflect_context.h>
@@ -50,6 +51,7 @@ typedef struct loader_impl_rb_function_type
loader_impl_rb_module rb_module;
ID method_id;
VALUE args_hash;
+ loader_impl impl;
} * loader_impl_rb_function;
@@ -157,30 +159,40 @@ function_return function_rb_interface_invoke(function func, function_impl impl,
boolean b = 1L;
v = value_create_bool(b);
+
+ signature_set_return(s, loader_impl_type(rb_function->impl, "Boolean"));
}
else if (result_type == T_FALSE)
{
boolean b = 0L;
v = value_create_bool(b);
+
+ signature_set_return(s, loader_impl_type(rb_function->impl, "Boolean"));
}
else if (result_type == T_FIXNUM)
{
int i = FIX2INT(result_value);
v = value_create_int(i);
+
+ signature_set_return(s, loader_impl_type(rb_function->impl, "Fixnum"));
}
else if (result_type == T_BIGNUM)
{
long l = NUM2LONG(result_value);
v = value_create_long(l);
+
+ signature_set_return(s, loader_impl_type(rb_function->impl, "Bignum"));
}
else if (result_type == T_FLOAT)
{
double d = NUM2DBL(result_value);
v = value_create_double(d);
+
+ signature_set_return(s, loader_impl_type(rb_function->impl, "Float"));
}
else if (result_type == T_STRING)
{
@@ -192,6 +204,8 @@ function_return function_rb_interface_invoke(function func, function_impl impl,
{
v = value_create_string(str, (size_t)length);
}
+
+ signature_set_return(s, loader_impl_type(rb_function->impl, "String"));
}
return v;
@@ -235,9 +249,7 @@ int rb_loader_impl_initialize_types(loader_impl impl)
}
type_id_name_pair[] =
{
- /*
{ TYPE_BOOL, "Boolean" },
- */
{ TYPE_INT, "Fixnum" },
{ TYPE_LONG, "Bignum" },
{ TYPE_DOUBLE, "Float" },
@@ -702,6 +714,8 @@ int rb_loader_impl_discover_module(loader_impl impl, loader_impl_rb_module rb_mo
scope_define(sp, function_name(f), f);
+ rb_function->impl = impl;
+
log_write("metacall", LOG_LEVEL_DEBUG, "Function %s <%p> (%d)", method_name_str, (void *)f, function_parser->params_size);
}
else
|
options/ansi: add %j for strftime | @@ -242,6 +242,12 @@ size_t strftime(char *__restrict dest, size_t max_size,
return 0;
p += chunk;
c += 2;
+ }else if(*(c + 1) == 'j') {
+ auto chunk = snprintf(p, space, "%.3d", tm->tm_yday + 1);
+ if(chunk >= space)
+ return 0;
+ p += chunk;
+ c += 2;
}else if(*(c + 1) == '%') {
auto chunk = snprintf(p, space, "%%");
if(chunk >= space)
|
Utilities: Fix compilation issues in ocvalidate | @@ -343,7 +343,6 @@ CheckMiscSecurity (
UINT32 Index;
OC_KERNEL_CONFIG *UserKernel;
OC_MISC_CONFIG *UserMisc;
- OC_UEFI_CONFIG *UserUefi;
BOOLEAN IsAuthRestartEnabled;
BOOLEAN HasVSMCKext;
CONST CHAR8 *AsciiDmgLoading;
@@ -356,7 +355,6 @@ CheckMiscSecurity (
ErrorCount = 0;
UserKernel = &Config->Kernel;
UserMisc = &Config->Misc;
- UserUefi = &Config->Uefi;
HasVSMCKext = FALSE;
for (Index = 0; Index < UserKernel->Add.Count; ++Index) {
|
Small modifications to CHANGES | @@ -15,24 +15,20 @@ Released xxxx-xx-xx
* Build:
- - Add -Wno-format-truncation to suppress format truncation warnings (#489).
+ - Add ``-Wno-format-truncation`` to suppress format truncation warnings (#489).
* Bug fixes:
- - Remove `strtod` macro definition for MinGW (#498).
+ - Remove ``strtod`` macro definition for MinGW (#498).
- Add infinite loop check in `json_deep_copy()` (#490).
- - Add `pipe` macro definition for MinGW (#500).
+ - Add ``pipe`` macro definition for MinGW (#500).
- - Enhance `JANSSON_ATTRS` macro to support earlier C standard(C89) (#501).
+ - Enhance ``JANSSON_ATTRS`` macro to support earlier C standard(C89) (#501).
- Update version detection for sphinx-build (#502).
-* Tests:
-
- - Add negative test case for `test_equal_complex()` (#506).
-
* Documentation:
- Fix typos (#483, #494).
@@ -45,12 +41,6 @@ Released xxxx-xx-xx
- Document that non-blocking file descriptor is not supported on
`json_loadfd()` (#503).
- - Format code with clang-format (#508).
-
-* Other:
-
- - Add fuzz target for jansson to integrate jansson with OSS-Fuzz (#480,
- #484, #485, #486, #487).
Version 2.12
============
|
update mapkit sdk for linux | @@ -11,8 +11,8 @@ IF (GCC OR CLANG)
ENDIF()
IF (OS_LINUX)
- # Qt + protobuf 2.6.1 + GL headers + GLES2
- DECLARE_EXTERNAL_RESOURCE(MAPKIT_SDK sbr:649684872)
+ # Qt 5.6.1 + protobuf 3.6.1 + GL headers + GLES2
+ DECLARE_EXTERNAL_RESOURCE(MAPKIT_SDK sbr:897945809)
CFLAGS(
GLOBAL "-I$MAPKIT_SDK_RESOURCE_GLOBAL/mapkit_sdk/include"
GLOBAL "-I$MAPKIT_SDK_RESOURCE_GLOBAL/mapkit_sdk/local/linux.x86-64/include"
|
xive: Add CPU node "interrupts" properties representing the IPIs
This will be used in exploitation mode to request the IPIs for
the various threads. Each core node has an "interrupts" property
of the standard format for each thread of that core. | @@ -1979,6 +1979,26 @@ static void xive_init_cpu(struct cpu_thread *c)
xive_cpu_dbg(c, "CPU IPI is irq %08x\n", xs->ipi_irq);
}
+static void xive_init_cpu_properties(struct cpu_thread *cpu)
+{
+ struct cpu_thread *t;
+ uint32_t iprop[8][2] = { };
+ uint32_t i;
+
+ assert(cpu_thread_count <= 8);
+
+ if (!cpu->node)
+ return;
+ for (i = 0; i < cpu_thread_count; i++) {
+ t = (i == 0) ? cpu : find_cpu_by_pir(cpu->pir + i);
+ if (!t)
+ continue;
+ iprop[i][0] = t->xstate->ipi_irq;
+ iprop[i][1] = 0; /* Edge */
+ }
+ dt_add_property(cpu->node, "interrupts", iprop, cpu_thread_count * 8);
+ dt_add_property_cells(cpu->node, "interrupt-parent", get_ics_phandle());
+}
static uint32_t xive_read_eq(struct xive_cpu_state *xs, bool just_peek)
{
@@ -2326,6 +2346,11 @@ void init_xive(void)
for_each_cpu(cpu) {
xive_init_cpu(cpu);
}
+ /* Add interrupts propertie to each CPU node */
+ for_each_cpu(cpu) {
+ if (cpu_is_thread0(cpu))
+ xive_init_cpu_properties(cpu);
+ }
/* Calling boot CPU */
xive_cpu_callin(this_cpu());
|
docs: update comment to match table | \vspace*{\tabSpaceBot{}}
\end{table}
-% Perf Tools (2)
+% Development Tools (2)
\begin{table}[h!]
\caption*{Table~\ref{table:dev-tools} (cont): {\bf Development Tools} \vspace*{\captionSpace{}} }
\input manifest/dev-tools2
|
Throw an error if a texture is too big; | @@ -99,10 +99,15 @@ static void lovrTextureUpload(Texture* texture) {
}
static void validateSlices(TextureType type, TextureData* slices[6], int sliceCount) {
- if (type == TEXTURE_CUBE) {
- lovrAssert(sliceCount == 6, "Cube textures must have 6 images");
+ lovrAssert(sliceCount > 0, "At least one layer must be provided to create a texture");
+ int maxSize = lovrGraphicsGetLimits().textureSize;
int width = slices[0]->width;
int height = slices[0]->height;
+ bool oversized = width > maxSize || height > maxSize;
+ lovrAssert(!oversized, "Texture is too big, max size is %d x %d", maxSize, maxSize);
+
+ if (type == TEXTURE_CUBE) {
+ lovrAssert(sliceCount == 6, "Cube textures must have 6 images");
lovrAssert(width == height, "Cube textures must be square");
for (int i = 1; i < sliceCount; i++) {
int hasSameDimensions = slices[i]->width == width && slices[i]->height == height;
|
Use Lua chronos lib to measure time in benchmarks | #!/usr/bin/env lua
local lfs = require "lfs"
+local chronos = require "chronos"
local util = require "titan-compiler.util"
-- run the command a single time and return the time elapsed
local function time(cmd)
- local result = util.shell(
- [[ bash -c "{ TIMEFORMAT='%3R'; time ]].. cmd ..[[ > /dev/null; } 2>&1" ]])
- local time_elapsed = tonumber(result)
- if not time_elapsed then
- io.stderr:write(result, "\n")
- return -1
+ local t = chronos.nanotime()
+ local result, err = util.shell(cmd .. " > /dev/null")
+ local time_elapsed = chronos.nanotime() - t
+ if not result then
+ io.stderr:write(err .. "\n")
+ os.exit(1)
end
return time_elapsed
end
|
armv8: Fix idcap_identify syscall | @@ -826,22 +826,18 @@ static struct sysret dispatcher_dump_capabilities(struct capability *cap,
return SYSRET(err);
}
-static struct sysret handle_idcap_identify(struct capability *to,
+static struct sysret handle_idcap_identify(struct capability *cap,
arch_registers_state_t *context,
int argc)
{
- assert(to->type == ObjType_ID);
- assert(3 == argc);
-
- struct registers_aarch64_syscall_args* sa = &context->syscall_args;
- idcap_id_t *idp = (idcap_id_t *) sa->arg2;
+ assert(cap->type == ObjType_ID);
+ assert(2 == argc);
- // Check validity of user space pointer
- if (!access_ok(ACCESS_WRITE, (lvaddr_t) idp, sizeof(*idp))) {
- return SYSRET(SYS_ERR_INVALID_USER_BUFFER);
- }
+ idcap_id_t id;
+ struct sysret sysret = sys_idcap_identify(cap, &id);
+ sysret.value = id;
- return sys_idcap_identify(to, idp);
+ return sysret;
}
static struct sysret handle_cap_identify(struct capability *root,
|
doc: describe cross compilation | @@ -532,6 +532,34 @@ Also, no ronn was available, thus you need to do:
gem install ronn
+### Cross Compiling ###
+
+In Elektra cross compiling needs two steps. If you get errors like
+`elektra-export-errors_EXE_LOC` not found, go on reading.
+
+In the first step, you need to compile Elektra for the host architecture
+and install the build tools:
+
+ cmake -DINSTALL_BUILD_TOOLS=ON \
+ -DINSTALL_SYSTEM_FILES=OFF \
+ -DCMAKE_PREFIX_PATH=$(STAGING_DIR_HOST) \
+ ..
+ make -j 5
+ make install -j 5
+
+Where `$(STAGING_DIR_HOST)` must be a directory to be found in the later
+build process. In particular, `$(STAGING_DIR_HOST)/bin` must be in a
+directory found by a later `find_program`.
+
+Then you need to compile Elektra again, but for the target architecture.
+Now, the build tools such as `elektra-export-errors` should be found in
+the `$(STAGING_DIR_HOST)/bin` where they were installed before.
+
+For reference, you can look into the
+[OpenWRT Elektra Makefile](https://github.com/openwrt/packages/blob/master/libs/elektra/Makefile)
+and the
+[CMake in OpenWRT](https://github.com/openwrt/openwrt/blob/master/include/cmake.mk).
+
## See also
- [INSTALL](INSTALL.md).
|
Remove useless braces in ECHDE-PSK part of ssl_parse_client_key_exchange() | @@ -4112,13 +4112,11 @@ static int ssl_parse_client_key_exchange( mbedtls_ssl_context *ssl )
if( mbedtls_ssl_get_psk( ssl, &psk, &psk_len )
== MBEDTLS_ERR_SSL_PRIVATE_KEY_REQUIRED )
- {
/*
* This should never happen because the existence of a PSK is always
* checked before calling this function
*/
return( MBEDTLS_ERR_SSL_INTERNAL_ERROR );
- }
/* Write the PSK length as uint16 */
MBEDTLS_PUT_UINT16_BE( psk_len, psm, 0 );
|
test: ensure X509 has no dependency on BIGNUM when built without MBEDTLS_DEPRECATED_REMOVED | @@ -1767,6 +1767,9 @@ component_test_full_no_deprecated () {
msg "test: make, full_no_deprecated config" # ~ 5s
make test
+
+ msg "test: ensure that X509 has no direct dependency on BIGNUM_C"
+ not grep mbedtls_mpi library/libmbedx509.a
}
component_test_full_no_deprecated_deprecated_warning () {
|
Update script dependencies in ruby blog in order to solve annoying warning of GitHub security alert. | @@ -7,18 +7,18 @@ GEM
websocket-driver (~> 0.6.1)
actionmailer (5.0.7.1)
actionpack (= 5.0.7.1)
- actionview (= 5.0.7.1)
+ actionview (>= 5.0.7.2)
activejob (= 5.0.7.1)
mail (~> 2.5, >= 2.5.4)
rails-dom-testing (~> 2.0)
actionpack (5.0.7.1)
- actionview (= 5.0.7.1)
+ actionview (>= 5.0.7.2)
activesupport (= 5.0.7.1)
rack (~> 2.0)
rack-test (~> 0.6.3)
rails-dom-testing (~> 2.0)
rails-html-sanitizer (~> 1.0, >= 1.0.2)
- actionview (5.0.7.1)
+ actionview (>= 5.0.7.2)
activesupport (= 5.0.7.1)
builder (~> 3.1)
erubis (~> 2.7.0)
@@ -89,7 +89,7 @@ GEM
actioncable (= 5.0.7.1)
actionmailer (= 5.0.7.1)
actionpack (= 5.0.7.1)
- actionview (= 5.0.7.1)
+ actionview (>= 5.0.7.2)
activejob (= 5.0.7.1)
activemodel (= 5.0.7.1)
activerecord (= 5.0.7.1)
|
Add bullet points to doc/note/hermeticity.md | @@ -55,12 +55,18 @@ asynchronous and complex.
For Wuffs, the compiler enforces [memory-safety](/doc/note/memory-safety.md)
(at compile time) and communication (a function call) is lightweight,
synchronous and simple. [Wuffs the Language](/doc/wuffs-the-language.md) is
-deliberately unpowerful: there are no global variables, no `unsafe` keyword, no
-FFI (Foreign Function Interface) or system call facility, no user-supplied
-callbacks, no allocation or de-allocation of memory and no panicking or
-throwing exceptions (including for out-of-memory). Wuffs is designed for
-writing hermetic, secure libraries, not complete programs, and **with less
-power comes easier proof of safety**.
+deliberately unpowerful. There are:
+
+- no global variables,
+- no `unsafe` keyword,
+- no FFI (Foreign Function Interface),
+- no user-supplied callbacks,
+- no system calls,
+- no allocation or de-allocation of memory and
+- no panicking or throwing exceptions (including for out-of-memory).
+
+Wuffs is designed for writing hermetic, secure libraries, not complete
+programs, and **with less power comes easier proof of safety**.
In comparison to compiling C/C++ code with WebAssembly (which can be restricted
to only compute), both Wuffs and Wasm allow for hermetic libraries within
|
BugID:16944965: Fix example/Config.in | @@ -12,7 +12,6 @@ choice
source "app/example/athostapp/Config.in"
source "app/example/blink/Config.in"
source "app/example/bluetooth/bleadv/Config.in"
-source "app/example/bluetooth/blemesh_cmds/Config.in"
source "app/example/bluetooth/blemesh_tmall/Config.in"
source "app/example/bluetooth/bleperipheral/Config.in"
source "app/example/bluetooth/breezeapp/Config.in"
@@ -24,15 +23,20 @@ source "app/example/dk/dk_ld/Config.in"
source "app/example/dk/dk_qr/Config.in"
source "app/example/helloworld/Config.in"
source "app/example/http2app/Config.in"
+source "app/example/id2_app/Config.in"
+source "app/example/itls_app/Config.in"
source "app/example/linkkit_gateway/Config.in"
source "app/example/linkkitapp/Config.in"
source "app/example/lorawan/linkwan/Config.in"
source "app/example/meshapp/Config.in"
+source "app/example/modbus_demo/Config.in"
source "app/example/mqttapp/Config.in"
source "app/example/otaapp/Config.in"
+source "app/example/prov_app/Config.in"
source "app/example/sk/sk_gui/Config.in"
source "app/example/tinyengine_app/Config.in"
source "app/example/tls/Config.in"
+source "app/example/uart/Config.in"
source "app/example/udataapp/Config.in"
source "app/example/yts/Config.in"
source "app/example/yts/publish/Config.in"
|
Just ignore unknown OBJ materials; | @@ -188,19 +188,19 @@ ModelData* lovrModelDataInitObj(ModelData* model, Blob* source) {
char name[128];
bool hasName = sscanf(data + 7, "%s\n%n", name, &lineLength);
int* material = map_get(&materialNames, name);
- lovrAssert(hasName && material, "Bad OBJ: Expected a material name");
+ lovrAssert(hasName, "Bad OBJ: Expected a material name");
// If the last group didn't have any faces, just reuse it, otherwise make a new group
objGroup* group = &vec_last(&groups);
if (group->count > 0) {
int start = group->start + group->count; // Don't put this in the compound literal (realloc)
vec_push(&groups, ((objGroup) {
- .material = *material,
+ .material = material ? *material : -1,
.start = start,
.count = 0
}));
} else {
- group->material = *material;
+ group->material = material ? *material : -1;
}
} else {
char* newline = memchr(data, '\n', length);
|
term: exclusive save cursor after explicit move
In other words, don't issue the ANSI escape sequence for saving the
cursor position at the start of a printf hijack sequence. Instead
trust this was already done when the cursor position was last changes
by a blit. | @@ -1519,12 +1519,10 @@ u3_term_io_hija(void)
c3_assert(!"hija-fcntl");
}
- // save cursor position,
// set scroll region to exclude the prompt,
// scroll up one line to make space,
// and move the cursor onto that space.
//
- _term_it_send_csi(uty_u, 's', 0);
_term_it_send_csi(uty_u, 'r', 2, 1, uty_u->tat_u.siz.row_l - 1);
_term_it_send_csi(uty_u, 'S', 1, 1);
_term_it_send_csi(uty_u, 'H', 2, uty_u->tat_u.siz.row_l - 1, 1);
|
osd: fix turtle_throttle_percent adjust | @@ -1371,8 +1371,8 @@ void osd_display() {
osd_menu_header("TURTLE MODE");
osd_menu_select(4, 5, "TURTLE THROTTLE %");
- if (osd_menu_select_float(22, 5, profile.motor.throttle_boost, 4, 1)) {
- profile.motor.throttle_boost = osd_menu_adjust_float(profile.motor.throttle_boost, 1, 0, 100);
+ if (osd_menu_select_float(22, 5, profile.motor.turtle_throttle_percent, 4, 1)) {
+ profile.motor.turtle_throttle_percent = osd_menu_adjust_float(profile.motor.turtle_throttle_percent, 1, 0, 100);
}
osd_menu_select_save_and_exit(4, 14);
|
refactor: use sway_abort instead | @@ -487,9 +487,11 @@ int main(int argc, char **argv) {
// pretty print the json
json_tokener *tok = json_tokener_new_ex(JSON_MAX_DEPTH);
if (tok == NULL) {
- sway_log(SWAY_ERROR, "failed allocating json_tokener");
- ret = 1;
- } else {
+ if (quiet) {
+ exit(EXIT_FAILURE);
+ }
+ sway_abort("failed allocating json_tokener");
+ }
json_object *obj = json_tokener_parse_ex(tok, resp, -1);
enum json_tokener_error err = json_tokener_get_error(tok);
json_tokener_free(tok);
@@ -513,7 +515,6 @@ int main(int argc, char **argv) {
}
json_object_put(obj);
}
- }
free(command);
free(resp);
@@ -531,9 +532,10 @@ int main(int argc, char **argv) {
json_tokener *tok = json_tokener_new_ex(JSON_MAX_DEPTH);
if (tok == NULL) {
- sway_log(SWAY_ERROR, "failed allocating json_tokener");
- ret = 1;
- break;
+ if (quiet) {
+ exit(EXIT_FAILURE);
+ }
+ sway_abort("failed allocating json_tokener");
}
json_object *obj = json_tokener_parse_ex(tok, reply->payload, -1);
enum json_tokener_error err = json_tokener_get_error(tok);
|
py/stream: Properly handle .readline(maxsize) for text strings.
For text strings, max size is given in characters, not bytes. As we actually
count bytes in the loop, we need to adjust counter by the size of current
utf-8 character in bytes. | +/*
+ * This file is part of the Pycopy project, https://github.com/pfalcon/pycopy
+ *
+ * The MIT License (MIT)
+ *
+ * Copyright (c) 2020 Paul Sokolovsky
+ *
+ * See below for the full license text.
+ */
/*
* This file is part of the MicroPython project, http://micropython.org/
*
* The MIT License (MIT)
*
* Copyright (c) 2014 Damien P. George
- * Copyright (c) 2014-2018 Paul Sokolovsky
+ * Copyright (c) 2014-2020 Paul Sokolovsky
*
* 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 "py/stream.h"
#include "py/runtime.h"
#include "py/binary.h"
+#include "py/unicode.h"
// This file defines generic Python stream read/write methods which
// dispatch to the underlying stream interface of an object.
@@ -475,6 +485,13 @@ STATIC mp_obj_t stream_unbuffered_readline(size_t n_args, const mp_obj_t *args)
if (*p == eol) {
break;
}
+ #if MICROPY_PY_BUILTINS_STR_UNICODE
+ // If we're reading from text stream, input max size is in chars,
+ // and we need to adjust max_size var for byte size of current char.
+ if (max_size != -1 && stream_p->is_text) {
+ max_size += utf8_get_size(*p) - 1;
+ }
+ #endif
}
return mp_obj_new_str_from_vstr(STREAM_CONTENT_TYPE(stream_p), &vstr);
|
Add section description and fix for strncpy | #define POSIX_OVERWRTIES_H
#ifdef _WIN32
+ /* POSIX names for functions */
#define fileno _fileno
#define unlink _unlink
#define strcasecmp _stricmp
#define strncasecmp strnicmp
#define strnicmp _strnicmp
+ /* Secure versions of functions */
+ #define strncpy(arg1,arg2,arg3) strncpy_s(arg1,arg3,arg2,arg3)
+
#endif /* _WIN32 */
#endif /* POSIX_OVERWRTIES_H */
|
do not apply storage attributes to member of struct | @@ -341,7 +341,7 @@ typedef struct
// Audio control interrupt buffer - no FIFO - 6 Bytes according to UAC 2 specification (p. 74)
#if CFG_TUD_AUDIO_INT_CTR_EPSIZE_IN
- CFG_TUSB_MEM_SECTION CFG_TUSB_MEM_ALIGN uint8_t ep_int_ctr_buf[CFG_TUD_AUDIO_INT_CTR_EP_IN_SW_BUFFER_SIZE];
+ uint8_t ep_int_ctr_buf[CFG_TUD_AUDIO_INT_CTR_EP_IN_SW_BUFFER_SIZE];
#endif
// Decoding parameters - parameters are set when alternate AS interface is set by host
|
yarac: Support defining float values | @@ -100,6 +100,38 @@ args_option_t options[] =
};
+int is_float(
+ const char *str)
+{
+ int has_dot = FALSE;
+
+ if (*str == '-') // skip the minus sign if present
+ str++;
+
+ if (*str == '.') // float can't start with a dot
+ return FALSE;
+
+ while(*str)
+ {
+ if (*str == '.')
+ {
+ if (has_dot) // two dots, not a float
+ return FALSE;
+
+ has_dot = TRUE;
+ }
+ else if (!isdigit(*str))
+ {
+ return FALSE;
+ }
+
+ str++;
+ }
+
+ return has_dot; // to be float must contain a dot
+}
+
+
int is_numeric(
const char *str)
{
@@ -157,7 +189,14 @@ int define_external_variables(
char* identifier = ext_vars[i];
char* value = equal_sign + 1;
- if (is_numeric(value))
+ if (is_float(value))
+ {
+ yr_compiler_define_float_variable(
+ compiler,
+ identifier,
+ atof(value));
+ }
+ else if (is_numeric(value))
{
yr_compiler_define_integer_variable(
compiler,
|
Added test only flag | @@ -171,7 +171,9 @@ static int test_path(const char *filename, int main_argc, char **main_argv) {
survive_simple_set_user(actx, &rctx);
SurviveContext *ctx = survive_simple_get_ctx(actx);
- for (int i = 0; i < NUM_GEN2_LIGHTHOUSES; i++) {
+ bool reset_lh = !survive_configi(ctx, "test-replay-dont-reset-lh", SC_GET, false);
+
+ for (int i = 0; i < NUM_GEN2_LIGHTHOUSES && reset_lh; i++) {
ctx->bsd[i].PositionSet = false;
}
@@ -181,12 +183,14 @@ static int test_path(const char *filename, int main_argc, char **main_argv) {
fprintf(stderr, "Ground truth LH poses:\n");
uint32_t ref_lh = 0;
+
for (int i = 0; i < ctx->activeLighthouses; i++) {
SurvivePose pose = ctx->bsd[i].Pose;
originalLH[i] = pose;
originalHasOOTX[i] = ctx->bsd[i].OOTXSet;
originalHasPosition[i] = ctx->bsd[i].PositionSet;
+ if (reset_lh) {
ctx->bsd[i].PositionSet = 0;
ctx->bsd[i].Pose = LinmathPose_Identity;
fprintf(stderr, " LH%2d (%08x): " SurvivePose_format "\n", i, ctx->bsd[i].BaseStationID, pose.Pos[0],
@@ -195,6 +199,7 @@ static int test_path(const char *filename, int main_argc, char **main_argv) {
ref_lh = ctx->bsd[i].BaseStationID;
}
}
+ }
SV_INFO("Setting %08x as reference base station", ref_lh);
survive_configi(ctx, "reference-basestation", SC_SET, ref_lh);
|
chmod /home/travis
This is necessary, so that non `travis` users in `t/90root-fastcgi-php.t`
can access /home/travis/build/h2o/h2o/t/assets/doc_root/hello.php | @@ -76,6 +76,7 @@ matrix:
script:
- CC=clang-4.0 CXX=clang++-4.0 cmake -DBUILD_FUZZER=ON -DWITH_MRUBY=ON .
- make all
+ - sudo chmod 775 /home/travis
- make check
- sudo make check-as-root
- ./h2o-fuzzer-http1 -close_fd_mask=3 -runs=1 -max_len=$((16 * 1024 )) fuzz/http1-corpus < /dev/null
|
SSL_get_current_cipher() and SSL_get_pending_cipher() return 'const SSL_CIPHER *'
Fix the documentation.
CLA: trivial | @@ -10,8 +10,8 @@ SSL_get_pending_cipher - get SSL_CIPHER of a connection
#include <openssl/ssl.h>
- SSL_CIPHER *SSL_get_current_cipher(const SSL *ssl);
- SSL_CIPHER *SSL_get_pending_cipher(const SSL *ssl);
+ const SSL_CIPHER *SSL_get_current_cipher(const SSL *ssl);
+ const SSL_CIPHER *SSL_get_pending_cipher(const SSL *ssl);
const char *SSL_get_cipher_name(const SSL *s);
const char *SSL_get_cipher(const SSL *s);
|
clay: refuse %cs subs scry unless at now | :: +read-s: produce miscellaneous
::
++ read-s
- |= [yon=aeon pax=path]
+ |= [yon=aeon pax=path =case]
^- (unit (unit cage))
?: ?=([%subs ~] pax)
+ ?. =([%da now] case) ~
=| sus=(set ship)
=/ doj=(unit dojo) (~(get by dos.rom) syd)
?~ doj
%f (read-f yon path.mun)
%p [(read-p path.mun) ..park]
%r (read-r yon path.mun)
- %s [(read-s yon path.mun) ..park]
+ %s [(read-s yon path.mun case.mun) ..park]
%t [(read-t yon path.mun) ..park]
%u [(read-u yon path.mun) ..park]
%v [(read-v yon path.mun) ..park]
|
pbio/test: fix boost motor speed | @@ -758,7 +758,7 @@ PT_THREAD(test_boost_interactive_motor(struct pt *pt)) {
tt_want_int_op(count, ==, -1);
tt_want_uint_op(pbdrv_counter_get_abs_count(counter, &count), ==, PBIO_ERROR_NOT_SUPPORTED);
tt_want_uint_op(pbdrv_counter_get_rate(counter, &count), ==, PBIO_SUCCESS);
- tt_want_int_op(count, ==, -1500);
+ tt_want_int_op(count, ==, -1400);
// should be synced now are receive regular pings
static int i;
|
Align function parameter names for mbedtls_set_key_owner_id in PSA headers
static function mbedtls_set_key_owner() is declared in psa/crypto.h
and defined in psa/crypto_struct.h with different parameter name for
the mbedtls_key_owner_id_t parameter and that may trigger errors
from static code analysis tool as cppcheck. | @@ -153,10 +153,10 @@ static void psa_set_key_id( psa_key_attributes_t *attributes,
* the owner of a key.
*
* \param[out] attributes The attribute structure to write to.
- * \param owner_id The key owner identifier.
+ * \param owner The key owner identifier.
*/
static void mbedtls_set_key_owner_id( psa_key_attributes_t *attributes,
- mbedtls_key_owner_id_t owner_id );
+ mbedtls_key_owner_id_t owner );
#endif
/** Set the location of a persistent key.
|
Use non-secure display for Android 12 preview
Android 12 preview identifies as Android 11, but its codename is "S".
Refs <https://github.com/Genymobile/scrcpy/issues/2129> | @@ -226,8 +226,10 @@ public class ScreenEncoder implements Device.RotationListener {
}
private static IBinder createDisplay() {
- // Since Android 12, secure displays could not be created with shell permissions anymore
- boolean secure = Build.VERSION.SDK_INT <= Build.VERSION_CODES.R;
+ // Since Android 12 (preview), secure displays could not be created with shell permissions anymore.
+ // On Android 12 preview, SDK_INT is still R (not S), but CODENAME is "S".
+ boolean secure = Build.VERSION.SDK_INT < Build.VERSION_CODES.R || (Build.VERSION.SDK_INT == Build.VERSION_CODES.R && !"S"
+ .equals(Build.VERSION.CODENAME));
return SurfaceControl.createDisplay("scrcpy", secure);
}
|
adapt debug putput for CUDA | @@ -575,7 +575,7 @@ void optimized_nop(unsigned int N, unsigned int io, unsigned int D, const long d
nstr2[i] = *nstr1[i] + skip;
#ifdef USE_CUDA
- debug_printf(DP_DEBUG3, "This is a %s call\n.", use_gpu(N, nptr1) ? "gpu" : "cpu");
+ debug_printf(DP_DEBUG4, "This is a %s call\n.", use_gpu(N, nptr1) ? "gpu" : "cpu");
struct nary_opt_data_s data = { md_calc_size(skip, tdims), use_gpu(N, nptr1) ? &gpu_ops : &cpu_ops, data_ptr };
#else
|
QUIC Front End I/O API: Correct implementation of SSL_tick, SSL_get_tick_timeout | @@ -7049,9 +7049,17 @@ int SSL_tick(SSL *s)
sc = SSL_CONNECTION_FROM_SSL_ONLY(s);
if (sc != NULL && SSL_CONNECTION_IS_DTLS(sc))
- return DTLSv1_handle_timeout(s);
+ /*
+ * DTLSv1_handle_timeout returns 0 if the timer wasn't expired yet,
+ * which we consider a success case. Theoretically DTLSv1_handle_timeout
+ * can also return 0 if s is NULL or not a DTLS object, but we've
+ * already ruled out those possibilities above, so this is not possible
+ * here. Thus the only failure cases are where DTLSv1_handle_timeout
+ * returns -1.
+ */
+ return DTLSv1_handle_timeout(s) >= 0;
- return 0;
+ return 1;
}
int SSL_get_tick_timeout(SSL *s, struct timeval *tv)
@@ -7066,17 +7074,15 @@ int SSL_get_tick_timeout(SSL *s, struct timeval *tv)
#endif
sc = SSL_CONNECTION_FROM_SSL_ONLY(s);
- if (sc != NULL && SSL_CONNECTION_IS_DTLS(sc)) {
- if (!DTLSv1_get_timeout(s, tv)) {
+ if (sc != NULL && SSL_CONNECTION_IS_DTLS(sc)
+ && DTLSv1_get_timeout(s, tv))
+ return 1;
+
tv->tv_sec = -1;
tv->tv_usec = 0;
- }
return 1;
}
- return 0;
-}
-
int SSL_get_rpoll_descriptor(SSL *s, BIO_POLL_DESCRIPTOR *desc)
{
#ifndef OPENSSL_NO_QUIC
|
Makefile: Remove -L/usr/include as we shouldn't override system settings | @@ -43,7 +43,7 @@ ifeq ($(OS),Linux)
-Wextra -Wno-override-init \
-funroll-loops \
-D_FILE_OFFSET_BITS=64
- ARCH_LDFLAGS := -L/usr/local/include -L/usr/include \
+ ARCH_LDFLAGS := -L/usr/local/include \
-lpthread -lunwind-ptrace -lunwind-generic -lbfd -lopcodes -lrt -ldl
ARCH_SRCS := $(sort $(wildcard linux/*.c))
|
Subsets and Splits
No saved queries yet
Save your SQL queries to embed, download, and access them later. Queries will appear here once saved.