message
stringlengths 6
474
| diff
stringlengths 8
5.22k
|
---|---|
Makefile: disable KCONFIG_FILE when build from xml
The SCENARIO xml file already includes all information of KCONFIG file,
use KCONFIG_FILE/SCENARIO_FILE parameter at same time would introduce
conflict so this case should be invalid. | @@ -13,7 +13,6 @@ TARGET_DIR ?=
# 2. make <target> KCONFIG_FILE=xxx [TARGET_DIR=xxx]
# 3. make <target> BOARD=xxx SCENARIO=xxx [TARGET_DIR=xxx]
# 4. make <target> BOARD_FILE=xxx SCENARIO_FILE=xxx [TARGET_DIR=xxx]
-# 5. make <target> KCONFIG_FILE=xxx BOARD_FILE=xxx SCENARIO_FILE=xxx [TARGET_DIR=xxx]
#
# Especially for case 1 that no any parameters are specified:
# a. If hypervisor/build/.config file which generated by "make menuconfig" exist,
@@ -25,7 +24,7 @@ TARGET_DIR ?=
# i.e. equal: make <target> BOARD=$(BOARD) SCENARIO=$(SCENARIO)
#
# For case 2/3, configurations are imported from TARGET_DIR when TARGET_DIR is specified;
-# For case 4/5, configurations are from XML files and saved to TARGET_DIR if it is specified;
+# For case 4, configurations are from XML files and saved to TARGET_DIR if it is specified;
#
# The grep process did not handle corner case when '#' is manually put right after config value as comments,
# i.e. it will be failed in the case of "CONFIG_XXX=y # some comments here "
@@ -67,7 +66,11 @@ endif
ifeq ($(KCONFIG_FILE), $(wildcard $(KCONFIG_FILE)))
ifneq ($(BOARD)$(SCENARIO),)
- $(error BOARD/SCENARIO parameter could not coexist with KCONFIG_FILE)
+ $(error BOARD/SCENARIO parameter could not coexist with Kconfig file: $(KCONFIG_FILE))
+ endif
+
+ ifneq ($(BOARD_FILE)$(SCENARIO_FILE),)
+ $(error BOARD_FILE/SCENARIO_FILE parameter could not coexist with Kconfig file: $(KCONFIG_FILE))
endif
BOARD_IN_KCONFIG := $(shell grep CONFIG_BOARD= $(KCONFIG_FILE) | grep -v '\#' | awk -F '"' '{print $$2}')
@@ -169,6 +172,8 @@ hypervisor:
fi
#endif
@echo -e "\n\033[47;30mACRN Configuration Summary:\033[0m \nBOARD = $(BOARD)\t SCENARIO = $(SCENARIO)" > $(HV_CFG_LOG); \
+ echo -e "BUILD type = \c" >> $(HV_CFG_LOG); \
+ if [ "$(RELEASE)" = "0" ]; then echo -e "DEBUG" >> $(HV_CFG_LOG); else echo -e "RELEASE" >> $(HV_CFG_LOG); fi; \
if [ -f $(KCONFIG_FILE) ]; then \
echo -e "Hypervisor configuration is based on:\n\tKconfig file:\t$(KCONFIG_FILE);" >> $(HV_CFG_LOG); \
fi; \
|
move more select() to pselect() | @@ -5786,7 +5786,7 @@ return;
static inline void process_server()
{
static fd_set readfds;
-static struct timeval tvfd;
+static struct timespec tsfd;
static int fdnum;
static int msglen;
static uint32_t statuscount;
@@ -5799,8 +5799,8 @@ timestamp = timestampstart;
wantstopflag = false;
signal(SIGINT, programmende);
statuscount = 1;
-tvfd.tv_sec = 1;
-tvfd.tv_usec = 0;
+tsfd.tv_sec = 1;
+tsfd.tv_nsec = 0;
while(1)
{
if(gpiobutton > 0)
@@ -5816,7 +5816,7 @@ while(1)
}
FD_ZERO(&readfds);
FD_SET(fd_socket_mccli, &readfds);
- fdnum = select(fd_socket_mccli +1, &readfds, NULL, NULL, &tvfd);
+ fdnum = pselect(fd_socket_mccli +1, &readfds, NULL, NULL, &tsfd, NULL);
if(fdnum < 0)
{
errorcount++;
@@ -5845,8 +5845,6 @@ while(1)
}
}
statuscount++;
- tvfd.tv_sec = 1;
- tvfd.tv_usec = 0;
}
}
return;
|
Avoid _mm_bslli_si128 for VS2015 compat (method 2) | @@ -1166,9 +1166,9 @@ ASTCENC_SIMD_INLINE vint4 vtable_8bt_32bi(vint4 t0, vint4 t1, vint4 t2, vint4 t3
ASTCENC_SIMD_INLINE vint4 interleave_rgba8(vint4 r, vint4 g, vint4 b, vint4 a)
{
__m128i value = r.m;
- value = _mm_add_epi32(value, _mm_bslli_si128(g.m, 1));
- value = _mm_add_epi32(value, _mm_bslli_si128(b.m, 2));
- value = _mm_add_epi32(value, _mm_bslli_si128(a.m, 3));
+ value = _mm_add_epi32(value, _mm_slli_epi32(g.m, 8));
+ value = _mm_add_epi32(value, _mm_slli_epi32(b.m, 16));
+ value = _mm_add_epi32(value, _mm_slli_epi32(a.m, 24));
return vint4(value);
}
|
Fix libcanard github download link to get it compiling correctly | @@ -20,7 +20,7 @@ config LIBCANARD_URL
config LIBCANARD_VERSION
string "libcanard Version"
- default "e4a1d52be862b03e5872add75890e67bf1d9187c"
+ default "5ad65c6a4efda60cda7a8f0512da0f465822bbb8"
---help---
libcanard version.
|
Run zig fmt on demo code to ensure consistency | @@ -8,8 +8,7 @@ const TICGuy = struct {
var t: u16 = 0;
var mascot: TICGuy = .{};
-export fn BOOT() void {
-}
+export fn BOOT() void {}
export fn TIC() void {
if (tic.btn(0)) {
@@ -31,4 +30,3 @@ export fn TIC() void {
t += 1;
}
-
|
[RAFT] fix logging for work of blockfactory | @@ -70,7 +70,7 @@ func (work *Work) GetTimeout() time.Duration {
}
func (work *Work) ToString() string {
- return fmt.Sprintf("bestblock=%s", work.BlockID())
+ return fmt.Sprintf("bestblock=%s, no=%d, term=%d", work.BlockID(), work.BlockNo(), work.term)
}
type leaderReady struct {
@@ -246,7 +246,10 @@ func (bf *BlockFactory) QueueJob(now time.Time, jq chan<- interface{}) {
}
bf.prevBlock = b
- jq <- &Work{Block: b, term: term}
+ work := &Work{Block: b, term: term}
+
+ logger.Debug().Str("work", work.ToString()).Msg("new work generated")
+ jq <- work
}
}
@@ -365,7 +368,7 @@ func (bf *BlockFactory) controller() {
case info := <-bf.jobQueue:
work := info.(*Work)
- logger.Debug().Msgf("received work: %s",
+ logger.Debug().Msgf("received work: %s(%p)",
log.DoLazyEval(func() string { return work.ToString() }))
err := beginBlock(work)
@@ -475,7 +478,10 @@ func (bf *BlockFactory) generateBlock(work *Work) (*types.Block, *state.BlockSta
}
if b, _ := bf.GetBestBlock(); b != nil && bestBlock.BlockNo() != b.BlockNo() {
- logger.Debug().Msg("cancel because best block changed")
+ logger.Debug().Uint64("best", b.BlockNo()).Msg("cancel because best block changed")
+ if StopDupCommit {
+ logger.Fatal().Str("work", work.ToString()).Msg("work duplicate")
+ }
return true
}
|
README: update Compiler Explorer links | @@ -51,7 +51,7 @@ implementations using one (or more) of the following:
For an example of a project using SIMDe, see
[LZSSE-SIMDe](https://github.com/nemequ/LZSSE-SIMDe).
-You can [try SIMDe online](https://godbolt.org/z/xkT8MA) using Compiler
+You can [try SIMDe online](simde.netlify.com/godbolt/demo) using Compiler
Explorer and an amalgamated SIMDe header.
If you have any questions, please feel free to use the
|
Disable COLLADA importer; | @@ -60,7 +60,6 @@ set(ASSIMP_BUILD_ASSIMP_TOOLS OFF CACHE BOOL "")
set(ASSIMP_BUILD_TESTS OFF CACHE BOOL "")
set(ASSIMP_NO_EXPORT ON CACHE BOOL "")
set(ASSIMP_BUILD_ALL_IMPORTERS_BY_DEFAULT OFF CACHE BOOL "")
-set(ASSIMP_BUILD_COLLADA_IMPORTER ON CACHE BOOL "")
set(ASSIMP_BUILD_FBX_IMPORTER ON CACHE BOOL "")
set(ASSIMP_BUILD_GLTF_IMPORTER ON CACHE BOOL "")
set(ASSIMP_BUILD_OBJ_IMPORTER ON CACHE BOOL "")
|
Better types in plugin interface | @@ -72,9 +72,9 @@ typedef struct ethPluginInitContract_t {
ethPluginSharedRW_t *pluginSharedRW;
ethPluginSharedRO_t *pluginSharedRO;
uint8_t *pluginContext;
- uint32_t pluginContextLength;
+ size_t pluginContextLength;
uint8_t *selector; // 4 bytes selector
- uint32_t dataSize;
+ size_t dataSize;
char *alias; // 29 bytes alias if ETH_PLUGIN_RESULT_OK_ALIAS set
@@ -144,9 +144,9 @@ typedef struct ethQueryContractID_t {
uint8_t *pluginContext;
char *name;
- uint32_t nameLength;
+ size_t nameLength;
char *version;
- uint32_t versionLength;
+ size_t versionLength;
uint8_t result;
@@ -160,9 +160,9 @@ typedef struct ethQueryContractUI_t {
uint8_t *pluginContext;
uint8_t screenIndex;
char *title;
- uint32_t titleLength;
+ size_t titleLength;
char *msg;
- uint32_t msgLength;
+ size_t msgLength;
uint8_t result;
|
Build: Add console libraries to components | PLATFORM_NAME = OcSupportPkg
PLATFORM_GUID = C9F9C1B2-67ED-4496-97B6-3B24F083A2E6
PLATFORM_VERSION = 1.0
- SUPPORTED_ARCHITECTURES = X64
+ SUPPORTED_ARCHITECTURES = X64|IA32
BUILD_TARGETS = RELEASE|DEBUG|NOOPT
SKUID_IDENTIFIER = DEFAULT
DSC_SPECIFICATION = 0x00010006
OcAppleUserInterfaceThemeLib|OcSupportPkg/Library/OcAppleUserInterfaceThemeLib/OcAppleUserInterfaceThemeLib.inf
OcBootManagementLib|OcSupportPkg/Library/OcBootManagementLib/OcBootManagementLib.inf
OcConsoleLib|OcSupportPkg/Library/OcConsoleLib/OcConsoleLib.inf
+ OcConsoleControlEntryModeLib|OcSupportPkg/Library/OcConsoleControlEntryModeLib/OcConsoleControlEntryModeLib.inf
OcCpuLib|OcSupportPkg/Library/OcCpuLib/OcCpuLib.inf
OcCryptoLib|OcSupportPkg/Library/OcCryptoLib/OcCryptoLib.inf
OcCompressionLib|OcSupportPkg/Library/OcCompressionLib/OcCompressionLib.inf
OcSupportPkg/Library/OcAppleUserInterfaceThemeLib/OcAppleUserInterfaceThemeLib.inf
OcSupportPkg/Library/OcBootManagementLib/OcBootManagementLib.inf
OcSupportPkg/Library/OcConfigurationLib/OcConfigurationLib.inf
+ OcSupportPkg/Library/OcConsoleLib/OcConsoleLib.inf
+ OcSupportPkg/Library/OcConsoleControlEntryModeLib/OcConsoleControlEntryModeLib.inf
OcSupportPkg/Library/OcCpuLib/OcCpuLib.inf
OcSupportPkg/Library/OcCryptoLib/OcCryptoLib.inf
OcSupportPkg/Library/OcCompressionLib/OcCompressionLib.inf
|
Add more info to quicktest | @@ -73,6 +73,9 @@ LimeSDRTest* LimeSDRTest::Connect()
{
std::string str = "->Device: ";
str += handles[0].serialize();
+ str += ", HW=" + std::string(info->hardwareVersion);
+ str += ", GW=" + std::string(info->gatewareVersion);
+
UpdateStatus(LMS_TEST_INFO, str.c_str());
if (str.find("USB 3") == std::string::npos)
{
@@ -80,6 +83,9 @@ LimeSDRTest* LimeSDRTest::Connect()
UpdateStatus(LMS_TEST_INFO, str.c_str());
}
UpdateStatus(LMS_TEST_LOGFILE, handles[0].serial.c_str());
+
+ str = "Chip temperature: " + std::to_string(int(dev->GetChipTemperature())) + " C";
+ UpdateStatus(LMS_TEST_INFO, str.c_str());
}
if (strstr(info->deviceName, lime::GetDeviceName(lime::LMS_DEV_LIMESDR)))
|
Badger2040: Remove button release wait from clear. | @@ -14,10 +14,6 @@ namespace {
gpio_put(pimoroni::Badger2040::ENABLE_3V3, 1);
}
- bool get_current() {
- return gpio_get_all() & (0x1f << pimoroni::Badger2040::DOWN);
- }
-
bool any() const {
return state > 0;
}
@@ -285,11 +281,6 @@ mp_obj_t Badger2040_pressed_to_wake2(mp_obj_t self_in, mp_obj_t button) {
mp_obj_t Badger2040_clear_pressed_to_wake() {
button_wake_state.clear();
- while(button_wake_state.get_current()) {
-#ifdef MICROPY_EVENT_POLL_HOOK
-MICROPY_EVENT_POLL_HOOK
-#endif
- }
return mp_const_none;
}
|
change log for collecting txs in consensus to Info level | @@ -124,7 +124,7 @@ func GatherTXs(hs component.ICompSyncRequester, bState *state.BlockState, txOp T
if logger.IsDebugEnabled() {
defer func() {
- logger.Debug().
+ logger.Info().
Int("candidates", nCand).
Int("collected", nCollected).
Msg("transactions collected")
|
switch to git branch | @@ -18,7 +18,7 @@ search () {
echo "Running check on submodule $submodule in $dir"
hash=$(echo "$status" | grep $submodule | awk '{print$1}' | grep -o "[[:alnum:]]*")
echo "Searching for $hash in origin/master of $submodule"
- git -C $dir/$submodule log origin/master | grep "$hash" # needs init'ed submodules
+ git -C $dir/$submodule branch -r --contains "$hash" | grep "origin/master" # needs init'ed submodules
done
}
|
Simplify codegen output for union flags when only a single flag is set | @@ -229,6 +229,9 @@ const unionFlags = (flags: string[], defaultValue = "0") => {
if (flags.length === 0) {
return defaultValue;
}
+ if (flags.length === 1) {
+ return flags[0];
+ }
return `^/(${flags.join(" | ")})/`;
};
|
WriteOutput(): give proper length to cUnit[]. | @@ -1630,7 +1630,7 @@ void WriteOutput(BODY *body,CONTROL *control,FILES *files,OUTPUT *output,SYSTEM
int iBody,iCol,iOut,iSubOut,iExtra=0,iGrid,iLat,jBody,j;
double dCol[NUMOPT],*dTmp,dGrid[NUMOPT];
FILE *fp;
- char cUnit[OPTLEN], cPoiseGrid[NAMELEN], cLaplaceFunc[NAMELEN];
+ char cUnit[OPTDESCR], cPoiseGrid[NAMELEN], cLaplaceFunc[NAMELEN];
/* Write out all data columns for each body. As some data may span more than
1 column, we search the input list sequentially, adding iExtra to the
|
Adjust demo http project file to fulfill v1.4.6 | <FileName>aws_dev_mode_key_provisioning.c</FileName>
<FileType>1</FileType>
<FilePath>..\..\..\common\devmode_key_provisioning\aws_dev_mode_key_provisioning.c</FilePath>
- <FileOption>
- <CommonProperty>
- <UseCPPCompiler>2</UseCPPCompiler>
- <RVCTCodeConst>0</RVCTCodeConst>
- <RVCTZI>0</RVCTZI>
- <RVCTOtherData>0</RVCTOtherData>
- <ModuleSelection>0</ModuleSelection>
- <IncludeInBuild>0</IncludeInBuild>
- <AlwaysBuild>2</AlwaysBuild>
- <GenerateAssemblyFile>2</GenerateAssemblyFile>
- <AssembleAssemblyFile>2</AssembleAssemblyFile>
- <PublicsOnly>2</PublicsOnly>
- <StopOnExitCode>11</StopOnExitCode>
- <CustomArgument></CustomArgument>
- <IncludeLibraryModules></IncludeLibraryModules>
- <ComprImg>1</ComprImg>
- </CommonProperty>
- <FileArmAds>
- <Cads>
- <interw>2</interw>
- <Optim>0</Optim>
- <oTime>2</oTime>
- <SplitLS>2</SplitLS>
- <OneElfS>2</OneElfS>
- <Strict>2</Strict>
- <EnumInt>2</EnumInt>
- <PlainCh>2</PlainCh>
- <Ropi>2</Ropi>
- <Rwpi>2</Rwpi>
- <wLevel>0</wLevel>
- <uThumb>2</uThumb>
- <uSurpInc>2</uSurpInc>
- <uC99>2</uC99>
- <useXO>2</useXO>
- <v6Lang>0</v6Lang>
- <v6LangP>0</v6LangP>
- <vShortEn>2</vShortEn>
- <vShortWch>2</vShortWch>
- <v6Lto>2</v6Lto>
- <v6WtE>2</v6WtE>
- <v6Rtti>2</v6Rtti>
- <VariousControls>
- <MiscControls></MiscControls>
- <Define></Define>
- <Undefine></Undefine>
- <IncludePath></IncludePath>
- </VariousControls>
- </Cads>
- </FileArmAds>
- </FileOption>
</File>
</Files>
</Group>
<FileType>1</FileType>
<FilePath>..\..\..\..\lib\third_party\mbedtls\library\xtea.c</FilePath>
</File>
+ <File>
+ <FileName>platform_util.c</FileName>
+ <FileType>1</FileType>
+ <FilePath>..\..\..\..\lib\third_party\mbedtls\library\platform_util.c</FilePath>
+ </File>
</Files>
</Group>
<Group>
|
Fix incorrect placement of pfree() in pg_relation_check_pages()
This would cause the function to crash when more than one page is
considered as broken and reported in the SRF.
Reported-by: Noriyoshi Shinoda
Discussion: | @@ -220,9 +220,9 @@ check_relation_fork(TupleDesc tupdesc, Tuplestorestate *tupstore,
/* Save the corrupted blocks in the tuplestore. */
tuplestore_putvalues(tupstore, tupdesc, values, nulls);
+ }
pfree(path);
- }
/* Pop the error context stack */
error_context_stack = errcallback.previous;
|
Large messages seem to work reliably; needs fuzz. | =^ gim ..weft wisp
:_ +>.$
^- (list rock)
- =+ wit=(met ?:(fak.ton 16 13) q.gim)
+ =+ wit=(met 13 q.gim)
?< =(0 wit)
?: =(1 wit)
=+ yup=(spit [our her] p.gim q.gim)
[yup ~]
- =+ ruv=(rip ?:(fak.ton 16 13) q.gim)
+ =+ ruv=(rip 13 q.gim)
=+ inx=0
|- ^- (list rock)
?~ ruv ~
|
Return nil for JSON and add todo comments | @@ -51,7 +51,9 @@ static Value parseJson(VM *vm, json_value *json) {
switch (json->type) {
case json_none:
case json_null: {
- return EMPTY_VAL;
+ // TODO: We return nil on failure however "null" is valid JSON
+ // TODO: We need a better way of handling this scenario
+ return NIL_VAL;
}
case json_object: {
|
tools/mpy-tool.py: Adjust use of super() to make it work with Python 2.
Fixes the regression introduced in | @@ -259,7 +259,7 @@ def extract_prelude(bytecode, ip):
class MPFunTable:
pass
-class RawCode:
+class RawCode(object):
# a set of all escaped names, to make sure they are unique
escaped_names = set()
@@ -423,7 +423,7 @@ class RawCode:
class RawCodeBytecode(RawCode):
def __init__(self, bytecode, qstrs, objs, raw_codes):
- super().__init__(MP_CODE_BYTECODE, bytecode, 0, qstrs, objs, raw_codes)
+ super(RawCodeBytecode, self).__init__(MP_CODE_BYTECODE, bytecode, 0, qstrs, objs, raw_codes)
def freeze(self, parent_name):
self.freeze_children(parent_name)
@@ -462,7 +462,7 @@ class RawCodeBytecode(RawCode):
class RawCodeNative(RawCode):
def __init__(self, code_kind, fun_data, prelude_offset, prelude, qstr_links, qstrs, objs, raw_codes, type_sig):
- super().__init__(code_kind, fun_data, prelude_offset, qstrs, objs, raw_codes)
+ super(RawCodeNative, self).__init__(code_kind, fun_data, prelude_offset, qstrs, objs, raw_codes)
self.prelude = prelude
self.qstr_links = qstr_links
self.type_sig = type_sig
|
Modify comment error
Device file system should be registered | @@ -326,7 +326,7 @@ static const struct dfs_filesystem_ops _device_fs =
int devfs_init(void)
{
- /* register rom file system */
+ /* register device file system */
dfs_register(&_device_fs);
return 0;
|
travis CHANGE add missing pcre2 dependency for OS X build | @@ -85,5 +85,6 @@ jobs:
- tar -xf cmocka-1.1.2.tar.xz
- cd cmocka-1.1.2; mkdir build; cd build; cmake .. && make -j2 && sudo make install; cd ../..
- brew update
+ - brew install pcre2
script:
- mkdir build && cd build; cmake -DENABLE_VALGRIND_TESTS=OFF .. && make -j2 && ctest --output-on-failure; cd -
|
zephyr/test/hooks/hooks.c: Format with clang-format
BRANCH=none
TEST=none | @@ -201,9 +201,7 @@ static void test_hook_ap_power_events(void)
void test_main(void)
{
- ztest_test_suite(
- hooks_tests,
- ztest_unit_test(test_hook_list_multiple),
+ ztest_test_suite(hooks_tests, ztest_unit_test(test_hook_list_multiple),
ztest_unit_test(test_hook_list_single),
ztest_unit_test(test_hook_list_empty),
ztest_unit_test(test_deferred_func),
|
Solve minor bug in serial test. | @@ -106,8 +106,8 @@ TEST_F(serial_test, DefaultConstructor)
static const value value_map[] =
{
- value_create_array(value_map_a, sizeof(value_map_a)),
- value_create_array(value_map_b, sizeof(value_map_b))
+ value_create_array(value_map_a, sizeof(value_map_a) / sizeof(value_map_a[0])),
+ value_create_array(value_map_b, sizeof(value_map_b) / sizeof(value_map_b[0]))
};
static const size_t value_list_size = sizeof(value_list) / sizeof(value_list[0]);
@@ -342,7 +342,7 @@ TEST_F(serial_test, DefaultConstructor)
static const value value_map[] =
{
value_create_array(value_map_tupla_a, sizeof(value_map_tupla_a) / sizeof(value_map_tupla_a[0])),
- value_create_array(value_map_tupla_b, sizeof(value_map_tupla_b) / sizeof(value_map_tupla_b[0])),
+ value_create_array(value_map_tupla_b, sizeof(value_map_tupla_b) / sizeof(value_map_tupla_b[0]))
};
static const size_t value_map_size = sizeof(value_map) / sizeof(value_map[0]);
|
Remove lane selects from compute_ideal_weights
No longer needed as arrays are padded with safe values | @@ -826,14 +826,8 @@ void compute_ideal_weights_for_decimation(
for (unsigned int j = 0; j < max_texel_count; j++)
{
- // Not all lanes may actually use j texels, so mask out if idle
- vmask active = weight_texel_count > vint(j);
-
vint texel(di.weight_texel[j] + i);
- texel = select(vint::zero(), texel, active);
-
vfloat weight = loada(di.weights_flt[j] + i);
- weight = select(vfloat::zero(), weight, active);
if (!constant_wes)
{
@@ -880,14 +874,8 @@ void compute_ideal_weights_for_decimation(
for (unsigned int j = 0; j < max_texel_count; j++)
{
- // Not all lanes may actually use j texels, so mask out if idle
- vmask active = weight_texel_count > vint(j);
-
vint texel(di.weight_texel[j] + i);
- texel = select(vint::zero(), texel, active);
-
vfloat contrib_weight = loada(di.weights_flt[j] + i);
- contrib_weight = select(vfloat::zero(), contrib_weight, active);
if (!constant_wes)
{
@@ -902,7 +890,6 @@ void compute_ideal_weights_for_decimation(
error_change1 += (old_weight - ideal_weight) * scale;
}
-
vfloat step = (error_change1 * chd_scale) / error_change0;
step = clamp(-stepsize, stepsize, step);
|
hssi: fix issue identified by checkers | @@ -246,8 +246,11 @@ public:
"/fpga_region/region*/dfl-fme.*/dfl-fme.*.*/net/*";
glob_t gl;
- if (glob(oss.str().c_str(), 0, nullptr, &gl))
+ if (glob(oss.str().c_str(), 0, nullptr, &gl)) {
+ if (gl.gl_pathv)
+ globfree(&gl);
return std::string("");
+ }
if (gl.gl_pathc > 1)
std::cerr << "Warning: more than one ethernet interface found." << std::endl;
|
Correct usage message for genesis init | @@ -22,7 +22,7 @@ var initGenesis = &cobra.Command{
Short: "Create genesis block based on input json file",
Run: func(cmd *cobra.Command, args []string) {
if len(args) != 1 {
- fmt.Fprintln(os.Stderr, "Usage: aergosvr init {genesis.json} --data {target directory}")
+ fmt.Fprintln(os.Stderr, "Usage: aergosvr init {genesis.json} --dir {target directory}")
return
}
jsonpath := args[0]
|
VarDiff cleanup | @@ -74,15 +74,13 @@ namespace MiningCore.VarDiff
// add penalty for missing shares
if (tsRelative.Count < desiredShares - 1)
- avg += options.TargetTime * 0.5 * ((double)tsRelative.Count / (desiredShares - 1));
+ avg += options.TargetTime * 0.5 * (tsRelative.Count / (desiredShares - 1));
// re-target if outside bounds
if (avg < tMin || avg > tMax)
{
var change = options.TargetTime / avg;
newDiff = difficulty * change;
-
- Debug.WriteLine(newDiff.Value);
}
// store
@@ -107,10 +105,6 @@ namespace MiningCore.VarDiff
newDiff = maxDiff;
}
- if (newDiff.HasValue && (newDiff.Value < 0.00001 || double.IsNegativeInfinity(newDiff.Value) ||
- double.IsPositiveInfinity(newDiff.Value)))
- ;
-
return newDiff;
}
}
|
RemoteContent: remove crossOrigin attribute if CORS unsupported | @@ -23,6 +23,7 @@ interface RemoteContentProps {
interface RemoteContentState {
unfold: boolean;
embed: any | undefined;
+ noCors: boolean;
}
const IMAGE_REGEX = new RegExp(/(jpg|img|png|gif|tiff|jpeg|webp|webm|svg)$/i);
@@ -36,11 +37,13 @@ class RemoteContent extends PureComponent<RemoteContentProps, RemoteContentState
super(props);
this.state = {
unfold: props.unfold || false,
- embed: undefined
+ embed: undefined,
+ noCors: false
};
this.unfoldEmbed = this.unfoldEmbed.bind(this);
this.loadOembed = this.loadOembed.bind(this);
this.wrapInLink = this.wrapInLink.bind(this);
+ this.onError = this.onError.bind(this);
}
componentWillUnmount() {
@@ -87,6 +90,10 @@ return;
</BaseAnchor>);
}
+ onError(e: Event) {
+ this.setState({ noCors: true });
+ }
+
render() {
const {
remoteContentPolicy,
@@ -103,6 +110,7 @@ return;
onLoad = () => {},
...props
} = this.props;
+ const { noCors } = this.state;
const isImage = IMAGE_REGEX.test(url);
const isAudio = AUDIO_REGEX.test(url);
const isVideo = VIDEO_REGEX.test(url);
@@ -111,11 +119,12 @@ return;
if (isImage && remoteContentPolicy.imageShown) {
return this.wrapInLink(
<BaseImage
- crossOrigin="anonymous"
+ {...(noCors ? {} : { crossOrigin: "anonymous" })}
flexShrink={0}
src={url}
style={style}
onLoad={onLoad}
+ onError={this.onError}
{...imageProps}
{...props}
/>
|
Ignore REX-prefix, if it is not the last prefix before the opcode | @@ -777,6 +777,10 @@ static ZydisStatus ZydisCollectOptionalPrefixes(ZydisDecoderContext* context,
}
if (!done)
{
+ if ((prefixByte & 0xF0) != 0x40)
+ {
+ info->details.rex.data[0] = 0x00;
+ }
context->prefixes[info->details.prefixes.count] = prefixByte;
info->details.prefixes.data[info->details.prefixes.count++] = prefixByte;
ZydisInputSkip(context, info);
|
Neoverse N2: DYNAMIC_ARCH | @@ -99,6 +99,11 @@ extern gotoblas_t gotoblas_NEOVERSEN1;
#else
#define gotoblas_NEOVERSEN1 gotoblas_ARMV8
#endif
+#ifdef DYN_NEOVERSEN2
+extern gotoblas_t gotoblas_NEOVERSEN2;
+#else
+#define gotoblas_NEOVERSEN2 gotoblas_ARMV8
+#endif
#ifdef DYN_CORTEX_A55
extern gotoblas_t gotoblas_CORTEXA55;
#else
@@ -115,6 +120,7 @@ extern gotoblas_t gotoblas_THUNDERX2T99;
extern gotoblas_t gotoblas_TSV110;
extern gotoblas_t gotoblas_EMAG8180;
extern gotoblas_t gotoblas_NEOVERSEN1;
+extern gotoblas_t gotoblas_NEOVERSEN2;
extern gotoblas_t gotoblas_THUNDERX3T110;
extern gotoblas_t gotoblas_CORTEXA55;
#endif
@@ -166,8 +172,9 @@ char *gotoblas_corename(void) {
if (gotoblas == &gotoblas_TSV110) return corename[ 8];
if (gotoblas == &gotoblas_EMAG8180) return corename[ 9];
if (gotoblas == &gotoblas_NEOVERSEN1) return corename[10];
- if (gotoblas == &gotoblas_THUNDERX3T110) return corename[11];
- if (gotoblas == &gotoblas_CORTEXA55) return corename[12];
+ if (gotoblas == &gotoblas_NEOVERSEN2) return corename[12];
+ if (gotoblas == &gotoblas_THUNDERX3T110) return corename[13];
+ if (gotoblas == &gotoblas_CORTEXA55) return corename[14];
return corename[NUM_CORETYPES];
}
@@ -258,6 +265,8 @@ static gotoblas_t *get_coretype(void) {
return &gotoblas_CORTEXA73;
case 0xd0c: // Neoverse N1
return &gotoblas_NEOVERSEN1;
+ case 0xd49:
+ return &gotoblas_NEOVERSEN2;
case 0xd05: // Cortex A55
return &gotoblas_CORTEXA55;
}
|
README: Update commit since last release shield for alpha14 | <img src="https://github.com/premake/premake-core/wiki/windows-widget.jpeg" width="24" height="24"/> [](https://ci.appveyor.com/project/PremakeOrganization/premake-core)
[]()
[]()
- []()
+ []()
<img src="http://premake.github.io/premake-logo.png" width="200" height="200" />
|
Minor improvement in class. | @@ -35,13 +35,14 @@ struct class_type
class_impl impl;
class_interface interface;
size_t ref_count;
- set static_attributes;
- set attributes;
- map static_methods;
map methods;
+ map static_methods;
+ set attributes;
+ set static_attributes;
};
static value class_metadata_name(klass cls);
+static method class_get_method_type_safe(vector v, type_id ret, type_id args[], size_t size);
klass class_create(const char *name, class_impl impl, class_impl_interface_singleton singleton)
{
@@ -322,10 +323,8 @@ vector class_methods(klass cls, const char *key)
return map_get(cls->methods, (map_key)key);
}
-method class_static_method(klass cls, const char *key, type_id ret, type_id args[], size_t size)
+method class_get_method_type_safe(vector v, type_id ret, type_id args[], size_t size)
{
- vector v = class_static_methods(cls, key);
-
if (v != NULL)
{
size_t iterator, method_size = vector_size(v);
@@ -347,29 +346,14 @@ method class_static_method(klass cls, const char *key, type_id ret, type_id args
return NULL;
}
-method class_method(klass cls, const char *key, type_id ret, type_id args[], size_t size)
-{
- vector v = class_methods(cls, key);
-
- if (v != NULL)
- {
- size_t iterator, method_size = vector_size(v);
-
- for (iterator = 0; iterator < method_size; ++iterator)
- {
- method m = vector_at_type(v, iterator, method);
-
- if (signature_compare(method_signature(m), ret, args, size) == 0)
+method class_static_method(klass cls, const char *key, type_id ret, type_id args[], size_t size)
{
- vector_destroy(v);
- return m;
- }
- }
-
- vector_destroy(v);
+ return class_get_method_type_safe(class_static_methods(cls, key), ret, args, size);
}
- return NULL;
+method class_method(klass cls, const char *key, type_id ret, type_id args[], size_t size)
+{
+ return class_get_method_type_safe(class_methods(cls, key), ret, args, size);
}
attribute class_static_attribute(klass cls, const char *key)
|
docs/uio: Document BytesIO/StringIO.__iadd__() method. | @@ -210,13 +210,36 @@ Classes
can be specified with *string* parameter (should be normal string
for `StringIO` or bytes object for `BytesIO`). All the usual file
methods like ``read()``, ``write()``, ``seek()``, ``flush()``,
- ``close()`` are available on these objects, and additionally, a
- following method:
+ ``close()`` are available on these objects, and additionally,
+ following methods:
.. method:: getvalue()
Get the current contents of the underlying buffer which holds data.
+ .. method:: __iadd__(string)
+
+ (I.e. ``+=`` operator.) This is equivalent to ``write()`` method,
+ but gives syntax similar to string ``+=`` operator. Usage example::
+
+ # Don't do it like this, it's *very* slow.
+ buf = ""
+ for i in range(50000):
+ buf += "a"
+ print(buf)
+
+ # Instead, do it like this, this is both fast and efficient of
+ # memory.
+ buf = uio.StringIO()
+ for i in range(50000):
+ buf += "a"
+ print(buf.getvalue())
+
+ .. admonition:: Difference to CPython
+ :class: attention
+
+ This method is a Pycopy extension.
+
.. class:: StringIO(alloc_size)
.. class:: BytesIO(alloc_size)
|
doc: update decisions template
markdown guidelines | -# Template
+# Template #
-## Issue
+## Issue ##
-## Constraints
+## Constraints ##
-## Assumptions
+## Assumptions ##
-## Considered Alternatives
+## Considered Alternatives ##
-## Decision
+## Decision ##
-## Argument
+## Argument ##
-## Implications
+## Implications ##
-## Related decisions
+## Related decisions ##
-## Notes
+## Notes ##
|
[util/mktemp.cpp] throw TSystemError | @@ -89,7 +89,7 @@ TString MakeTempName(const char* wrkDir, const char* prefix) {
TArrayHolder<char> ret(makeTempName(wrkDir, prefix));
if (!ret) {
- ythrow yexception() << "can not create temp name(" << wrkDir << ", " << prefix << ")";
+ ythrow TSystemError() << "can not create temp name(" << wrkDir << ", " << prefix << ")";
}
return ret.Get();
|
integrationtest/TestBiolatency: Validate json output | @@ -27,6 +27,7 @@ import (
"time"
. "github.com/inspektor-gadget/inspektor-gadget/integration"
+ bioprofileTypes "github.com/inspektor-gadget/inspektor-gadget/pkg/gadgets/profile/block-io/types"
cpuprofileTypes "github.com/inspektor-gadget/inspektor-gadget/pkg/gadgets/profile/cpu/types"
processCollectorTypes "github.com/inspektor-gadget/inspektor-gadget/pkg/gadgets/snapshot/process/types"
socketCollectorTypes "github.com/inspektor-gadget/inspektor-gadget/pkg/gadgets/snapshot/socket/types"
@@ -371,8 +372,19 @@ func TestBiolatency(t *testing.T) {
commands := []*Command{
{
Name: "RunBiolatencyGadget",
- Cmd: "$KUBECTL_GADGET profile block-io --node $(kubectl get node --no-headers | cut -d' ' -f1 | head -1) --timeout 15",
- ExpectedRegexp: `usecs\s+:\s+count\s+distribution`,
+ Cmd: "$KUBECTL_GADGET profile block-io --node $(kubectl get node --no-headers | cut -d' ' -f1 | head -1) --timeout 15 -o json",
+ ExpectedOutputFn: func(output string) error {
+ expectedEntry := &bioprofileTypes.Report{
+ ValType: "usecs",
+ }
+
+ normalize := func(e *bioprofileTypes.Report) {
+ e.Data = nil
+ e.Time = ""
+ }
+
+ return ExpectEntriesToMatch(output, normalize, expectedEntry)
+ },
},
}
|
fix CGO_ENABLED for build of go standard library | @@ -3690,7 +3690,7 @@ macro GO_FAKE_OUTPUT(FILES...) {
CGO_ENABLED=yes
-when ($SANITIZER_TYPE && $SANITIZER_TYPE != "no") {
+when ($OS_WINDOWS == "yes" || $SANITIZER_TYPE && $SANITIZER_TYPE != "no") {
CGO_ENABLED=no
}
|
[software] Adapt allocator test to new runtime | @@ -32,7 +32,7 @@ int main() {
uint32_t num_cores = mempool_get_core_count();
// Initialize synchronization variables
- mempool_barrier_init(core_id, num_cores);
+ mempool_barrier_init(core_id);
// Test
if (core_id == 0) {
@@ -141,6 +141,6 @@ int main() {
}
// wait until all cores have finished
- mempool_barrier(num_cores, num_cores * 4);
+ mempool_barrier(num_cores);
return 0;
}
|
Remove unused action typed | @@ -25,14 +25,6 @@ export const PROJECT_SAVE_REQUEST = "PROJECT_SAVE_REQUEST";
export const PROJECT_SAVE_SUCCESS = "PROJECT_SAVE_SUCCESS";
export const PROJECT_SAVE_FAILURE = "PROJECT_SAVE_FAILURE";
-export const WORLD_LOAD_REQUEST = "WORLD_LOAD_REQUEST";
-export const WORLD_LOAD_SUCCESS = "WORLD_LOAD_SUCCESS";
-export const WORLD_LOAD_FAILURE = "WORLD_LOAD_FAILURE";
-
-export const WORLD_SAVE_REQUEST = "WORLD_SAVE_REQUEST";
-export const WORLD_SAVE_SUCCESS = "WORLD_SAVE_SUCCESS";
-export const WORLD_SAVE_FAILURE = "WORLD_SAVE_FAILURE";
-
export const ADD_SCENE = "ADD_SCENE";
export const MOVE_SCENE = "MOVE_SCENE";
export const EDIT_SCENE = "EDIT_SCENE";
|
fix movemouse monitor issue | @@ -246,6 +246,17 @@ int checkfloating(Client *c) {
return 0;
}
+int visible(Client *c) {
+ Monitor *m;
+ if (!c)
+ return 0;
+ for (m = mons; m; m = m->next) {
+ if (c->tags & m->seltags && c->mon == m)
+ return 1;
+ }
+ return 0;
+}
+
void changesnap(Client *c, int snapmode) {
int snapmatrix[10][4] = {
{9, 3, 5, 7}, // normal
@@ -1657,7 +1668,7 @@ enternotify(XEvent *e)
return;
c = wintoclient(ev->window);
if (c && selmon->sel && ( selmon->sel->isfloating || !selmon->lt[selmon->sellt]->arrange ) && c != selmon->sel &&
- (ev->window == root || selmon->sel->issticky)) {
+ (ev->window == root || visible(c) || ISVISIBLE(c) || selmon->sel->issticky)) {
resizeexit = resizeborder(NULL);
if (focusfollowsfloatmouse) {
if (!resizeexit)
@@ -2730,12 +2741,6 @@ movemouse(const Arg *arg)
}
XUngrabPointer(dpy, CurrentTime);
- if (!tagclient && (m = recttomon(c->x, c->y, c->w, c->h)) != selmon) {
- sendmon(c, m);
- unfocus(selmon->sel, 0);
- selmon = m;
- focus(NULL);
- }
if (notfloating) {
if (NULL != selmon->lt[selmon->sellt]->arrange) {
|
feat(devcontainer): persist bash history
When combined with the root user volume, this commit instructs bash to save each command to the bash history after execution, thereby sharing the bash history between any containers that use the volume.
Based on the advice of KemoNine.
PR: | "name": "ZMK Development",
"dockerFile": "Dockerfile",
"runArgs": ["--security-opt", "label=disable"],
- "containerEnv": { "WORKSPACE_DIR": "${containerWorkspaceFolder}" },
+ "containerEnv": {
+ "WORKSPACE_DIR": "${containerWorkspaceFolder}",
+ "PROMPT_COMMAND": "history -a"
+ },
"mounts": [
"type=volume,source=zmk-root-user,target=/root",
"type=volume,source=zmk-config,target=/workspaces/zmk-config"
|
naive: cleanup style | ++ common-vote %vote-key-0
++ common-ownr %ownr-key-0
++ common-tran %tran-key-0
-++ rut-ship-list %- ly :* ~rut
+++ rut-ship-list %- ly
+ :* ~rut
~holrut
~rigrut
~losrut
==
::
:: initial ownership keys for each point under ~rut
-++ default-own-keys %- my:nl :* [~rut %rut-key-0]
+++ default-own-keys %- my:nl
+ :* [~rut %rut-key-0]
[~holrut %holrut-key-0]
[~rigrut %rigrut-key-0]
[~losrut %losrut-key-0]
!> (~(got by suc-map) cur-event)
::
!>
- =^ f state %- n
+ =^ f
+ state
+ %- n
:* initial-state ::state?
%bat
- =< q %- gen-tx
- :* nonce.owner.own:(~(got by points.state) cur-ship)
- :* [cur-ship proxy.cur-event]
- %set-management-proxy :: why does the tx-type not work?
- ::tx-type.cur-event
+ =< q
+ %- gen-tx
+ :+ nonce.owner.own:(~(got by points.state) cur-ship)
+ :+ [cur-ship proxy.cur-event]
+ %set-management-proxy ::tx-type.cur-event why does the tx-type not work?
(addr common-mgmt)
- ==
(~(got by default-own-keys) cur-ship)
==
- ==
- ?: =(address.management-proxy.own:(~(got by points.state) cur-ship) (addr common-mgmt))
+ ?: .= =< address.management-proxy.own
+ (~(got by points.state) cur-ship)
+ (addr common-mgmt)
%.y
%.n
::
|
Fix the KEYNID2TYPE macro
This macro was not correctly handling keys | : ((id) == EVP_PKEY_X448 ? X448_KEYLEN \
: ED448_KEYLEN))
#define KEYNID2TYPE(id) \
- (IS25519(id) ? ECX_KEY_TYPE_X25519 \
+ (IS25519(id) ? ((id) == EVP_PKEY_X25519 ? ECX_KEY_TYPE_X25519 \
+ : ECX_KEY_TYPE_ED25519) \
: ((id) == EVP_PKEY_X448 ? ECX_KEY_TYPE_X448 \
- : ((id) == EVP_PKEY_ED25519 ? ECX_KEY_TYPE_ED25519 \
- : ECX_KEY_TYPE_ED448)))
+ : ECX_KEY_TYPE_ED448))
#define KEYLEN(p) KEYLENID((p)->ameth->pkey_id)
|
Use LabeledOutput and operator | #include <util/generic/vector.h>
#include <util/generic/yexception.h>
#include <util/stream/buffer.h>
+#include <util/stream/labeled.h>
#include <util/system/yassert.h>
#include <climits>
@@ -322,8 +323,7 @@ namespace NCB {
const ui32 maxBound = ui32(1) << (CHAR_BIT * bundleSizeInBytes);
CB_ENSURE_INTERNAL(
(boundsInBundle.Begin < boundsInBundle.End),
- "boundsInBundle [" << boundsInBundle.Begin << ',' << boundsInBundle.End
- << ") do not represent a valid range"
+ LabeledOutput(boundsInBundle) << " do not represent a valid range"
);
CB_ENSURE_INTERNAL(boundsInBundle.End <= maxBound, "boundsInBundle.End > maxBound");
CB_ENSURE_INTERNAL(SubsetIndexing, "subsetIndexing is empty");
|
Fix SceJpegEncoderInitParamOption | @@ -30,7 +30,7 @@ typedef enum SceJpegEncoderHeaderMode {
SCE_JPEGENC_HEADER_MODE_MJPEG = 1 //!< MJPEG header mode
} SceJpegEncoderHeaderMode;
-typedef struct SceJpegEncoderInitParamOption {
+typedef enum SceJpegEncoderInitParamOption {
SCE_JPEGENC_INIT_PARAM_OPTION_NONE = 0, //!< Default option
SCE_JPEGENC_INIT_PARAM_OPTION_LPDDR2_MEMORY = 1 //!< LPDDR2 memory will be used instead of CDRAM
} SceJpegEncoderInitParamOption;
|
add drivers for softiron networking | --- a/etc/bootstrap.conf 2017-10-23 12:42:13.000000000 -0700
-+++ b/etc/bootstrap.conf 2017-10-23 12:43:25.000000000 -0700
-@@ -32,6 +32,9 @@
++++ b/etc/bootstrap.conf 2017-10-23 14:14:28.000000000 -0700
+@@ -32,6 +32,10 @@
modprobe += xhci-hcd, sl811-hcd, sd_mod
# modprobe += mlx4_core log_num_mtts=20 log_mtts_per_seg=6, ib_srp
-+# support USB network devices
-+modprobe += xhci_pci, usbcore, mii, usbnet, asix
++# support USB and SoftIron network devices
++modprobe += xhci_pci, usbcore, libphy, mii, usbnet, asix
++modprobe += amd-xgbe
+
#OpenHPC additions for SLES12
drivers += af_packet, dns_resolver, auth_rpcgss, lockd, sunrpc
|
Completions: Remove trailing dot from description | @@ -154,7 +154,7 @@ __fish_kdb_add_option '__fish_kdb_subcommand_supports_option_force' 'force' 'f'
__fish_kdb_add_option '__fish_kdb_subcommand_supports_common_options' 'help' 'H' 'Show the man page'
# --null -0
-__fish_kdb_add_option '__fish_kdb_subcommand_supports_option_null' 'null' '0' 'Use binary 0 termination.'
+__fish_kdb_add_option '__fish_kdb_subcommand_supports_option_null' 'null' '0' 'Use binary 0 termination'
# --profile -p
set -l description 'Use a different profile for kdb configuration'
|
Port CC2538 AES-CCM implementatiob to new API | @@ -79,8 +79,8 @@ set_key(const uint8_t *key)
}
/*---------------------------------------------------------------------------*/
static void
-aead(const uint8_t *nonce, uint8_t *m, uint8_t m_len, const uint8_t *a,
- uint8_t a_len, uint8_t *result, uint8_t mic_len, int forward)
+aead(const uint8_t *nonce, uint8_t *m, uint16_t m_len, const uint8_t *a,
+ uint16_t a_len, uint8_t *result, uint8_t mic_len, int forward)
{
uint16_t cdata_len;
uint8_t crypto_enabled, ret;
@@ -102,6 +102,11 @@ aead(const uint8_t *nonce, uint8_t *m, uint8_t m_len, const uint8_t *a,
PRINTF("%s: ccm_auth_encrypt_get_result() error %u\n", MODULE_NAME, ret);
}
} else {
+ if(m_len + mic_len > 0xffff) {
+ /* This implementation passes cdata_len as 16bit param to ccm_auth_* functions.
+ * Abort if m_len exceeds 0xffff - mic_len */
+ return;
+ }
cdata_len = m_len + mic_len;
ret = ccm_auth_decrypt_start(CCM_STAR_LEN_LEN, CC2538_AES_128_KEY_AREA,
nonce, a, a_len, m, cdata_len, m, mic_len,
|
schema MAINTENANCE remove unused variable | @@ -2807,7 +2807,6 @@ lys_compile_type_(struct lysc_ctx *ctx, struct lysp_node *context_node_p, uint16
struct lysc_type_dec *dec;
struct lysc_type_identityref *idref;
struct lysc_type_union *un, *un_aux;
- void *p;
switch (basetype) {
case LY_TYPE_BINARY:
|
80-test_cmp_http.t: Extend diagnostics of mock server launch | @@ -279,7 +279,8 @@ sub start_mock_server {
print "Mock server already running with pid=$pid\n";
return $pid;
}
- print "Launching mock server: $cmd\n";
+ print "Current directory is ".getcwd()."\n";
+ print "Launching mock server listening on port $server_port: $cmd\n";
return system("$cmd &") == 0 # start in background, check for success
? (sleep 1, mock_server_pid()) : 0;
}
|
u3: rewrites +murn jet using u3i_defcons() | #include "all.h"
u3_noun
- _murn_in(u3j_site* sit_u, u3_noun a)
+u3qb_murn(u3_noun a, u3_noun b)
{
- if ( 0 == a ) {
- return a;
- }
- else if ( c3n == u3du(a) ) {
- return u3m_bail(c3__exit);
+ u3_noun pro = u3_nul;
+
+ if ( u3_nul == a ) {
+ return u3_nul;
}
else {
- u3_noun one = u3j_gate_slam(sit_u, u3k(u3h(a)));
- u3_noun two = _murn_in(sit_u, u3t(a));
- u3_noun nex;
-
- switch ( u3ud(one) ) {
- case c3y: u3z(one);
- return two;
- case c3n: nex = u3nc(u3k(u3t(one)), two);
- u3z(one);
- return nex;
- default: u3z(one);
- u3z(two);
- return u3_none;
- }
- }
- }
-
-/* functions
-*/
- u3_noun
- u3qb_murn(u3_noun a, u3_noun b)
- {
u3_noun pro;
+ u3_noun* lit = &pro;
u3j_site sit_u;
+
u3j_gate_prep(&sit_u, u3k(b));
- pro = _murn_in(&sit_u, a);
+ {
+ u3_noun* hed;
+ u3_noun* tel;
+ u3_noun res, i, t = a;
+
+ do {
+ u3x_cell(t, &i, &t);
+
+ res = u3j_gate_slam(&sit_u, u3k(i));
+
+ if ( u3_nul != res ) {
+ *lit = u3i_defcons(&hed, &tel);
+ *hed = u3t(res);
+ lit = tel;
+ }
+ }
+ while ( u3_nul != t );
+ }
u3j_gate_lose(&sit_u);
+
+ *lit = u3_nul;
+
return pro;
}
+}
+
u3_noun
u3wb_murn(u3_noun cor)
{
u3_noun a, b;
-
- if ( c3n == u3r_mean(cor, u3x_sam_2, &a, u3x_sam_3, &b, 0) ) {
- return u3m_bail(c3__exit);
- } else {
+ u3x_mean(cor, u3x_sam_2, &a, u3x_sam_3, &b, 0);
return u3qb_murn(a, b);
}
- }
-
|
Add instructions for using the include-dirs switch if GSL headers are not found | @@ -558,7 +558,7 @@ A Python wrapper for {\tt CCL} is provided through a module called {\tt pyccl}.
\subsection{Python installation}
\label{sec:python:install}
-Before you can build the Python wrapper, you must have compiled and installed the C version of {\tt CCL}, as {\tt pyccl} will be dynamically linked to it. The Python wrapper's build tools currently assume that your C compiler is {\tt gcc} (with OpenMP enabled), and that you have a working Python 2.x installation with {\tt numpy} and {\tt distutils} with {\tt swig}. To build and install the {\tt pyccl} module, go to the root {\tt CCL} directory and choose one of the following options:
+Before you can build the Python wrapper, you must have compiled and installed the C version of {\tt CCL}, as {\tt pyccl} will be dynamically linked to it. The Python wrapper's build tools currently assume that your C compiler is {\tt gcc} (with OpenMP enabled), and that you have a working Python 2.x installation with {\tt numpy} and {\tt distutils} with {\tt swig}. If you have installed CCL in your default library path, you can build and install the {\tt pyccl} module by going to the root {\tt CCL} directory and choosing one of the following options:
\begin{itemize}
\item To build and install the wrapper for the current user only, run \\
{\tt \$ python setup.py install --user}
@@ -575,6 +575,16 @@ These options assume that the C library ({\tt libccl}) has been installed somewh
Here, {\tt /path/to/lib/} should point to the directory where you installed the C library. For example, if you ran {\tt ./configure --prefix=/my/path/} before you compiled the C library, the correct path would be {\tt /my/path/lib/}. The command above will build the Python wrapper in-place; you can then run one of the {\tt install} commands, as listed above, to actually install the wrapper. Note that the {\tt rpath} switch makes sure that the CCL C library can be found at runtime, even if it is not in the default library path. If you use this option, there should therefore be no need to modify the library path yourself.
+On some systems, building or installing the Python wrapper fails with a message similar to:
+
+\texttt{fatal error: 'gsl/gsl_interp2d.h' file not found.}
+
+This happens when the build tools fail to find the directory containing the GSL header files, e.g. when they have been installed in a non-standard directory. To work around this problem, use the {\tt --include-dirs} option when running the {\tt setup.py build_ext} step above, i.e. if the GSL header files are in the directory {\tt /path/to/include/}, you would run
+
+\texttt{python setup.py build_ext --library-dirs=/path/to/install/lib/ --rpath=/path/to/install/lib/ --include-dirs=/path/to/include/}
+
+and then run one of the {\tt setup.py install} commands listed above. (Note: As an alternative to the {\tt --include-dirs} option, you can use {\tt -I/path/to/include} instead.)
+
You can quickly check whether {\tt pyccl} has been installed correctly by running {\tt python -c "import pyccl"} and checking that no errors are returned. For a more in-depth test to make sure everything is working, change to the {\tt tests/} sub-directory and run {\tt python run\_tests.py}. These tests will take a few minutes.
\subsection{Python example}
|
Tests: more URI normalization tests. | @@ -901,31 +901,75 @@ class TestRouting(TestApplicationProto):
'success',
self.route(
{
- "match": {"uri": "/"},
+ "match": {"uri": ["/blah", "/slash/"]},
"action": {"pass": "applications/empty"},
}
),
'match uri positive configure',
)
- self.assertEqual(self.get()['status'], 200, 'match uri positive')
+ self.assertEqual(self.get()['status'], 404, 'match uri positive')
self.assertEqual(
- self.get(url='/blah')['status'], 404, 'match uri positive blah'
+ self.get(url='/blah')['status'], 200, 'match uri positive blah'
)
self.assertEqual(
- self.get(url='/#blah')['status'], 200, 'match uri positive #blah'
+ self.get(url='/blah#foo')['status'],
+ 200,
+ 'match uri positive #foo',
+ )
+ self.assertEqual(
+ self.get(url='/blah?var')['status'], 200, 'match uri args'
+ )
+ self.assertEqual(
+ self.get(url='//blah')['status'], 200, 'match uri adjacent slashes'
+ )
+ self.assertEqual(
+ self.get(url='/slash/foo/../')['status'],
+ 200,
+ 'match uri relative path',
+ )
+ self.assertEqual(
+ self.get(url='/slash/./')['status'],
+ 200,
+ 'match uri relative path 2',
+ )
+ self.assertEqual(
+ self.get(url='/slash//.//')['status'],
+ 200,
+ 'match uri adjacent slashes 2',
)
self.assertEqual(
- self.get(url='/?var')['status'], 200, 'match uri params'
+ self.get(url='/%')['status'], 400, 'match uri percent'
)
self.assertEqual(
- self.get(url='//')['status'], 200, 'match uri adjacent slashes'
+ self.get(url='/%1')['status'], 400, 'match uri percent digit'
)
self.assertEqual(
- self.get(url='/blah/../')['status'], 200, 'match uri relative path'
+ self.get(url='/%A')['status'], 400, 'match uri percent letter'
)
self.assertEqual(
- self.get(url='/./')['status'], 200, 'match uri relative path'
+ self.get(url='/slash/.?args')['status'], 200, 'match uri dot args'
+ )
+ self.assertEqual(
+ self.get(url='/slash/.#frag')['status'], 200, 'match uri dot frag'
+ )
+ self.assertEqual(
+ self.get(url='/slash/foo/..?args')['status'],
+ 200,
+ 'match uri dot dot args',
+ )
+ self.assertEqual(
+ self.get(url='/slash/foo/..#frag')['status'],
+ 200,
+ 'match uri dot dot frag',
+ )
+ self.assertEqual(
+ self.get(url='/slash/.')['status'], 200, 'match uri trailing dot'
+ )
+ self.assertEqual(
+ self.get(url='/slash/foo/..')['status'],
+ 200,
+ 'match uri trailing dot dot',
)
def test_routes_match_uri_case_sensitive(self):
|
Add base in rs loader for parsing the signature types. | @@ -212,8 +212,8 @@ impl FunctionVisitor {
}
}
- fn add_function(&mut self, name: String) {
- self.functions.push(name)
+ fn add_function(&mut self, name: String, decl: &rustc_ast::ptr::P<rustc_ast::ast::FnDecl>) {
+ self.functions.push(name);
}
}
@@ -221,7 +221,7 @@ impl FunctionVisitor {
impl<'a> visit::Visitor<'a> for FunctionVisitor {
fn visit_fn(&mut self, fk: visit::FnKind, s: Span, _: NodeId) {
match fk {
- visit::FnKind::Fn(_, indent, ..) => self.add_function(indent.name.to_string()),
+ visit::FnKind::Fn(_, indent, sig, ..) => self.add_function(indent.name.to_string(), &sig.decl),
_ => ()
}
|
BugID:16944882:fix whiteScan bug 2 | @@ -81,7 +81,7 @@ mb_status_t mb_serial_frame_recv(mb_handler_t *handler)
int32_t ret;
uart_dev_t *uart = (mb_handler_t *)handler->private;
- mb_log(MB_LOG_DEBUG, "waiting %d ms for rev frame\n", handler->respond_timeout);
+ mb_log(MB_LOG_DEBUG, "waiting %ld ms for rev frame\n", handler->respond_timeout);
ret = hal_uart_recv_II(uart, handler->mb_frame_buff, ADU_BUF_MAX_LENGTH, &handler->mb_frame_length, handler->respond_timeout);
if (ret == 0) {
return MB_SUCCESS;
|
bricks/movehub: enable iodevices
This will stay enabled until other hubs support Bluetooth. | #define PYBRICKS_HUB_MOVEHUB (1)
// Pybricks modules
-#define PYBRICKS_PY_IODEVICES (0)
+#define PYBRICKS_PY_IODEVICES (1)
#define PYBRICKS_PY_PARAMETERS (1)
#define PYBRICKS_PY_PUPDEVICES (1)
#define PYBRICKS_PY_TOOLS (1)
|
ci: run integration_test when submodule changes | - "tools/ci/python_packages/tiny_test_fw/**/*"
- "tools/ci/integration_test/**/*"
+ - "components/bt/controller/lib_esp32"
+ - "components/bt/controller/lib_esp32c3_family"
+ - "components/bt/controller/lib_esp32h2/esp32h2-bt-lib"
+ - "components/bt/host/nimble/nimble"
+ - "components/esp_wifi/lib"
+ - "components/esp_phy/lib"
+
.patterns-host_test: &patterns-host_test
- ".gitlab/ci/host-test.yml"
|
Exception safety. | @@ -470,6 +470,7 @@ SEXP CatBoostFit_R(SEXP learnPoolParam, SEXP testPoolParam, SEXP fitParamsAsJson
TPoolHandle learnPool = reinterpret_cast<TPoolHandle>(R_ExternalPtrAddr(learnPoolParam));
TDataProviders pools;
pools.Learn = learnPool;
+ pools.Learn->Ref();
auto fitParams = LoadFitParams(fitParamsAsJsonParam);
TFullModelPtr modelPtr = std::make_unique<TFullModel>();
@@ -477,6 +478,7 @@ SEXP CatBoostFit_R(SEXP learnPoolParam, SEXP testPoolParam, SEXP fitParamsAsJson
TEvalResult evalResult;
TPoolHandle testPool = reinterpret_cast<TPoolHandle>(R_ExternalPtrAddr(testPoolParam));
pools.Test.emplace_back(testPool);
+ pools.Test.back()->Ref();
TrainModel(
fitParams,
nullptr,
@@ -489,7 +491,6 @@ SEXP CatBoostFit_R(SEXP learnPoolParam, SEXP testPoolParam, SEXP fitParamsAsJson
modelPtr.get(),
{&evalResult}
);
- Y_UNUSED(pools.Test.back().Release());
}
else {
TrainModel(
@@ -505,7 +506,6 @@ SEXP CatBoostFit_R(SEXP learnPoolParam, SEXP testPoolParam, SEXP fitParamsAsJson
{}
);
}
- Y_UNUSED(pools.Learn.Release());
result = PROTECT(R_MakeExternalPtr(modelPtr.get(), R_NilValue, R_NilValue));
R_RegisterCFinalizerEx(result, _Finalizer<TFullModelHandle>, TRUE);
modelPtr.release();
@@ -553,6 +553,7 @@ SEXP CatBoostCV_R(SEXP fitParamsAsJsonParam,
R_API_BEGIN();
TPoolPtr pool = reinterpret_cast<TPoolHandle>(R_ExternalPtrAddr(poolParam));
+ pool->Ref();
auto fitParams = LoadFitParams(fitParamsAsJsonParam);
TCrossValidationParams cvParams;
@@ -574,7 +575,6 @@ SEXP CatBoostCV_R(SEXP fitParamsAsJsonParam,
pool,
cvParams,
&cvResults);
- Y_UNUSED(pool.Release());
metricCount = cvResults.size();
TVector<size_t> offsets(metricCount);
@@ -803,6 +803,9 @@ SEXP CatBoostCalcRegularFeatureEffect_R(SEXP modelParam, SEXP poolParam, SEXP fs
TFullModelHandle model = reinterpret_cast<TFullModelHandle>(R_ExternalPtrAddr(modelParam));
TDataProviderPtr pool = Rf_isNull(poolParam) ? nullptr :
reinterpret_cast<TPoolHandle>(R_ExternalPtrAddr(poolParam));
+ if (pool) {
+ pool->Ref();
+ }
EFstrType fstrType = FromString<EFstrType>(CHAR(asChar(fstrTypeParam)));
const int threadCount = UpdateThreadCount(asInteger(threadCountParam));
const bool multiClass = model->GetDimensionsCount() > 1;
@@ -855,9 +858,6 @@ SEXP CatBoostCalcRegularFeatureEffect_R(SEXP modelParam, SEXP poolParam, SEXP fs
INTEGER(resultDim)[1] = numCols;
setAttrib(result, R_DimSymbol, resultDim);
}
- if (pool) {
- Y_UNUSED(pool.Release());
- }
R_API_END();
UNPROTECT(2);
return result;
|
SOVERSION bump to evrsion 4.0.11 | @@ -35,7 +35,7 @@ set(SYSREPO_VERSION ${SYSREPO_MAJOR_VERSION}.${SYSREPO_MINOR_VERSION}.${SYSREPO_
# with backward compatible change and micro version is connected with any internal change of the library.
set(SYSREPO_MAJOR_SOVERSION 4)
set(SYSREPO_MINOR_SOVERSION 0)
-set(SYSREPO_MICRO_SOVERSION 10)
+set(SYSREPO_MICRO_SOVERSION 11)
set(SYSREPO_SOVERSION_FULL ${SYSREPO_MAJOR_SOVERSION}.${SYSREPO_MINOR_SOVERSION}.${SYSREPO_MICRO_SOVERSION})
set(SYSREPO_SOVERSION ${SYSREPO_MAJOR_SOVERSION})
|
docs: removed duplicate header includes in doxyfile | @@ -204,8 +204,6 @@ INPUT = \
$(PROJECT_PATH)/components/esp_pm/include/esp_pm.h \
$(PROJECT_PATH)/components/esp_pm/include/$(IDF_TARGET)/pm.h \
$(PROJECT_PATH)/components/esp_timer/include/esp_timer.h \
- $(PROJECT_PATH)/components/esp_event/include/esp_event.h \
- $(PROJECT_PATH)/components/esp_event/include/esp_event_base.h \
$(PROJECT_PATH)/components/efuse/include/esp_efuse.h \
$(PROJECT_PATH)/components/bootloader_support/include/esp_app_format.h \
$(PROJECT_PATH)/components/pthread/include/esp_pthread.h \
@@ -219,7 +217,6 @@ INPUT = \
$(PROJECT_PATH)/components/esp_ringbuf/include/freertos/ringbuf.h \
$(PROJECT_PATH)/components/esp_common/include/esp_err.h \
$(PROJECT_PATH)/components/esp_common/include/esp_check.h \
- $(PROJECT_PATH)/components/esp_system/include/esp_system.h \
$(PROJECT_PATH)/components/freemodbus/common/include/esp_modbus_common.h \
$(PROJECT_PATH)/components/freemodbus/common/include/esp_modbus_slave.h \
$(PROJECT_PATH)/components/freemodbus/common/include/esp_modbus_master.h \
|
sr_cond MAINTENANCE unused members removed | */
typedef struct {
uint32_t futex; /**< futex used for waiting and signalling idle/ready */
- uint32_t waiters; /**< number of waiters for the futex */
- pthread_mutex_t wait_lock; /**< lock held while the futex is being waited on */
} sr_cond_t;
/**
|
Set the ns on impl decls to match the impl ns. | @@ -247,6 +247,7 @@ Node *
mkimplstmt(Srcloc loc, Node *name, Type *t, Type **aux, size_t naux, Node **decls, size_t ndecls)
{
Node *n;
+ size_t i;
n = mknode(loc, Nimpl);
n->impl.traitname = name;
@@ -256,6 +257,9 @@ mkimplstmt(Srcloc loc, Node *name, Type *t, Type **aux, size_t naux, Node **decl
n->impl.decls = decls;
n->impl.ndecls = ndecls;
lappend(&impltab, &nimpltab, n);
+ if (name->name.ns)
+ for (i = 0; i < ndecls; i++)
+ setns(decls[i]->decl.name, name->name.ns);
if (hasparams(t)) {
n->impl.env = mkenv();
bindtype(n->impl.env, t);
|
[Rust] Model core command to query info about an amc service | @@ -178,6 +178,48 @@ pub fn amc_free_physical_range(vaddr: usize, size: usize) {
amc_message_await(Some(AMC_CORE_SERVICE_NAME));
}
+#[repr(C)]
+#[derive(Debug, ContainsEventField)]
+pub struct AmcQueryServiceRequest {
+ pub event: u32,
+ pub remote_service_name: [u8; AMC_MAX_SERVICE_NAME_LEN],
+}
+
+impl ExpectsEventField for AmcQueryServiceRequest {
+ const EXPECTED_EVENT: u32 = 211;
+}
+
+impl AmcQueryServiceRequest {
+ #[cfg(target_os = "axle")]
+ pub fn send(remote_service_name: &str) -> AmcQueryServiceResponse {
+ let mut name_buf = [0; AMC_MAX_SERVICE_NAME_LEN];
+ let _name_len = copy_str_into_sized_slice(&mut name_buf, remote_service_name);
+ let msg = Self {
+ event: Self::EXPECTED_EVENT,
+ remote_service_name: name_buf,
+ };
+ amc_message_send(AMC_CORE_SERVICE_NAME, msg);
+ // Await the response
+ let resp: AmcMessage<AmcQueryServiceResponse> = crate::amc_message_await__u32_event(
+ AMC_CORE_SERVICE_NAME,
+ AmcQueryServiceResponse::EXPECTED_EVENT,
+ );
+ *resp.body
+ }
+}
+
+#[repr(C)]
+#[derive(Debug, Copy, Clone, ContainsEventField)]
+pub struct AmcQueryServiceResponse {
+ pub event: u32,
+ pub remote_service_name: [u8; AMC_MAX_SERVICE_NAME_LEN],
+ pub service_exists: bool,
+}
+
+impl ExpectsEventField for AmcQueryServiceResponse {
+ const EXPECTED_EVENT: u32 = 211;
+}
+
// Start/control processes
#[repr(C)]
#[derive(Debug, ContainsEventField)]
|
Add Watchdog Thread to spinquic | @@ -66,6 +66,42 @@ public:
}
};
+//
+// The amount of extra time (in milliseconds) to give the watchdog before
+// actually firing.
+//
+#define WATCHDOG_WIGGLE_ROOM 1000
+
+class SpinQuicWatchdog {
+ QUIC_THREAD WatchdogThread;
+ QUIC_EVENT ShutdownEvent;
+ uint32_t TimeoutMs;
+ static
+ QUIC_THREAD_CALLBACK(WatchdogThreadCallback, Context) {
+ auto This = (SpinQuicWatchdog*)Context;
+ if (!QuicEventWaitWithTimeout(This->ShutdownEvent, This->TimeoutMs)) {
+ printf("Watchdog timeout fired!\n");
+ QUIC_FRE_ASSERTMSG(FALSE, "Watchdog timeout fired!");
+ }
+ QUIC_THREAD_RETURN(0);
+ }
+public:
+ SpinQuicWatchdog(uint32_t WatchdogTimeoutMs) : TimeoutMs(WatchdogTimeoutMs) {
+ QuicEventInitialize(&ShutdownEvent, TRUE, FALSE);
+ QUIC_THREAD_CONFIG Config = { 0 };
+ Config.Name = "spin_watchdog";
+ Config.Callback = WatchdogThreadCallback;
+ Config.Context = this;
+ EXIT_ON_FAILURE(QuicThreadCreate(&Config, &WatchdogThread));
+ }
+ ~SpinQuicWatchdog() {
+ QuicEventSet(ShutdownEvent);
+ QuicThreadWait(&WatchdogThread);
+ QuicThreadDelete(&WatchdogThread);
+ QuicEventUninitialize(ShutdownEvent);
+ }
+};
+
static uint64_t StartTimeMs;
static QUIC_API_V1* MsQuic;
static HQUIC Registration;
@@ -644,6 +680,8 @@ main(int argc, char **argv)
TryGetValue(argc, argv, "seed", &RngSeed);
srand(RngSeed);
+ SpinQuicWatchdog Watchdog(Settings.RunTimeMs + WATCHDOG_WIGGLE_ROOM);
+
EXIT_ON_FAILURE(MsQuicOpenV1(&MsQuic));
EXIT_ON_FAILURE(MsQuic->RegistrationOpen("spinquic", &Registration));
|
Update to work with stack frame | @@ -1129,7 +1129,6 @@ class ScriptBuilder {
};
_actorInterruptMovement = (addr: string) => {
- this.includeActor = true;
this._addCmd("VM_ACTOR_INTERRUPT_MOVEMENT", addr);
};
@@ -1870,7 +1869,8 @@ class ScriptBuilder {
};
actorInterruptMovement = () => {
- this._actorInterruptMovement("ACTOR");
+ const actorRef = this._declareLocal("actor", 4);
+ this._actorInterruptMovement(this._localRef(actorRef));
this._addNL();
};
|
Enables debugging for CMake | @@ -6,8 +6,8 @@ set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11")
add_custom_target(build-ravencoin ALL
COMMAND ./autogen.sh
- COMMAND ./configure
- COMMAND $(MAKE) WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
+ COMMAND ./configure --enable-debug
+ COMMAND $(MAKE) -j 8 WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
COMMAND $(MAKE) install)
add_custom_target(debug-ravencoind ALL)
|
[NFSU2] fix nos trail logic | @@ -82,7 +82,7 @@ uint32_t* NOSTrailCaveExitTrue = (uint32_t*)0x0061AD91;
uint32_t* NOSTrailCaveExitFalse = (uint32_t*)0x61AE8E;
void __declspec(naked) NOSTrailCave()
{
- if ((*fc_12989_8A44EC + NOSTrailFrameDelay) < *eFrameCounter_870818)
+ if ((*fc_12989_8A44EC + NOSTrailFrameDelay) <= *eFrameCounter_870818)
_asm
{
mov eax, ds:eFrameCounter_870818
|
Use -dumpversion with gcc only | @@ -46,10 +46,14 @@ if (${TARGET} STREQUAL "SKYLAKEX" AND NOT NO_AVX512)
set (KERNEL_DEFINITIONS "${KERNEL_DEFINITIONS} -march=skylake-avx512")
endif()
if (${TARGET} STREQUAL "HASWELL" AND NOT NO_AVX2)
+ if (${CMAKE_C_COMPILER_ID} STREQUAL "GNU")
execute_process(COMMAND ${CMAKE_C_COMPILER} -dumpversion OUTPUT_VARIABLE GCC_VERSION)
if (${GCC_VERSION} VERSION_GREATER 4.7 OR ${GCC_VERSION} VERSION_EQUAL 4.7)
set (KERNEL_DEFINITIONS "${KERNEL_DEFINITIONS} -mavx2")
endif()
+ elseif (${CMAKE_C_COMPILER_ID} STREQUAL "CLANG")
+ set (KERNEL_DEFINITIONS "${KERNEL_DEFINITIONS} -mavx2")
+ endif()
endif()
endif()
|
throw error when artifact not found | @@ -38,6 +38,7 @@ Function Get-AppVeyorArtifacts{
$jobId = $obj.build.jobs[$jobId].jobId
$artifacts = Invoke-RestMethod -Method Get -Uri "$apiUrl/buildjobs/$jobId/artifacts" -Headers $headers
$artifactFileName = $artifacts[0].fileName
+ if($artifactFileName -ne "xmake.exe"){throw "artifact not found"}
$localArtifactPath = "$DownloadDirectory\$artifactFileName"
Invoke-RestMethod -Method Get -Uri "$apiUrl/buildjobs/$jobId/artifacts/$artifactFileName" -OutFile $localArtifactPath
}
|
Update note on OSS-Fuzz' Wuffs configuration | @@ -3,9 +3,9 @@ various codecs. For example, `gif_fuzzer.cc` is a program to fuzz Wuffs' GIF
implementation.
They are typically run indirectly, by a fuzzing framework such as
-[OSS-Fuzz](https://github.com/google/oss-fuzz). There is an [OSS-Fuzz pull
-request](https://github.com/google/oss-fuzz/pull/1172) to add Wuffs to its list
-of projects.
+[OSS-Fuzz](https://github.com/google/oss-fuzz). That repository's
+`projects/wuffs` directory contains the complementary configuration for this
+directory's code.
When working on these files, it is possible to run them directly on an explicit
test suite, in order to speed up the edit-compile-run cycle. Look for
|
Change to comment in cellular test code only. | */
#define TEST_PREFIX_SN U_TEST_PREFIX_BASE "SN_TEST: "
-/** Print a whole line, with terminator, prefixed for an MQTT test.
+/** Print a whole line, with terminator, prefixed for an MQTT-SN test.
*/
#define TEST_PRINT_LINE_SN(format, ...) uPortLog(TEST_PREFIX_SN format "\n", ##__VA_ARGS__)
|
ts: fix memleaks caused by TS_VERIFY_CTX_set_imprint
CLA: trivial | @@ -70,6 +70,7 @@ STACK_OF(X509) *TS_VERIFY_CTX_set_certs(TS_VERIFY_CTX *ctx,
unsigned char *TS_VERIFY_CTX_set_imprint(TS_VERIFY_CTX *ctx,
unsigned char *hexstr, long len)
{
+ OPENSSL_free(ctx->imprint);
ctx->imprint = hexstr;
ctx->imprint_len = len;
return ctx->imprint;
|
Add a test where we reuse the EVP_PKEY_CTX for two HKDF test runs | #include <openssl/rsa.h>
#include <openssl/x509.h>
#include <openssl/pem.h>
+#include <openssl/kdf.h>
#include "testutil.h"
#include "internal/nelem.h"
#include "internal/evp_int.h"
@@ -918,6 +919,50 @@ static int test_EVP_PKEY_check(int i)
return ret;
}
+static int test_HKDF(void)
+{
+ EVP_PKEY_CTX *pctx;
+ unsigned char out[20];
+ size_t outlen;
+ int i, ret = 0;
+ unsigned char salt[] = "0123456789";
+ unsigned char key[] = "012345678901234567890123456789";
+ unsigned char info[] = "infostring";
+ const unsigned char expected[] = {
+ 0xe5, 0x07, 0x70, 0x7f, 0xc6, 0x78, 0xd6, 0x54, 0x32, 0x5f, 0x7e, 0xc5,
+ 0x7b, 0x59, 0x3e, 0xd8, 0x03, 0x6b, 0xed, 0xca
+ };
+ size_t expectedlen = sizeof(expected);
+
+ if (!TEST_ptr(pctx = EVP_PKEY_CTX_new_id(EVP_PKEY_HKDF, NULL)))
+ goto done;
+
+ /* We do this twice to test reuse of the EVP_PKEY_CTX */
+ for (i = 0; i < 2; i++) {
+ outlen = sizeof(out);
+ memset(out, 0, outlen);
+
+ if (!TEST_int_gt(EVP_PKEY_derive_init(pctx), 0)
+ || !TEST_int_gt(EVP_PKEY_CTX_set_hkdf_md(pctx, EVP_sha256()), 0)
+ || !TEST_int_gt(EVP_PKEY_CTX_set1_hkdf_salt(pctx, salt,
+ sizeof(salt) - 1), 0)
+ || !TEST_int_gt(EVP_PKEY_CTX_set1_hkdf_key(pctx, key,
+ sizeof(key) - 1), 0)
+ || !TEST_int_gt(EVP_PKEY_CTX_add1_hkdf_info(pctx, info,
+ sizeof(info) - 1), 0)
+ || !TEST_int_gt(EVP_PKEY_derive(pctx, out, &outlen), 0)
+ || !TEST_mem_eq(out, outlen, expected, expectedlen))
+ goto done;
+ }
+
+ ret = 1;
+
+ done:
+ EVP_PKEY_CTX_free(pctx);
+
+ return ret;
+}
+
int setup_tests(void)
{
ADD_TEST(test_EVP_DigestSignInit);
@@ -941,5 +986,6 @@ int setup_tests(void)
if (!TEST_int_eq(EVP_PKEY_meth_add0(custom_pmeth), 1))
return 0;
ADD_ALL_TESTS(test_EVP_PKEY_check, OSSL_NELEM(keycheckdata));
+ ADD_TEST(test_HKDF);
return 1;
}
|
BugID:17660006: Add Memory protect for stm32l4xx flash hal | @@ -302,9 +302,10 @@ int32_t hal_flash_write(hal_partition_t pno, uint32_t *poff, const void *buf , u
int32_t hal_flash_read(hal_partition_t pno, uint32_t *poff, void *buf, uint32_t buf_size)
{
- uint32_t start_addr;
+ uint32_t start_addr, len;
hal_logic_partition_t *partition_info;
hal_partition_t real_pno;
+ uint64_t *pdata;
real_pno = pno;
@@ -319,8 +320,19 @@ int32_t hal_flash_read(hal_partition_t pno, uint32_t *poff, void *buf, uint32_t
start_addr = FLASH_flat_addr(start_addr);
#endif
- FLASH_read_at(start_addr, buf, buf_size);
+ len = (((buf_size % 8) == 0) ? (buf_size / 8) : (buf_size / 8 + 1));
+ pdata = (uint64_t *)krhino_mm_alloc(len);
+ if (pdata == NULL) {
+ return -1;
+ }
+ memset(pdata, 0, len);
+
+ FLASH_read_at(start_addr, pdata, len);
+ memcpy((uint8_t *)buf, (uint8_t *)pdata, buf_size);
+
*poff += buf_size;
+ krhino_mm_free(pdata);
+ pdata = NULL;
return 0;
}
|
Don't change database 'devices' table timestamp for already existing entries
Therefore the timestamp reflects the creation date of an entry. | @@ -399,8 +399,7 @@ bool DeRestPluginPrivate::upgradeDbToUserVersion6()
return setDbUserVersion(6);
}
-/*! Puts a new top level device entry in the db (mac address) or refreshes and existing timestamp.
- The timestamp is used to keep track of ghost/replaced/removed devices.
+/*! Puts a new top level device entry in the db (mac address) or refreshes nwk address.
*/
void DeRestPluginPrivate::refreshDeviceDb(const deCONZ::Address &addr)
{
@@ -410,7 +409,7 @@ void DeRestPluginPrivate::refreshDeviceDb(const deCONZ::Address &addr)
}
QString sql = QString(QLatin1String(
- "UPDATE devices SET timestamp = strftime('%s','now'), nwk = %2 WHERE mac = '%1';"
+ "UPDATE devices SET nwk = %2 WHERE mac = '%1';"
"INSERT INTO devices (mac,nwk,timestamp) SELECT '%1', %2, strftime('%s','now') WHERE (SELECT changes() = 0);"))
.arg(generateUniqueId(addr.ext(), 0, 0)).arg(addr.nwk());
dbQueryQueue.push_back(sql);
|
[apps] Only define `__XPULPIMG` with GCC | @@ -41,6 +41,8 @@ ifeq ($(COMPILER),gcc)
ifeq ($(XPULPIMG),1)
RISCV_ARCH ?= rv$(RISCV_XLEN)imaXpulpimg
RISCV_ARCH_AS ?= $(RISCV_ARCH)
+ # Define __XPULPIMG if the extension is active
+ DEFINES += -D__XPULPIMG
else
RISCV_ARCH ?= rv$(RISCV_XLEN)ima
RISCV_ARCH_AS ?= $(RISCV_ARCH)Xpulpv2
@@ -67,11 +69,7 @@ RISCV_LD ?= $(RISCV_PREFIX)ld
RISCV_STRIP ?= $(RISCV_PREFIX)strip
# Defines
-DEFINES := -DNUM_CORES=$(num_cores) -DBOOT_ADDR=0x$(boot_addr) -DL2_BASE=0x$(l2_base) -DL2_SIZE=0x$(l2_size)
-# Define __XPULPIMG if the extension is active
-ifeq ($(XPULPIMG),1)
- DEFINES += -D__XPULPIMG
-endif
+DEFINES += -DNUM_CORES=$(num_cores) -DBOOT_ADDR=0x$(boot_addr) -DL2_BASE=0x$(l2_base) -DL2_SIZE=0x$(l2_size)
# Specify cross compilation target. This can be omitted if LLVM is built with riscv as default target
RISCV_LLVM_TARGET ?= --target=$(RISCV_TARGET) --sysroot=$(GCC_INSTALL_DIR)/$(RISCV_TARGET) --gcc-toolchain=$(GCC_INSTALL_DIR)
|
IPAddr: Mark arguments with `const` qualifier | #include <tests_plugin.h>
-static void testIP (const char * ip, int ret, char const * const version)
+static void testIP (char const * const ip, const int ret, char const * const version)
{
Key * parentKey = keyNew ("user/tests/ipaddr", KEY_VALUE, "", KEY_END);
KeySet * conf = ksNew (0, KS_END);
@@ -25,17 +25,17 @@ static void testIP (const char * ip, int ret, char const * const version)
PLUGIN_CLOSE ();
}
-static inline void testIPv6 (const char * ip, int ret)
+static inline void testIPv6 (char const * const ip, int ret)
{
testIP (ip, ret, "ipv6");
}
-static inline void testIPv4 (const char * ip, int ret)
+static inline void testIPv4 (char const * const ip, int ret)
{
testIP (ip, ret, "ipv4");
}
-static inline void testIPAny (const char * ip, int ret)
+static inline void testIPAny (char const * const ip, int ret)
{
testIP (ip, ret, "");
}
|
add "Mtrie mheap usage" in "show ip fib memory"
Adding "Mtrie mheap usage" in output of "show ip fib memory" command, for displaying the total Mtrie Mheap usage together with memery usage of each node and each table | @@ -643,11 +643,13 @@ ip4_show_fib (vlib_main_t * vm,
if (memory)
{
- uword mtrie_size, hash_size;
+ uword mtrie_size, hash_size, *old_heap;
+
mtrie_size = ip4_fib_mtrie_memory_usage(&fib->mtrie);
hash_size = 0;
+ old_heap = clib_mem_set_heap (ip4_main.mtrie_mheap);
for (i = 0; i < ARRAY_LEN (fib->fib_entry_by_dst_address); i++)
{
uword * hash = fib->fib_entry_by_dst_address[i];
@@ -656,6 +658,8 @@ ip4_show_fib (vlib_main_t * vm,
hash_size += hash_bytes(hash);
}
}
+ clib_mem_set_heap (old_heap);
+
if (verbose)
vlib_cli_output (vm, "%U mtrie:%d hash:%d",
format_fib_table_name, fib->index,
@@ -717,11 +721,14 @@ ip4_show_fib (vlib_main_t * vm,
}));
if (memory)
+ {
vlib_cli_output (vm, "totals: mtrie:%ld hash:%ld all:%ld",
total_mtrie_memory,
total_hash_memory,
total_mtrie_memory + total_hash_memory);
-
+ vlib_cli_output (vm, "\nMtrie Mheap Usage: %U\n",
+ format_mheap, ip4_main.mtrie_mheap, 1);
+ }
return 0;
}
|
try to add libreadline-dev | @@ -47,10 +47,10 @@ test_tools()
}
install_tools()
{
- { apt-get --version >/dev/null 2>&1 && $sudoprefix apt-get install -y git build-essential; } ||
- { yum --version >/dev/null 2>&1 && $sudoprefix yum install -y git && $sudoprefix yum groupinstall -y 'Development Tools'; } ||
- { zypper --version >/dev/null 2>&1 && $sudoprefix zypper --non-interactive install git && $sudoprefix zypper --non-interactive install -t pattern devel_C_C++; } ||
- { pacman -V >/dev/null 2>&1 && $sudoprefix pacman -S --noconfirm git base-devel; }
+ { apt-get --version >/dev/null 2>&1 && $sudoprefix apt-get install -y git build-essential libreadline-dev; } ||
+ { yum --version >/dev/null 2>&1 && $sudoprefix yum install -y git libreadline-dev && $sudoprefix yum groupinstall -y 'Development Tools'; } ||
+ { zypper --version >/dev/null 2>&1 && $sudoprefix zypper --non-interactive install git libreadline-dev && $sudoprefix zypper --non-interactive install -t pattern devel_C_C++; } ||
+ { pacman -V >/dev/null 2>&1 && $sudoprefix pacman -S --noconfirm git base-devel libreadline-dev; }
}
test_tools || { install_tools && test_tools; } || my_exit 'Dependencies Installation Fail' 1
branch=
|
luci-app-cpufreq: add default tweak for ipq60xx | @@ -22,6 +22,15 @@ case "$DISTRIB_TARGET" in
"ipq40xx/generic")
uci_write_config 0 ondemand 200000 716000 10 50
;;
+ "ipq60xx/generic")
+ if echo "$CPU_FREQS" | grep -q "1800000"; then
+ # IPQ6010/18/28
+ uci_write_config 0 ondemand 864000 1800000 10 50
+ else
+ # IPQ6000
+ uci_write_config 0 ondemand 864000 1200000 10 50
+ fi
+ ;;
"ipq806x/generic")
if echo "$CPU_FREQS" | grep -q "1725000"; then
# IPQ8065
|
fixed botched calls to array_list_get in test_linear_hash.c | @@ -348,7 +348,7 @@ test_linear_hash_correct_bucket_after_split(
/* assuming initial size of 5 so that key 5 hashes to bucket 0 using h0 */
int expected_hash_bucket = 0;
- ion_fpos_t expected_bucket_location = array_list_get(expected_hash_bucket, linear_hash);
+ ion_fpos_t expected_bucket_location = array_list_get(expected_hash_bucket, linear_hash->bucket_map);
/* resolve buck key 5 hashes to given the current linear_hash state - should be 0 */
int hash_idx = insert_hash_to_bucket(IONIZE(5, int), linear_hash);
@@ -357,7 +357,7 @@ test_linear_hash_correct_bucket_after_split(
hash_idx = hash_to_bucket(IONIZE(5, int), linear_hash);
}
- PLANCK_UNIT_ASSERT_TRUE(tc, expected_bucket_location == array_list_get(hash_idx, linear_hash));
+ PLANCK_UNIT_ASSERT_TRUE(tc, expected_bucket_location == array_list_get(hash_idx, linear_hash->bucket_map));
int i;
@@ -370,7 +370,7 @@ test_linear_hash_correct_bucket_after_split(
test_linear_hash_insert(tc, IONIZE(5, int), IONIZE(5, int), err_ok, 1, boolean_true, linear_hash);
expected_hash_bucket = 5;
- expected_bucket_location = array_list_get(expected_hash_bucket, linear_hash);
+ expected_bucket_location = array_list_get(expected_hash_bucket, linear_hash->bucket_map);
/* resolve buck key 5 hashes to given the current linear_hash state - should be 5 */
hash_idx = insert_hash_to_bucket(IONIZE(5, int), linear_hash);
@@ -380,7 +380,7 @@ test_linear_hash_correct_bucket_after_split(
}
/* assuming initial size of 5 so that key 5 hashes to bucket 5 using h1 */
- PLANCK_UNIT_ASSERT_TRUE(tc, expected_bucket_location == array_list_get(hash_idx, linear_hash));
+ PLANCK_UNIT_ASSERT_TRUE(tc, expected_bucket_location == array_list_get(hash_idx, linear_hash->bucket_map));
test_linear_hash_takedown(tc, linear_hash);
}
@@ -433,11 +433,26 @@ test_linear_hash_local_record_increments_decrements(
test_linear_hash_takedown(tc, linear_hash);
}
+/**
+@brief Tests some basic creation and destruction stuff for the flat file.
+*/
+void
+test_flat_file_create_destroy(
+ planck_unit_test_t *tc
+) {
+ linear_hash_table_t *linear_hash = alloca(sizeof(linear_hash_table_t));
+
+ test_linear_hash_setup(tc, linear_hash);
+
+ test_linear_hash_takedown(tc, linear_hash);
+}
+
planck_unit_suite_t *
linear_hash_getsuite(
) {
planck_unit_suite_t *suite = planck_unit_new_suite();
+ PLANCK_UNIT_ADD_TO_SUITE(suite, test_flat_file_create_destroy);
PLANCK_UNIT_ADD_TO_SUITE(suite, test_linear_hash_basic_operations);
PLANCK_UNIT_ADD_TO_SUITE(suite, test_linear_hash_bucket_map_head_updates);
PLANCK_UNIT_ADD_TO_SUITE(suite, test_linear_hash_increment_buckets);
|
Make test_alloc_realloc_default_attribute() robust vs allocation | @@ -9154,7 +9154,9 @@ START_TEST(test_alloc_realloc_default_attribute)
if (_XML_Parse_SINGLE_BYTES(parser, text, strlen(text),
XML_TRUE) != XML_STATUS_ERROR)
break;
- XML_ParserReset(parser, NULL);
+ /* See comment in test_alloc_parse_xdecl() */
+ alloc_teardown();
+ alloc_setup();
}
if (i == 0)
fail("Parse succeeded despite failing reallocator");
|
[mechanics] change the way we choose the normal in siconosBulletAdjustInternalEdgeContacts for 3D heightmap
- We assume that the normal to the triangle face must be upward. This should be consistent with the
fact heighmap defined only normal that are upward in the z direction. | @@ -2451,8 +2451,10 @@ static void siconosBulletAdjustInternalEdgeContacts(btManifoldPoint& cp, const b
// Option 2 - we take in any cases the normal to the triangle face
- btScalar cosine = oldNormal.dot(newNormal);
- if (cosine < 0.0)
+ // btScalar cosine = oldNormal.dot(newNormal);
+ // if (cosine < 0.0)
+ // We assume that the normal to the triangle face must be upward.
+ if (tri_normal.z() < 0.0)
{
newNormal = -1.0*tri_normal;
}
|
BugID:16846667: remove redefinition of ucli_command | #define CLI_ERR_INVALID -10002
#define CLI_ERR_BADCMD -10003
#define CLI_ERR_SYNTAX -10004
+#define CLI_ERR_CMDNOTEXIST -10005
#ifdef __cplusplus
extern "C" {
@@ -25,52 +26,12 @@ struct cli_command_st {
void (*function)(char *outbuf, int32_t len, int32_t argc, char **argv);
};
-#include <k_api.h>
#if (RHINO_CONFIG_UCLI > 0)
-struct ucli_command {
- klist_t node; /**< ucli cmd node */
- const struct cli_command_st *cmd; /**< cli cmd pointer */
- kbuf_queue_t *push_queue; /**< where the command should be pushed into */
- int owner_pid; /**< owner process ID */
-};
-
typedef struct {
- int argc; /**< ucli cmd argu count */
- char **argv; /**< ucli cmd argu vector */
+ int argc; /**< ucli cmd arg count */
+ char **argv; /**< ucli cmd arg vector */
void *func; /**< ucli cmd function pointer */
} ucli_msg_t;
-
-/**
- * @brief init process cli component
- *
- * @param[in] pid the process ID
- *
- * @return On success, return 0, else return -1
- */
-int cli_process_init(int pid);
-
-/**
- * @brief delete all the cli cmds regitered by the process
- *
- * @param[in] pid the process ID
- */
-void cli_process_exit(int pid);
-
-/**
- * @brief destory the process cli component
- *
- * @param[in] pid the process ID
- */
-void cli_process_destory(int pid);
-
-/**
- * @brief Get CLI user command list head
- *
- *
- * @return user command list head
- *
- */
-klist_t* cli_get_ucmd_list(void);
#endif
/**
|
doc: add 0.8 version to master branch
When 0.8 documents are published, we create a link to them from the
master branch where the /latest version of documentation is found. | @@ -189,13 +189,10 @@ else:
html_context = {
'current_version': current_version,
'versions': ( ("latest", "/latest/"),
+ ("0.8", "/0.8/"),
("0.7", "/0.7/"),
("0.6", "/0.6/"),
("0.5", "/0.5/"),
- ("0.4", "/0.4/"),
- ("0.3", "/0.3/"),
- ("0.2", "/0.2/"),
- ("0.1", "/0.1/"),
)
}
|
rstat: use tcp | @@ -7,6 +7,7 @@ import (
"strconv"
"fmt"
"strings"
+ "encoding/binary"
)
func prettyPrint(m, lastm map[string]uint64, interval int) {
@@ -50,12 +51,12 @@ func main() {
}
host := os.Args[1]
- uaddr, err := net.ResolveUDPAddr("udp4", host + ":40")
+ uaddr, err := net.ResolveTCPAddr("tcp4", host + ":40")
if err != nil {
os.Exit(1)
}
- c, err := net.DialUDP("udp", nil, uaddr)
+ c, err := net.DialTCP("tcp", nil, uaddr)
if err != nil {
os.Exit(1)
}
@@ -74,18 +75,13 @@ func main() {
if err != nil {
os.Exit(1)
}
-
- c.SetReadDeadline(time.Now().Add(time.Duration(100) * time.Millisecond))
- n, err := c.Read(buf[0:])
- if err != nil {
- if nerr, ok := err.(net.Error); ok && nerr.Timeout() {
- c.Close()
- c,err = net.DialUDP("udp", nil, uaddr)
+ n, err := c.Read(buf[0:8])
if err != nil {
os.Exit(1)
}
- continue
- }
+ datalen := binary.LittleEndian.Uint64(buf[0:8])
+ n, err = c.ReadFull(buf[0:datalen])
+ if err != nil {
os.Exit(1)
}
strs := strings.Split(string(buf[0:n-1]), ",")
|
Testing: Fix test for AppVeyor | @@ -53,8 +53,9 @@ if test "x$NC_DUMPER" != "x"; then
grep -q "short tp_0001" $tempText
fi
+if [ $ECCODES_ON_WINDOWS -eq 0 ]; then
echo "Test HDF5 decoding ..."
-# -------------------------
+ # ---------------------------
# Note: this is only available in NetCDF-4. So need to check if the command worked with -k3
input=${data_dir}/sample.grib2
set +e
@@ -66,7 +67,7 @@ if [ $stat -eq 0 ]; then
res=`${tools_dir}/grib_get -TA -p identifier,versionNumberOfSuperblock $tempNetcdf`
[ "$res" = "HDF5 0" ]
fi
-
+fi
grib_files="\
regular_latlon_surface.grib2 \
|
avoid warning when not logging state | @@ -360,8 +360,7 @@ static void resp_on_sub_message(struct redis_engine_internal_s *i, FIOBJ msg) {
fiobj_obj2cstr(msg).data[0] != 'P') {
FIO_LOG_WARNING("(redis) unexpected data format in "
"subscription stream:");
- fio_str_info_s tmp = fiobj_obj2cstr(msg);
- FIO_LOG_STATE(" %s\n", tmp.data);
+ FIO_LOG_STATE(" %s\n", fiobj_obj2cstr(msg).data);
}
} else {
// FIOBJ *ary = fiobj_ary2ptr(msg);
|
Modifies ChangeLog
Corrects erroneous removal from ChangeLog. | @@ -1686,6 +1686,16 @@ Changes
= mbed TLS 2.8.0 branch released 2018-03-16
+Default behavior changes
+ * The truncated HMAC extension now conforms to RFC 6066. This means
+ that when both sides of a TLS connection negotiate the truncated
+ HMAC extension, Mbed TLS can now interoperate with other
+ compliant implementations, but this breaks interoperability with
+ prior versions of Mbed TLS. To restore the old behavior, enable
+ the (deprecated) option MBEDTLS_SSL_TRUNCATED_HMAC_COMPAT in
+ config.h. Found by Andreas Walz (ivESK, Offenburg University of
+ Applied Sciences).
+
Security
* Fix implementation of the truncated HMAC extension. The previous
implementation allowed an offline 2^80 brute force attack on the
|
Minor bug corrected in reflect attribute. | @@ -57,6 +57,7 @@ attribute attribute_create(klass cls, const char *name, type t, attribute_impl i
attr->name = NULL;
}
+ attr->cls = cls;
attr->t = t;
attr->impl = impl;
attr->visibility = visibility;
|
Work CI-CD
Fix check for running the build. (was wrongly skipping builds because of time differences on time zone).
***NO_CI*** | @@ -44,7 +44,8 @@ jobs:
$commitDate = git show -s --format=%cd --date=short
$commitDate = [DateTime]$commitDate
- if($commitDate -eq [System.DateTime]::UtcNow.Date)
+ # shceduled build is at start of day, so check if commit date was from yesterday
+ if($commitDate -eq [System.DateTime]::UtcNow.AddDays(-1).Date)
{
# last commit is from today, build images
echo "##vso[task.setvariable variable=CHECK_CHANGES;isOutput=true]true"
|
native: catch undefined syms in object files
Add -Wl,-zdefs to the linker flags. | @@ -56,6 +56,11 @@ LDFLAGS += -Wl,-export-dynamic
endif
endif
+# Disallow undefined symbols in object files.
+ifeq ($(HOST_OS),Linux)
+LDFLAGS += -Wl,-zdefs
+endif
+
MAKE_MAC ?= MAKE_MAC_NULLMAC
### Compilation rules
|
component/bt: Using osi_malloc instead of malloc | @@ -478,7 +478,7 @@ static void btc_gap_bt_search_services(char *p_param)
param.rmt_srvcs.stat = ESP_BT_STATUS_FAIL;
if (p_data->p_data->disc_res.result == BTA_SUCCESS) {
- uuid_list = malloc(sizeof(esp_bt_uuid_t) * p_data->p_data->disc_res.num_uuids);
+ uuid_list = osi_malloc(sizeof(esp_bt_uuid_t) * p_data->p_data->disc_res.num_uuids);
if (uuid_list) {
param.rmt_srvcs.stat = ESP_BT_STATUS_SUCCESS;
param.rmt_srvcs.num_uuids = p_data->p_data->disc_res.num_uuids;
|
Reused address info struct incorrectly
Wrongly assumed that `ai` was done being used before binding, it's not,
so create a separate address info for binding... | @@ -420,17 +420,18 @@ JANET_CORE_FN(cfun_net_connect,
}
}
- ai = NULL;
+ /* Check if we're binding address */
+ struct addrinfo *binding = NULL;
if (argc >= 3 && is_unix == 0) {
if (argc == 4 || !janet_checktype(argv[2], JANET_KEYWORD)) {
- ai = janet_get_addrinfo(argv, 0, socktype, 0, &is_unix, 1);
+ binding = janet_get_addrinfo(argv, 0, socktype, 0, &is_unix, 1);
}
}
- if (ai != NULL) {
+ if (binding != NULL) {
/* Check all addrinfos in a loop for the first that we can bind to. */
struct addrinfo *rp = NULL;
- for (rp = ai; rp != NULL; rp = rp->ai_next) {
+ for (rp = binding; rp != NULL; rp = rp->ai_next) {
#ifdef JANET_WINDOWS
sock = WSASocketW(rp->ai_family, rp->ai_socktype | JSOCKFLAGS, rp->ai_protocol, NULL, 0, WSA_FLAG_OVERLAPPED);
#else
@@ -442,7 +443,7 @@ JANET_CORE_FN(cfun_net_connect,
if (bind(sock, rp->ai_addr, (int) rp->ai_addrlen) == 0) break;
JSOCKCLOSE(sock);
}
- freeaddrinfo(ai);
+ freeaddrinfo(binding);
if (NULL == rp) {
janet_panic("could not bind outgoing address");
}
|
Temporarily change invocation of scope start for debug | #define LDSCOPE_CONFIG_IN_HOST "/usr/lib/appscope/scope_filter.yml" // TODO
#define VALID_NS_DEPTH 2
#define SCOPE_CRONTAB "* * * * * root /tmp/scope_att.sh\n"
-#define SCOPE_CRON_SCRIPT "#! /bin/bash\ntouch /tmp/scope_test\nrm /etc/cron.d/scope_cron\n%s start < %s/scope_filter.yml\n"
+#define SCOPE_CRON_SCRIPT "#! /bin/bash\ntouch /tmp/scope_test\nrm /etc/cron.d/scope_cron\n%s start %s/scope_filter.yml\n"
#define SCOPE_CRON_PATH "/etc/cron.d/scope_cron"
#define SCOPE_SCRIPT_PATH "/tmp/scope_att.sh"
#define SCOPE_EXEC_PATH "/usr/lib/appscope" // TODO: not correct, needs to be dynamic
|
ACRN:DM: Add extra path header definition to support cross-compiler building
The virtio-gpu needs to include some system header files.
In order to support the cross-compiler building, the header
path is added.
Reported-by: Naveen Kumar Saine | @@ -39,10 +39,10 @@ CFLAGS += -I$(BASEDIR)/include
CFLAGS += -I$(BASEDIR)/include/public
CFLAGS += -I$(DM_OBJDIR)/include
CFLAGS += -I$(TOOLS_OUT)/services
-CFLAGS += -I/usr/include/pixman-1
-CFLAGS += -I/usr/include/glib-2.0
-CFLAGS += -I/usr/include/SDL2
-CFLAGS += -I/usr/include/EGL
+CFLAGS += -I$(SYSROOT)/usr/include/pixman-1
+CFLAGS += -I$(SYSROOT)/usr/include/glib-2.0
+CFLAGS += -I$(SYSROOT)/usr/include/SDL2
+CFLAGS += -I$(SYSROOT)/usr/include/EGL
ifneq (, $(DM_ASL_COMPILER))
CFLAGS += -DASL_COMPILER=\"$(DM_ASL_COMPILER)\"
|
tests: internal: network: macos: Add small waiting for proceeding timer tick | #include <fluent-bit/flb_error.h>
#include <fluent-bit/flb_network.h>
#include <fluent-bit/flb_socket.h>
+#include <fluent-bit/flb_time.h>
#include <time.h>
#include "flb_tests_internal.h"
@@ -85,6 +86,12 @@ static void test_client_server(int is_ipv6)
TEST_CHECK(ret == -1);
TEST_CHECK(errno == EINPROGRESS);
+#ifdef FLB_SYSTEM_MACOS
+ /* On macOS, its internal timer's is inacccurate without waiting code.
+ * We need to proceed its timer tick for processing events. */
+ flb_time_msleep(50);
+#endif
+
/* Event loop */
while (1) {
mk_event_wait(evl);
|
hv: ept: correct EPT mapping gpa check
The previous will not check the EPT gpa correctly. This patch try to fix this.
Acked-by: Anthony Xu | @@ -655,9 +655,10 @@ static int32_t set_vm_memory_region(struct acrn_vm *vm,
ret = -EINVAL;
} else {
gpa_end = region->gpa + region->size;
- if (gpa_end > vm->arch_vm.ept_mem_ops.info->ept.top_address_space) {
+ if (gpa_end > target_vm->arch_vm.ept_mem_ops.info->ept.top_address_space) {
pr_err("%s, invalid gpa: 0x%llx, size: 0x%llx, top_address_space: 0x%llx", __func__,
- region->gpa, region->size, vm->arch_vm.ept_mem_ops.info->ept.top_address_space);
+ region->gpa, region->size,
+ target_vm->arch_vm.ept_mem_ops.info->ept.top_address_space);
ret = 0;
} else {
dev_dbg(ACRN_DBG_HYCALL,
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.