message
stringlengths 6
474
| diff
stringlengths 8
5.22k
|
---|---|
tools: fix cmake build script for sdkconfig test | @@ -156,7 +156,7 @@ function run_tests()
idf.py build
take_build_snapshot
# need to actually change config, or cmake is too smart to rebuild
- sed -i s/CONFIG_FREERTOS_UNICORE=/CONFIG_FREERTOS_UNICORE=y/ sdkconfig
+ sed -i s/^\#\ CONFIG_FREERTOS_UNICORE\ is\ not\ set/CONFIG_FREERTOS_UNICORE=y/ sdkconfig
idf.py build
# check the sdkconfig.h file was rebuilt
assert_rebuilt config/sdkconfig.h
|
Fix crashes with :save'd vectors in LuaJIT; | @@ -45,7 +45,7 @@ float* luax_tomathtype(lua_State* L, int index, MathType* type) {
lua_pop(L, 1);
lua_getfield(L, index, "_p");
- float* p = *(float**) lua_topointer(L, index);
+ float* p = *(float**) lua_topointer(L, -1);
lua_pop(L, 1);
return p;
}
|
Do not inherit loop struct when defining a new compiler | @@ -161,7 +161,6 @@ static void initCompiler(Parser *parser, Compiler *compiler, Compiler *parent, F
if (parent != NULL) {
compiler->class = parent->class;
- compiler->loop = parent->loop;
}
compiler->type = type;
@@ -2141,6 +2140,7 @@ static void forStatement(Compiler *compiler) {
}
static void breakStatement(Compiler *compiler) {
+ printf("%s\n", compiler->loop == NULL ? "null" : "no");
if (compiler->loop == NULL) {
error(compiler->parser, "Cannot utilise 'break' outside of a loop.");
return;
|
install-config-file: Add resolver as required plugin | @@ -25,7 +25,7 @@ endif (CMAKE_COMPILER_IS_GNUCXX AND CMAKE_CXX_COMPILER_VERSION VERSION_LESS 4.9)
add_msr_test (tutorial_arrays "${CMAKE_SOURCE_DIR}/doc/tutorials/arrays.md")
add_msr_test (tutorial_cascading "${CMAKE_SOURCE_DIR}/doc/tutorials/cascading.md")
add_msr_test (tutorial_storage_plugins "${CMAKE_SOURCE_DIR}/doc/tutorials/storage-plugins.md" REQUIRED_PLUGINS type yamlcpp)
-add_msr_test (tutorial_install_config "${CMAKE_SOURCE_DIR}/doc/tutorials/install-config-files.md" REQUIRED_PLUGINS ini)
+add_msr_test (tutorial_install_config "${CMAKE_SOURCE_DIR}/doc/tutorials/install-config-files.md" REQUIRED_PLUGINS ini resolver)
if (ENABLE_ASAN)
message (STATUS "Excluding Markdown Shell Recorder test for `validation`, as it leaks memory and fails with ASAN enabled")
|
Update TCP client test. | import time
import select
import socket
+from datetime import timedelta
-UPLOAD_LEN = 5*1024
-DOWNLOAD_LEN = 10*1024
+UPLOAD_LEN = 1*1024
+DOWNLOAD_LEN = 1*1024
ADDR=('192.168.1.103', 8080)
def recvall(sock, n):
@@ -31,10 +32,13 @@ s.connect(ADDR)
upload = 0
download = 0
+start_time = time.monotonic()
while (True):
s.sendall(b'0' * UPLOAD_LEN)
buf = recvall(s, DOWNLOAD_LEN)
upload += UPLOAD_LEN
download += DOWNLOAD_LEN
- print("Upload: %.3f MBytes Download: %.3f MBytes" %(upload/(1024*1024), download/(1024*1024)))
+ secs = time.monotonic() - start_time
+ print("%s Upload: %.3f MBytes Download: %.3f MBytes %.3f MBytes/s"
+ %(str(timedelta(seconds=secs)), upload/(1024*1024), download/(1024*1024), (upload+download)/(1024*1024)/secs))
s.close()
|
board/nocturne/usb_pd_policy.c: Format with clang-format
BRANCH=none
TEST=none | @@ -25,8 +25,7 @@ int pd_check_vconn_swap(int port)
return gpio_get_level(GPIO_EN_5V);
}
-__override void pd_execute_data_swap(int port,
- enum pd_data_role data_role)
+__override void pd_execute_data_swap(int port, enum pd_data_role data_role)
{
int level;
@@ -96,8 +95,7 @@ int pd_set_power_supply_ready(int port)
__override void svdm_safe_dp_mode(int port)
{
/* make DP interface safe until configure */
- usb_mux_set(port, USB_PD_MUX_NONE,
- USB_SWITCH_CONNECT,
+ usb_mux_set(port, USB_PD_MUX_NONE, USB_SWITCH_CONNECT,
polarity_rm_dts(pd_get_polarity(port)));
/*
|
fix almost zero-weights division in doc-parallel mode | @@ -131,7 +131,7 @@ namespace NKernel {
__forceinline__ __device__ void NextFeature(TCBinFeature bf) {
FeatureId = bf.FeatureId;
Score = 0;
- DenumSqr = 0;
+ DenumSqr = 1e-20f;
}
__forceinline__ __device__ void AddLeaf(double sum, double weight) {
@@ -143,7 +143,7 @@ namespace NKernel {
}
__forceinline__ __device__ float GetScore() {
- float score = DenumSqr > 0 ? -Score / sqrt(DenumSqr) : FLT_MAX;
+ float score = DenumSqr > 1e-15f ? -Score / sqrt(DenumSqr) : FLT_MAX;
if (ScoreStdDev) {
ui64 seed = GlobalSeed + FeatureId;
AdvanceSeed(&seed, 4);
@@ -361,7 +361,7 @@ namespace NKernel {
TPartitionStatistics part = LdgWithFallback(parts, helper.GetDataPartitionOffset(leaf, 0));
float weightLeft = histLoader.LoadWeight(leaf);
- float weightRight = static_cast<float>(part.Weight < weightLeft ? 0 : part.Weight - weightLeft);
+ float weightRight = max(part.Weight - weightLeft, 0.0f);
float sumLeft = histLoader.LoadSum(leaf);
float sumRight = static_cast<float>(part.Sum - sumLeft);
@@ -470,7 +470,7 @@ namespace NKernel {
}
}
- score = denumSqr > 0 ? -score / sqrt(denumSqr) : FLT_MAX;
+ score = denumSqr > 1e-15f ? -score / sqrt(denumSqr) : FLT_MAX;
float tmp = score;
if (scoreStdDev) {
ui64 seed = globalSeed + bf[i + tid].FeatureId;
|
pipe: add support for non-blocking operation
This is needed by Redis (ticket | @@ -122,6 +122,10 @@ static sysreturn pipe_read_bh(pipe_file pf, thread t, void *dest, u64 length,
if (real_length == 0) {
if (pf->pipe->files[PIPE_WRITE].fd == -1)
goto out;
+ if (pf->f.flags & O_NONBLOCK) {
+ real_length = -EAGAIN;
+ goto out;
+ }
return infinity;
}
@@ -171,6 +175,10 @@ static sysreturn pipe_write_bh(pipe_file pf, thread t, void *dest, u64 length,
rv = -EPIPE;
goto out;
}
+ if (pf->f.flags & O_NONBLOCK) {
+ rv = -EAGAIN;
+ goto out;
+ }
return infinity;
}
|
zephyr: driver: kx022: Add CONFIG_ACCEL_KX022
The config value is needed by the common accel_kionix.c module.
BRANCH=none
TEST=zmake testall | #define CONFIG_ACCEL_BMA255
#endif
+#undef CONFIG_ACCEL_KX022
+#ifdef CONFIG_PLATFORM_EC_ACCEL_KX022
+#define CONFIG_ACCEL_KX022
+#endif
+
#undef CONFIG_ALS_TCS3400
#ifdef CONFIG_PLATFORM_EC_ALS_TCS3400
#define CONFIG_ALS_TCS3400
|
Default id when adding music | @@ -211,6 +211,8 @@ class ScriptEditor extends Component {
].id;
} else if (field.defaultValue === "LAST_FLAG") {
memo[field.key] = this.props.flags[this.props.flags.length - 1].id;
+ } else if (field.defaultValue === "LAST_MUSIC") {
+ memo[field.key] = this.props.music[0].id;
} else if (field.defaultValue !== undefined) {
memo[field.key] = field.defaultValue;
}
@@ -311,7 +313,8 @@ ScriptEditor.defaultProps = {
function mapStateToProps(state) {
return {
flags: state.project.present && state.project.present.flags,
- scenes: state.project.present && state.project.present.scenes
+ scenes: state.project.present && state.project.present.scenes,
+ music: state.project.present && state.project.present.music,
};
}
|
h2olog: fix a crash by double-free memory
amended | @@ -299,7 +299,7 @@ static std::string do_resolve(const char *struct_type, const char *field_name, c
fprintf(mem, "#define typeof_%s %s\n", name, field_type);
fprintf(mem, "#define get_%s(st) *((const %s *) ((const char*)st + offsetof_%s))\n", name, field_type, name);
fprintf(mem, "\n");
- fclose(mem);
+ fflush(mem);
std::string s(buff, buff_len);
fclose(mem);
return s;
|
[BSP][at91sam9260] Cleanup Code. | @@ -48,6 +48,8 @@ static int rt_led_app_init(void);
int main(void)
{
+ int timeout = 0;
+
/* Filesystem Initialization */
#ifdef RT_USING_DFS
{
@@ -74,21 +76,27 @@ int main(void)
rt_mmcsd_core_init();
rt_mmcsd_blk_init();
at91_mci_init();
- rt_thread_delay(RT_TICK_PER_SECOND*2);
+ timeout = 0;
+ while ((rt_device_find("sd0") == RT_NULL) && (timeout++ < RT_TICK_PER_SECOND*2))
+ {
+ rt_thread_delay(1);
+ }
+
+ if (timeout < RT_TICK_PER_SECOND*2)
+ {
/* mount sd card fat partition 1 as root directory */
if (dfs_mount("sd0", "/", "elm", 0, 0) == 0)
{
rt_kprintf("File System initialized!\n");
}
else
- rt_kprintf("File System initialzation failed!\n");
-#endif
+ rt_kprintf("File System initialzation failed!%d\n", rt_get_errno());
}
-#endif
-
-#ifdef RT_USING_I2C
+ else
{
- rt_i2c_core_init();
+ rt_kprintf("No SD card found.\n");
+ }
+#endif
}
#endif
|
Add Windows SCons builds to GitHub workflows. | @@ -6,6 +6,10 @@ on:
release:
types: [created]
+defaults:
+ run:
+ shell: bash
+
jobs:
build:
@@ -14,7 +18,7 @@ jobs:
strategy:
fail-fast: false
matrix:
- os: [ubuntu-20.04]
+ os: [ubuntu-20.04, windows-2019]
scons-options: ['ARCH=x86_64']
experimental: [false]
include:
@@ -24,6 +28,9 @@ jobs:
- os: 'macos-10.15'
scons-options: 'ARCH=x86_64'
experimental: false
+ - os: 'windows-2019'
+ scons-options: 'ARCH=x86'
+ experimental: false
steps:
- uses: actions/checkout@v2
|
Tweak docstring for math/rng-uniform | @@ -141,8 +141,7 @@ JANET_CORE_FN(cfun_rng_make,
JANET_CORE_FN(cfun_rng_uniform,
"(math/rng-uniform rng)",
- "Extract a random random integer in the range [0, max] from the RNG. If "
- "no max is given, the default is 2^31 - 1."
+ "Extract a random integer in the range [0, 1) from the RNG."
) {
janet_fixarity(argc, 1);
JanetRNG *rng = janet_getabstract(argv, 0, &janet_rng_type);
|
Don't prepend /proc/PID/root to user-supplied USDT binary paths starting with /proc already | @@ -279,7 +279,7 @@ std::string Context::resolve_bin_path(const std::string &bin_path) {
::free(which_so);
}
- if (!result.empty() && pid_ && *pid_ != -1) {
+ if (!result.empty() && pid_ && *pid_ != -1 && result.find("/proc") != 0) {
result = tfm::format("/proc/%d/root%s", *pid_, result);
}
|
fix update docs. Thanks to and | @@ -37,7 +37,7 @@ Option Description
============= ================================================================
**-fq2** FASTQ for second end. Used if BAM contains paired-end data.
BAM should be sorted by query name
- (``samtools sort -n aln.bam aln.qsort``) if creating
+ (``samtools sort -n -o aln.qsort.bam aln.bam``) if creating
paired FASTQ with this option.
**-tags** Create FASTQ based on the mate info in the BAM R2 and Q2 tags.
============= ================================================================
|
Fix reference bug from commit | @@ -728,7 +728,7 @@ VOID PhInitializeCapabilityGuidCache(
guidString = capabilityGuidList->Items[ii];
PhSetReference(&entry.Name, subKeyName);
- entry.CapabilityGuid = guidString;
+ PhSetReference(&entry.CapabilityGuid, guidString);
PhAddItemArray(&PhpCapGuidArrayList, &entry);
}
|
[bug fixed] add mutex values' overflow-check code | * 2020-07-29 Meco Man fix thread->event_set/event_info when received an
* event without pending
* 2020-10-11 Meco Man add semaphore values' overflow-check code
- * in the function of rt_sem_release
+ * 2020-10-21 Meco Man add mutex values' overflow-check code
*/
#include <rtthread.h>
@@ -696,11 +696,19 @@ rt_err_t rt_mutex_take(rt_mutex_t mutex, rt_int32_t time)
thread->error = RT_EOK;
if (mutex->owner == thread)
+ {
+ if(mutex->hold < 255u)
{
/* it's the same thread */
mutex->hold ++;
}
else
+ {
+ rt_hw_interrupt_enable(temp); /* enable interrupt */
+ return -RT_EFULL; /* value overflowed */
+ }
+ }
+ else
{
#ifdef RT_USING_SIGNALS
__again:
|
Remove compiler warning if only MBEDTLS_PK_PARSE_C is defined
Warning reported with IAR compiler:
"mbedtls\library\pkparse.c",1167 Warning[Pe550]: variable "ret" was set but never used | @@ -1370,8 +1370,8 @@ int mbedtls_pk_parse_key( mbedtls_pk_context *pk,
}
#endif /* MBEDTLS_PKCS12_C || MBEDTLS_PKCS5_C */
- if( ( ret = pk_parse_key_pkcs8_unencrypted_der(
- pk, key, keylen, f_rng, p_rng ) ) == 0 )
+ ret = pk_parse_key_pkcs8_unencrypted_der( pk, key, keylen, f_rng, p_rng );
+ if( ret == 0 )
{
return( 0 );
}
|
fix(x: usedfont): check font to use on every zoom, not only on x init | @@ -245,7 +245,6 @@ typedef struct {
static Fontcache *frc = NULL;
static int frclen = 0;
static int frccap = 0;
-static char *usedfont = NULL;
static double usedfontsize = 0;
static double defaultfontsize = 0;
@@ -261,6 +260,12 @@ static char *opt_title = NULL;
static int oldbutton = 3; /* button event on startup: 3 = release */
+char*
+getusedfont()
+{
+ return (opt_font == NULL)? font : opt_font;
+}
+
void
clipcopy(const Arg *dummy)
{
@@ -312,7 +317,7 @@ void
zoomabs(const Arg *arg)
{
xunloadfonts();
- xloadfonts(usedfont, arg->f);
+ xloadfonts(getusedfont(), arg->f);
cresize(0, 0);
redraw();
xhints();
@@ -1169,8 +1174,7 @@ xinit(int cols, int rows)
if (!FcInit())
die("could not init fontconfig.\n");
- usedfont = (opt_font == NULL)? font : opt_font;
- xloadfonts(usedfont, 0);
+ xloadfonts(getusedfont(), 0);
/* colors */
xw.cmap = XCreateColormap(xw.dpy, parent, xw.vis, None);
|
Use NS_BLOCK_ASSERTIONS for SwiftPM release builds
Xcode doesn't automatically set the NS_BLOCK_ASSERTIONS flag for SwiftPM release builds.
Use cSettings to set the flag, so NSAssert doesn't crash release builds and behavior is similar to using Carthage or Cocoapods.
See for more info. | @@ -32,7 +32,8 @@ let package = Package(
name: "TrustKit",
dependencies: [],
path: "TrustKit",
- publicHeadersPath: "public"
+ publicHeadersPath: "public",
+ cSettings: [.define("NS_BLOCK_ASSERTIONS", to: "1", .when(configuration: .release))]
),
]
)
|
Fix error in strncmp() | @@ -126,7 +126,7 @@ Elektra * elektraOpen (const char * application, KeySet * defaults, KeySet * con
// All warnings are available as array items of array "warnings" in parentKey.
const Key * currentMetaKey = ksAtCursor(parentKeyMeta, metaIt);
// If the meta key name starts with "warnings", it is a warning.
- bool isWarning = strncmp(keyName(currentMetaKey), "warnings", strlen("warnings"));
+ bool isWarning = strncmp(keyName(currentMetaKey), "meta:/warnings", strlen("meta:/warnings")) == 0;
size_t baseNameSize = keyGetBaseNameSize (currentMetaKey);
char * kBaseName = elektraMalloc (baseNameSize * sizeof (char));
|
Cope with new syscall ABI. | @@ -87,10 +87,15 @@ _sys$__osx_gettimeofday:
jae .gettimeofdaysuccess
negq %rax
+ ret
.gettimeofdaysuccess:
- movq %rax, (%rdi)
+ cmpq $0,%rax
+ je .noreg
+
+ movq %rax,0(%rdi)
movl %edx,8(%rdi)
xorq %rax,%rax
+.noreg:
ret
|
Bound checks for the parameters passed to the emulator added. | @@ -972,6 +972,7 @@ static void ccl_cosmology_compute_power_emu(ccl_cosmology * cosmo, int * status)
double * xstar = malloc(9 * sizeof(double));
double * z = ccl_linear_spacing(amin,amax, na);
double * y2d = malloc(351 * na * sizeof(double));
+ double w0wacomb;
if (z==NULL || y2d==NULL || logx==NULL || xstar==NULL){
*status=CCL_ERROR_MEMORY;
strcpy(cosmo->status_message,"ccl_power.c: ccl_cosmology_compute_power_emu(): memory allocation error\n");
@@ -981,6 +982,17 @@ static void ccl_cosmology_compute_power_emu(ccl_cosmology * cosmo, int * status)
//TMP:
double Omega_nu=0.;
//Check ranges:
+ if((cosmo->params.h<0.55) || (cosmo->params.h>0.85)){
+ *status=CCL_ERROR_INCONSISTENT;
+ strcpy(cosmo->status_message,"ccl_power.c: ccl_cosmology_compute_power_emu(): h is outside allowed range\n");
+ return;
+ }
+ w0wacomb=-cosmo->params.w0-cosmo->params.wa;
+ if(w0wacomb<0.3*0.3*0.3*0.3){
+ *status=CCL_ERROR_INCONSISTENT;
+ strcpy(cosmo->status_message,"ccl_power.c: ccl_cosmology_compute_power_emu(): w0 and wa do not satisfy the emulator bound\n");
+ return;
+ }
//For each redshift:
for (int j = 0; j < na; j++){
|
Fix crash when line of multiline text dialogue is empty | @@ -57,7 +57,7 @@ export const compile = (input, helpers) => {
textRestoreCloseSpeed();
}
- textDialogue(rowText, input.avatarId);
+ textDialogue(rowText || " ", input.avatarId);
// After first box, make open instant
if (j === 0) {
@@ -69,6 +69,6 @@ export const compile = (input, helpers) => {
}
}
} else {
- textDialogue(input.text, input.avatarId);
+ textDialogue(input.text || " ", input.avatarId);
}
};
|
add user comment | @@ -57,6 +57,6 @@ func runCmdFlags(cmd *cobra.Command, rc *run.Config) {
cmd.Flags().BoolVarP(&rc.Payloads, "payloads", "p", false, "Capture payloads of network transactions")
cmd.Flags().StringVar(&rc.Loglevel, "loglevel", "", "Set ldscope log level (debug, warning, info, error, none)")
cmd.Flags().StringVarP(&rc.LibraryPath, "librarypath", "l", "", "Set path for dynamic libraries")
- cmd.Flags().StringVarP(&rc.UserConfig, "userconfig", "u", "", "Run ldscope with a user specified config file.")
+ cmd.Flags().StringVarP(&rc.UserConfig, "userconfig", "u", "", "Run ldscope with a user specified config file. Overrides all other settings.")
metricAndEventDestFlags(cmd, rc)
}
|
refactors response headers | @@ -171,6 +171,25 @@ _octs_to_h2o(u3_noun oct)
return vec_u;
}
+static void
+_xx_write_header(u3_noun hed, h2o_req_t* req_u)
+{
+ u3_noun nam = u3h(hed);
+ u3_noun val = u3t(hed);
+ c3_w nam_w = u3r_met(3, nam);
+ c3_w val_w = u3r_met(3, val);
+ c3_c* nam_c = c3_malloc(nam_w);
+ c3_c* val_c = c3_malloc(val_w);
+
+ u3r_bytes(0, nam_w, (c3_y*)nam_c, nam);
+ u3r_bytes(0, val_w, (c3_y*)val_c, val);
+
+ h2o_add_header_by_str(&req_u->pool, &req_u->res.headers,
+ nam_c, nam_w, 0, NULL, val_c, val_w);
+
+ free(nam_c);
+ free(val_c);
+}
/* _xx_write_response(): write +=httr to h2o_req_t->res and send
*/
@@ -183,21 +202,10 @@ _xx_write_response(u3_noun rep, h2o_req_t* req_u)
uL(fprintf(uH, "strange response\n"));
}
else {
- u3_noun hed;
- c3_c* nam;
- c3_c* val;
-
req_u->res.status = p_rep;
while ( u3_nul != q_rep ) {
- hed = u3h(q_rep);
- nam = u3r_string(u3h(hed));
- val = u3r_string(u3t(hed));
- h2o_add_header(&req_u->pool, &req_u->res.headers,
- h2o_lookup_token(nam, u3r_met(3, u3h(hed))), NULL, H2O_STRLIT(val));
-
- free(nam);
- free(val);
+ _xx_write_header(u3h(q_rep), req_u);
q_rep = u3t(q_rep);
}
|
pbio/trajectory: cover case speed already reached
This case was already covered because acceleration phase is skipped when t1mt0 = 0. But by making it explicit, it is easier to read the logs. | @@ -89,13 +89,20 @@ pbio_error_t make_trajectory_time_based(int32_t t0, int32_t t3, int32_t th0, int
ref->w1 = timest(a, t3mt0)/2+w0/2;
}
}
- // Initial speed is equal to or more than the target speed
- else {
+ // Initial speed is more than the target speed
+ else if (w0 > wt) {
// Therefore decelerate
ref->a0 = -a;
t1mt0 = wdiva(w0-wt, a);
ref->w1 = wt;
}
+ // Initial speed is equal to the target speed
+ else {
+ // Therefore no acceleration
+ ref->a0 = 0;
+ t1mt0 = 0;
+ ref->w1 = wt;
+ }
// # Deceleration phase
ref->a2 = -a;
|
build: define PB_NO_PACKED_STRUCTS for nanopb not to pack structures
This commit fixes linking issues on macOS Monteray. | @@ -50,6 +50,7 @@ add_project_arguments(
]),
'-DCRITERION_BUILDING_DLL=1',
'-DPB_ENABLE_MALLOC=1',
+ '-DPB_NO_PACKED_STRUCTS=1',
'-D_GNU_SOURCE',
language: ['c', 'cpp'])
@@ -174,7 +175,7 @@ if not nanopb.found()
cmake_options: [
'-Dnanopb_BUILD_GENERATOR=OFF',
'-DBUILD_SHARED_LIBS=OFF',
- '-DCMAKE_C_FLAGS=-DPB_ENABLE_MALLOC',
+ '-DCMAKE_C_FLAGS=-DPB_ENABLE_MALLOC=1 -DPB_NO_PACKED_STRUCTS=1',
'-DCMAKE_POSITION_INDEPENDENT_CODE=ON',
])
nanopb = nanopb_proj.dependency('protobuf-nanopb-static')
|
Queue save sensor state to database after Xiaomi hourly report | @@ -6993,6 +6993,8 @@ void DeRestPluginPrivate::handleZclAttributeReportIndicationXiaomiSpecial(const
if (updated)
{
updateSensorEtag(&sensor);
+ sensor.setNeedSaveDatabase(true);
+ queSaveDb(DB_SENSORS , DB_HUGE_SAVE_DELAY);
}
}
}
|
Add a bunch of todo comments to JTAG tests
[ci skip] | @@ -40,6 +40,10 @@ INST_READ_DATA = 5
INST_WRITE_DATA = 6
INST_BYPASS = 15
+# XXX need to test that the TAP powers up with the proper instruction (BYPASS)
+
+# XXX The process classes are very similar to those found in LLDB. Can these be made
+# more general and moved into test_harness.py
class VerilatorProcess(object):
"""
@@ -61,6 +65,8 @@ class VerilatorProcess(object):
self.hexfile
]
+ # XXX in the event of an error, would like to capture the output of verilator
+ # and report in exception.
if DEBUG:
self.output = None
else:
|
Add movie.py to skip list since it hangs all future parallel tests. | {"category":"hybrid","file":"clonecopy.py"},
{"category":"hybrid","file":"ddf_vs_dbinning.py"},
{"category":"hybrid","file":"missingdata.py", "cases":["missingdata_0_04"]},
+ {"category":"hybrid","file":"movie.py"},
{"category":"hybrid","file":"selections.py"},
{"category":"hybrid","file":"selections_pp.py"},
{"category":"queries","file":"IntegralCurveInfo.py"},
{"category":"hybrid","file":"clonecopy.py"},
{"category":"hybrid","file":"ddf_vs_dbinning.py"},
{"category":"hybrid","file":"missingdata.py", "cases":["missingdata_0_04"]},
+ {"category":"hybrid","file":"movie.py"},
{"category":"hybrid","file":"selections.py"},
{"category":"hybrid","file":"selections_pp.py"},
{"category":"operators","file":"transform.py","cases":["ops_transform05"]},
|
in_tail: fix build when FLB_REGEX is Off | @@ -415,7 +415,6 @@ static int tag_compose(char *tag, struct flb_regex *tag_regex, char *fname,
#else
static int tag_compose(char *tag, char *fname, char *out_buf, size_t *out_size,
struct flb_tail_config *ctx)
-)
#endif
{
int i;
|
apps/nshlib/nsh_parse.c: Correct an error in conditional compilation found in build testing. | @@ -217,7 +217,7 @@ static const char g_arg_separator[] = "`$";
#endif
static const char g_redirect1[] = ">";
static const char g_redirect2[] = ">>";
-#ifdef CONFIG_NSH_VARS
+#ifdef NSH_HAVE_VARS
static const char g_exitstatus[] = "?";
static const char g_success[] = "0";
static const char g_failure[] = "1";
@@ -1034,11 +1034,11 @@ static FAR const char *nsh_envexpand(FAR struct nsh_vtbl_s *vtbl,
{
FAR const char *value;
+#ifdef CONFIG_NSH_VARS
/* Not a built-in? Return the value of the NSH variable with this
* name.
*/
-#ifdef CONFIG_NSH_VARS
value = nsh_getvar(vtbl, varname);
if (value != NULL)
{
@@ -1046,11 +1046,11 @@ static FAR const char *nsh_envexpand(FAR struct nsh_vtbl_s *vtbl,
}
#endif
- /* Not an NSH variable? Return the value of the NSH variable environment variable with this
- * name.
+#ifndef CONFIG_DISABLE_ENVIRON
+ /* Not an NSH variable? Return the value of the NSH variable
+ * environment variable with this name.
*/
-#ifndef CONFIG_DISABLE_ENVIRON
value = getenv(varname);
if (value != NULL)
{
|
Remove required_relids from gen_implied_quals
In the commit we stopped generating implied quals for outer
joins, so we no longer need to ensure that all the relids are present.
This commit will remove the need to do a union between the new qual
scope and the relids from the outer join. | @@ -123,7 +123,6 @@ gen_implied_qual(PlannerInfo *root,
Relids new_qualscope;
ListCell *lc;
RestrictInfo *new_rinfo;
- Relids required_relids;
/* Expression types must match */
Assert(exprType(old_expr) == exprType(new_expr)
@@ -172,13 +171,11 @@ gen_implied_qual(PlannerInfo *root,
* equivalence class machinery, because it's derived from a clause that
* wasn't either.
*/
- required_relids = bms_union(new_qualscope, old_rinfo->ojscope_relids);
-
new_rinfo = make_restrictinfo((Expr *) new_clause,
old_rinfo->is_pushed_down,
old_rinfo->outerjoin_delayed,
old_rinfo->pseudoconstant,
- required_relids,
+ new_qualscope,
old_rinfo->outer_relids, /* GPDB_92_MERGE_FIXME */
old_rinfo->nullable_relids,
old_rinfo->ojscope_relids);
@@ -197,7 +194,7 @@ gen_implied_qual(PlannerInfo *root,
PVC_RECURSE_AGGREGATES,
PVC_INCLUDE_PLACEHOLDERS);
- add_vars_to_targetlist(root, vars, required_relids, false);
+ add_vars_to_targetlist(root, vars, new_qualscope, false);
list_free(vars);
}
|
unistd: undefined is not the same as unspecified.
* ext/posix/unistd.c (Pwrite): Use precise language in the
comment describing why we detect a zero nbytes argument and
return 0 early, rather than let the C library handle it. | @@ -1232,7 +1232,7 @@ Pwrite(lua_State *L)
if (offset && lua_type(L, 3) == LUA_TNIL)
nbytes = buflen - offset;
- /* calling write with nbytes `0` can cause undefined behaviour */
+ /* calling write with nbytes `0` may cause unspecified behaviour */
if (nbytes == 0)
return pushintresult(0);
|
peview: Update loadconfig properties | @@ -139,6 +139,35 @@ INT_PTR CALLBACK PvpPeLoadConfigDlgProc(
ADD_VALUE(L"CFG LongJump table entry count", PhaFormatUInt64((Config)->GuardLongJumpTargetCount, TRUE)->Buffer); \
} \
} \
+ \
+ if (RTL_CONTAINS_FIELD((Config), (Config)->Size, CodeIntegrity)) \
+ { \
+ ADD_VALUE(L"CI flags", PhaFormatString(L"0x%x", (Config)->CodeIntegrity.Flags)->Buffer); \
+ ADD_VALUE(L"CI catalog", PhaFormatString(L"0x%Ix", (Config)->CodeIntegrity.Catalog)->Buffer); \
+ ADD_VALUE(L"CI catalog offset", PhaFormatString(L"0x%Ix", (Config)->CodeIntegrity.CatalogOffset)->Buffer); \
+ } \
+ \
+ if (RTL_CONTAINS_FIELD((Config), (Config)->Size, DynamicValueRelocTable)) \
+ { \
+ ADD_VALUE(L"DynamicValueRelocTable", PhaFormatString(L"0x%Ix", (Config)->DynamicValueRelocTable)->Buffer); \
+ ADD_VALUE(L"CHPEMetadataPointer", PhaFormatString(L"0x%Ix", (Config)->CHPEMetadataPointer)->Buffer); \
+ ADD_VALUE(L"GuardRFFailureRoutine", PhaFormatString(L"0x%Ix", (Config)->GuardRFFailureRoutine)->Buffer); \
+ ADD_VALUE(L"GuardRFFailureRoutineFunctionPointer", PhaFormatString(L"0x%Ix", (Config)->GuardRFFailureRoutineFunctionPointer)->Buffer); \
+ } \
+ \
+ if (RTL_CONTAINS_FIELD((Config), (Config)->Size, DynamicValueRelocTableOffset)) \
+ { \
+ ADD_VALUE(L"DynamicValueRelocTableOffset", PhaFormatString(L"0x%Ix", (Config)->DynamicValueRelocTableOffset)->Buffer); \
+ ADD_VALUE(L"DynamicValueRelocTableSection", PhaFormatString(L"0x%Ix", (Config)->DynamicValueRelocTableSection)->Buffer); \
+ ADD_VALUE(L"GuardRFVerifyStackPointerFunctionPointer", PhaFormatString(L"0x%Ix", (Config)->GuardRFVerifyStackPointerFunctionPointer)->Buffer); \
+ ADD_VALUE(L"HotPatchTableOffset", PhaFormatString(L"0x%Ix", (Config)->HotPatchTableOffset)->Buffer); \
+ ADD_VALUE(L"EnclaveConfigurationPointer", PhaFormatString(L"0x%Ix", (Config)->EnclaveConfigurationPointer)->Buffer); \
+ } \
+ \
+ if (RTL_CONTAINS_FIELD((Config), (Config)->Size, VolatileMetadataPointer)) \
+ { \
+ ADD_VALUE(L"VolatileMetadataPointer", PhaFormatString(L"0x%Ix", (Config)->VolatileMetadataPointer)->Buffer); \
+ } \
}
if (PvMappedImage.Magic == IMAGE_NT_OPTIONAL_HDR32_MAGIC)
|
[libc] Use correct header file for newlib. | #ifndef LIBC_FCNTL_H__
#define LIBC_FCNTL_H__
+#ifdef RT_USING_NEWLIB
+#include <fcntl.h>
+
+#ifndef O_NONBLOCK
+#define O_NONBLOCK 04000
+#endif
+
+#else
#define O_RDONLY 00
#define O_WRONLY 01
#define O_RDWR 02
#define F_GETOWN_EX 16
#define F_GETOWNER_UIDS 17
+#endif
#endif
+
|
Update README.md
So people dont have to read docs just to compile (=primary purpose of this repo, a compiler) | @@ -8,6 +8,19 @@ and features you may find familiar from languages like like rust and ocaml.
This combination makes Myrddin suitable for anything ranging from desktop
applications, to embedded systems and potentially even kernel development.
+## Build
+
+Compile with ./configure --prefix="/home/wherever/I/want" && make && make install
+The result will be among other things, the binaries 6m and mbld
+
+## Usage
+
+Compile and execute:
+`mbld -R test.myr`
+
+Compile into a binary:
+`mbld -b binary test.myr`
+
## Examples
A classic:
|
bugfix(i2c): fix esp32-s2 i2c driver UT issue | @@ -100,8 +100,8 @@ static inline void i2c_ll_rxfifo_rst(i2c_dev_t *hw)
static inline void i2c_ll_set_scl_timing(i2c_dev_t *hw, int hight_period, int low_period)
{
hw->scl_low_period.period = low_period;
- hw->scl_high_period.period = hight_period*0.6;
- hw->scl_high_period.scl_wait_high_period = hight_period*0.4-1;
+ hw->scl_high_period.period = hight_period;
+ hw->scl_high_period.scl_wait_high_period = 0;
}
/**
|
Fix: grammatical & aesthetic changes
JIRA | @@ -15,8 +15,8 @@ Notes
- It is not a real-time stack. One write operation might take much longer than another.
- For now, it does not detect or handle bad blocks.
- SPIFFS is able to reliably utilize only around 75% of assigned partition space.
- - When the filesystem is running out of space, the garbage collector is trying to find free space by scanning the filesystem multiple times, which can take up to a few seconds per write function call, depending on required space.
- - Deleting files does not always delete the whole file, which leaves unusable sections throughout the filesystem.
+ - When the filesystem is running out of space, the garbage collector is trying to find a free space by scanning the filesystem multiple times, which can take up to several seconds per write function call, depending on required space.
+ - Deleting a file does not always remove the whole file, which leaves unusable sections throughout the filesystem.
Tools
-----
|
Update Gatt_Client_Example_Walkthrough.md
Closes
Closes | @@ -437,7 +437,7 @@ esp_log_buffer_hex(GATTC_TAG, gl_profile_tab[PROFILE_A_APP_ID].remote_bda,
sizeof(esp_bd_addr_t));
```
-The typical MTU size for a Bluetooth 4.0 connection is 23 bytes. A client can change the size of MUT, using `esp_ble_gattc_send_mtu_req()` function, which takes the GATT interface and the connection ID. The size of the requested MTU is defined by `esp_ble_gatt_set_local_mtu()`. The server can then accept or reject the request. The ESP32 supports a MTU size of up to 517 bytes, which is defined by the `ESP_GATT_MAX_MTU_SIZE` in `esp_gattc_api.h`. In this example, the MTU size is set to 500 bytes. In case the configuration fails, the returned error is printed:
+The typical MTU size for a Bluetooth 4.0 connection is 23 bytes. A client can change the size of MTU, using `esp_ble_gattc_send_mtu_req()` function, which takes the GATT interface and the connection ID. The size of the requested MTU is defined by `esp_ble_gatt_set_local_mtu()`. The server can then accept or reject the request. The ESP32 supports a MTU size of up to 517 bytes, which is defined by the `ESP_GATT_MAX_MTU_SIZE` in `esp_gattc_api.h`. In this example, the MTU size is set to 500 bytes. In case the configuration fails, the returned error is printed:
```c
esp_err_t mtu_ret = esp_ble_gattc_send_mtu_req (gattc_if, conn_id);
|
Metadata: Remove outdated information | @@ -238,7 +238,7 @@ type= enum
empty
string
status= implemented
-usedby/plugin= cpptype range type
+usedby/plugin= range type
description= defines the type of the value, as specified in CORBA
Unlike check/type, type is also used for code generation and within the APIs
example= any
@@ -770,7 +770,7 @@ type= enum
FSType
string
status= implemented
-usedby/plugin= cpptype range type
+usedby/plugin= range type
usedby/tool = web
description= defines the type of the value, as specified in CORBA
(except of 2: wchar, wstring; and 4 additions: any, empty, FSType, string).
@@ -783,20 +783,6 @@ description= defines the type of the value, as specified in CORBA
The type plugin prefers `check/type` if it is present.
example = any
-[check/type/min]
-type= int
-status= deprecated
-usedby/plugin= cpptype
-description= defines the min value type of the integer value
- use check/range instead
-
-[check/type/max]
-type= int
-status= deprecated
-usedby/plugin= cpptype
-description= defines the max value type of the integer value
- use check/range instead
-
[check/range]
status= implemented
usedby/plugin= range regexdispatcher
|
sysdeps/managarm: fix sys_sockname on early posix returns | @@ -140,7 +140,6 @@ int sys_sockname(int fd, struct sockaddr *addr_ptr, socklen_t max_addr_length,
HEL_CHECK(offer.error());
HEL_CHECK(send_req.error());
HEL_CHECK(recv_resp.error());
- HEL_CHECK(recv_addr.error());
managarm::fs::SvrResponse<MemoryAllocator> resp(getSysdepsAllocator());
resp.ParseFromArray(recv_resp.data(), recv_resp.length());
|
[core] perf: small improvement buffer_string_space | @@ -201,7 +201,7 @@ static inline size_t buffer_string_length(const buffer *b) {
}
static inline size_t buffer_string_space(const buffer *b) {
- return NULL != b && b->size ? b->size - b->used - (0 == b->used) : 0;
+ return NULL != b && b->size ? b->size - (b->used | (0 == b->used)) : 0;
}
static inline void buffer_append_string_buffer(buffer *b, const buffer *src) {
|
cpu: Fix not reporting amd cpu power | @@ -570,7 +570,8 @@ bool CPUStats::InitCpuPowerData() {
break;
}
}
- } else {
+ }
+ if (!cpuPowerData && !intel) {
auto powerData = std::make_unique<CPUPowerData_amdgpu>();
cpuPowerData = (CPUPowerData*)powerData.release();
}
|
update buildroot sed | @@ -70,7 +70,7 @@ export PATH=${LMOD_DIR}:${PATH}
MODULEPATH= python ./bootstrap_eb.py %{buildroot}/%{install_path}
-sed -i 's|%{buildroot}||g' %{buildroot}%{install_path}/modules/all/EasyBuild/%{version}
+sed -i 's|%{buildroot}||g' $(egrep -IR '%{buildroot}%{install_path}/modules/all/EasyBuild' ./|awk -F : '{print $1}')
rm bootstrap_eb.py
pushd %{buildroot}%{install_path}/modules/tools/EasyBuild/
rm %{version}
|
backup: extend fixture test
Check the decoded name. This is a quick sanity check that strings
encoded by nanopb in C can be decoded correctly. | @@ -197,8 +197,29 @@ mod tests {
/// should catch regressions when changing backup loading/verification in the firmware code.
#[test]
fn test_fixture() {
+ static mut UI_COUNTER: u32 = 0;
+ static EXPECTED_ID: &str =
+ "577782fdfffbe314b23acaeefc39ad5e8641fba7e7dbe418a35956a879a67dd2";
mock(Data {
sdcard_inserted: Some(true),
+ ui_confirm_create: Some(Box::new(|params| {
+ match unsafe {
+ UI_COUNTER += 1;
+ UI_COUNTER
+ } {
+ 1 => {
+ assert_eq!(params.title, "Name?");
+ assert_eq!(params.body, "My BitBox");
+ true
+ }
+ 2 => {
+ assert_eq!(params.title, "ID?");
+ assert_eq!(params.body, EXPECTED_ID);
+ true
+ }
+ _ => panic!("unexpected UI dialog"),
+ }
+ })),
..Default::default()
});
mock_sd();
@@ -209,23 +230,23 @@ mod tests {
// Create the three files using the a fixture in the directory with the backup ID of the
// above seed.
- let expected_id = "577782fdfffbe314b23acaeefc39ad5e8641fba7e7dbe418a35956a879a67dd2";
let backup_fixture_v9_12_0: Vec<u8> = hex::decode("0a6c0a6a0a2017834e53e17370800c0bc49b49ef3f1309df104d7239db5bbd093c90eefc995112110891bec6fb0512094d7920426974426f782233081012208af64d31126a39b98f59708a3a463e5b000000000000000000000000000000001891bec6fb05220776392e31332e30").unwrap();
for i in 0..3 {
bitbox02::sd::write_bin(
&format!("backup_Mon_2020-09-28T08-30-09Z_{}.bin", i),
- expected_id,
+ EXPECTED_ID,
&backup_fixture_v9_12_0,
)
.unwrap();
}
// Check that the loaded seed matches the backup.
assert_eq!(
- block_on(check(&pb::CheckBackupRequest { silent: true })),
+ block_on(check(&pb::CheckBackupRequest { silent: false })),
Ok(Response::CheckBackup(pb::CheckBackupResponse {
- id: expected_id.into()
+ id: EXPECTED_ID.into()
}))
);
+ assert_eq!(unsafe { UI_COUNTER }, 2);
}
#[test]
|
Fix message in XML declaration handler | @@ -3007,7 +3007,7 @@ xml_decl_handler(void *userData,
if (userData != handler_data)
fail("User data (xml decl) not correctly set");
if (standalone != -1)
- fail("Standalone not show as not present");
+ fail("Standalone not flagged as not present in XML decl");
xdecl_count++;
}
|
misc-gtk.c: consistent indentation | @@ -784,7 +784,8 @@ display_cached_logs (void)
}
char *
-get_image_path (char *filename) {
+get_image_path (char *filename)
+{
char *path1 = NULL, *path2 = NULL, *found = NULL;
// see lib/misc.c -> gftp_get_share_dir ()
|
ssl test build_transforms(): in psa mode distinguish encrypt/decrypt keys | @@ -1448,7 +1448,7 @@ static int build_transforms( mbedtls_ssl_transform *t_in,
if ( alg != MBEDTLS_SSL_NULL_CIPHER )
{
- psa_set_key_usage_flags( &attributes, PSA_KEY_USAGE_ENCRYPT | PSA_KEY_USAGE_DECRYPT );
+ psa_set_key_usage_flags( &attributes, PSA_KEY_USAGE_ENCRYPT );
psa_set_key_algorithm( &attributes, alg );
psa_set_key_type( &attributes, key_type );
@@ -1466,7 +1466,7 @@ static int build_transforms( mbedtls_ssl_transform *t_in,
status = psa_import_key( &attributes,
key1,
PSA_BITS_TO_BYTES( key_bits ),
- &t_in->psa_key_dec );
+ &t_out->psa_key_enc );
if ( status != PSA_SUCCESS)
{
@@ -1474,10 +1474,12 @@ static int build_transforms( mbedtls_ssl_transform *t_in,
goto cleanup;
}
+ psa_set_key_usage_flags( &attributes, PSA_KEY_USAGE_DECRYPT );
+
status = psa_import_key( &attributes,
key1,
PSA_BITS_TO_BYTES( key_bits ),
- &t_out->psa_key_enc );
+ &t_in->psa_key_dec );
if ( status != PSA_SUCCESS)
{
|
Restructured ++down to be slightly prettier. | :: ::
++ down :: parse inline flow
%+ knee *(list manx) |. ~+
- %+ cook
+ =- (cook - work)
:: collect raw flow into xml tags
::
|= gaf/(list graf)
:: nap: collected words
:: max: collected tags
::
- =| fip/(list tape)
- =| max/(list manx)
- =< (flop max:main)
- |% ::
- ++ fill %_ . :: unify text block
- max :_(max (clue (zing (flop fip))))
- fip ~
- == ::
- ++ main ^+ . :: flow to
- ?~ gaf fill
- ?: ?=($text -.i.gaf)
- main(gaf t.gaf, fip [(cape p.i.gaf) fip])
- :: nex: first word in flow
- :: mor: rest of flow
- ::
- => :- [nex=i.gaf mor=t.gaf]
- :: combine accumulated text
- ::
- fill
- :: convert and accumulate fragment
- ::
- =- main(gaf mor, max (weld - max))
+ =< main
+ |%
+ ++ main
+ ^- marl
+ ?~ gaf ~
+ ?. ?=($text -.i.gaf)
+ (weld (item i.gaf) $(gaf t.gaf))
+ ::
+ :: fip: accumulate text blocks
+ =/ fip/(list tape) [p.i.gaf]~
+ |- ^- marl
+ ?~ t.gaf [;/((zing (flop fip))) ~]
+ ?. ?=($text -.i.t.gaf)
+ [;/((zing (flop fip))) ^$(gaf t.gaf)]
+ $(gaf t.gaf, fip :_(fip p.i.t.gaf))
+ ::
+ ++ item
+ |= nex/graf
^- (list manx)
?- -.nex
- $bold [[%b ~] $(gaf p.nex)]~
- $talc [[%i ~] $(gaf p.nex)]~
- $code [[%code ~] (clue (cape p.nex)) ~]~
+ $text !! :: handled separately
+ $bold [[%b ~] ^$(gaf p.nex)]~
+ $talc [[%i ~] ^$(gaf p.nex)]~
+ $code [[%code ~] ;/((cape p.nex)) ~]~
$quod :: smart quotes
::
- %= $
+ %= ^$
gaf
- :- [%text `@`226 `@`128 `@`156 ~]
+ :- [%text (tufa ~-~201c. ~)]
%+ weld p.nex
- `(list graf)`[%text `@`226 `@`128 `@`157 ~]~
+ `(list graf)`[%text (tufa ~-~201d. ~)]~
==
- $link [[%a [%href (cape q.nex)] ~] $(gaf p.nex)]~
+ $link [[%a [%href (cape q.nex)] ~] ^$(gaf p.nex)]~
==
--
- work
:: ::
++ para :: paragraph
%+ cook
|
pem_read_bio_key_legacy: Do not obscure real error if there is one
Fixes | @@ -171,7 +171,8 @@ static EVP_PKEY *pem_read_bio_key_legacy(BIO *bp, EVP_PKEY **x,
}
p8err:
- if (ret == NULL)
+ if (ret == NULL && ERR_peek_last_error() == 0)
+ /* ensure some error is reported but do not hide the real one */
ERR_raise(ERR_LIB_PEM, ERR_R_ASN1_LIB);
err:
OPENSSL_secure_free(nm);
|
da1469x_m33_sleep: fix for restore of IPR | @@ -208,8 +208,8 @@ da1469x_m33_wakeup:
add r1, r0, NVIC_IPR_OFFSET
ldmia r3!, {r4-r5}
stmia r0!, {r4-r5}
- ldmia r3, {r0, r2, r4-r12}
- stmia r1!, {r0, r2, r4-r12}
+ ldmia r3!, {r0, r2, r4-r12}
+ stmia r1, {r0, r2, r4-r12}
/* Restore SCB state */
ldmia r3!, {r4-r10}
|
doc: add cache clear metadata | @@ -1364,3 +1364,9 @@ type = string
usedby/plugins = type
description = overrides the allowed false value for this key. Only the given value or 0 will be allowed as false. All false keys will be restored to this value in `kdbSet`.
Must be used together with check/boolean/true.
+
+[cache/clear]
+status = implemented
+usedby/plugins = cache
+type = boolean
+description = tells the cache plugin to remove all cache files during the next `kdbGet` in a safe way.
|
SSL_CTX_use_PrivateKey_file uses private key, not certificate | @@ -103,7 +103,7 @@ SSL_use_PrivateKey_ASN1() and SSL_use_RSAPrivateKey_ASN1() add the private
key to B<ssl>.
SSL_CTX_use_PrivateKey_file() adds the first private key found in
-B<file> to B<ctx>. The formatting B<type> of the certificate must be specified
+B<file> to B<ctx>. The formatting B<type> of the private key must be specified
from the known types SSL_FILETYPE_PEM, SSL_FILETYPE_ASN1.
SSL_CTX_use_RSAPrivateKey_file() adds the first private RSA key found in
B<file> to B<ctx>. SSL_use_PrivateKey_file() adds the first private key found
|
ExtendedTools: Fix incorrect graph height calculation | @@ -185,7 +185,7 @@ VOID GpuPropLayoutGraphs(
//clientRect.bottom = panelRect.top + 10; // +10 removing extra spacing
graphWidth = clientRect.right - margin.left - margin.right;
- graphHeight = (clientRect.bottom - margin.top - margin.bottom - between * 4) / 4;
+ graphHeight = (clientRect.bottom - margin.top - margin.bottom - between * 3) / 4;
deferHandle = BeginDeferWindowPos(8);
|
YANG printer BUGFIX missing opening tag for typedefs/groupings in grouping | @@ -1032,10 +1032,12 @@ yprp_grouping(struct ypr_ctx *ctx, const struct lysp_grp *grp)
ypr_reference(ctx, grp->ref, grp->exts, &flag);
LY_ARRAY_FOR(grp->typedefs, u) {
+ ypr_open(ctx->out, &flag);
yprp_typedef(ctx, &grp->typedefs[u]);
}
LY_ARRAY_FOR(grp->groupings, u) {
+ ypr_open(ctx->out, &flag);
yprp_grouping(ctx, &grp->groupings[u]);
}
|
doc: update security advisory for 1.6.1 release
Update mitigations for security vulnerabilities
for ACRN 1.6.1 release | Security Advisory
#################
+Addressed in ACRN v1.6.1
+************************
+
+We recommend that all developers upgrade to this v1.6.1 release (or later), which
+addresses the following security issue that was discovered in previous releases:
+
+------
+
+- Service VM kernel Crashes When Fuzzing HC_ASSIGN_PCIDEV and HC_DEASSIGN_PCIDEV
+ NULL pointer dereference due to invalid address of PCI device to be assigned or
+ de-assigned may result in kernel crash. The return value of 'pci_find_bus()' shall
+ be validated before using in 'update_assigned_vf_state()'.
+
+ **Affected Release:** v1.6.
+
+
Addressed in ACRN v1.6
**********************
|
Fix links broken by non-standard version.
Using version 2.15.1 fixed the duplicate tarball problem but broke the auto-generated links. Fix them manually since this should not be a common problem.
Reported by Mohamad El-Rifai. | pgBackRest aims to be a simple, reliable backup and restore solution that can seamlessly scale up to the largest databases and workloads by utilizing algorithms that are optimized for database-specific requirements.
-pgBackRest [v2.15](https://github.com/pgbackrest/pgbackrest/releases/tag/release/2.15) is the current stable release. Release notes are on the [Releases](http://www.pgbackrest.org/release.html) page.
+pgBackRest [v2.15](https://github.com/pgbackrest/pgbackrest/releases/tag/release/2.15.1) is the current stable release. Release notes are on the [Releases](http://www.pgbackrest.org/release.html) page.
Documentation for v1 can be found [here](http://www.pgbackrest.org/1). No further releases are planned for v1 because v2 is backward-compatible with v1 options and repositories.
|
Fix ICache SPAD base addr to avoid conflicts with default SerialTL mem | @@ -141,7 +141,7 @@ class WithNPerfCounters(n: Int = 29) extends Config((site, here, up) => {
class WithRocketICacheScratchpad extends Config((site, here, up) => {
case RocketTilesKey => up(RocketTilesKey, site) map { r =>
- r.copy(icache = r.icache.map(_.copy(itimAddr = Some(0x100000 + r.hartId * 0x10000))))
+ r.copy(icache = r.icache.map(_.copy(itimAddr = Some(0x300000 + r.hartId * 0x10000))))
}
})
|
Coverity fix uninitialised memory access. | @@ -393,9 +393,9 @@ static int ffc_params_fips186_2_gen_validate_test(void)
FFC_PARAMS params;
BIGNUM *bn = NULL;
+ ffc_params_init(¶ms);
if (!TEST_ptr(bn = BN_new()))
goto err;
- ffc_params_init(¶ms);
if (!TEST_true(ffc_params_FIPS186_2_generate(NULL, ¶ms, FFC_PARAM_TYPE_DH,
1024, 160, NULL, &res, NULL)))
goto err;
|
Update Character.cs
add shield percentage value offset | @@ -47,6 +47,7 @@ namespace FFXIVClientStructs.FFXIV.Client.Game.Character
[FieldOffset(0x195C)] public ushort CurrentWorld;
[FieldOffset(0x195E)] public ushort HomeWorld;
[FieldOffset(0x197F)] public byte Icon;
+ [FieldOffset(0x1997)] public byte ShieldValue;
[FieldOffset(0x19A0)] public byte StatusFlags;
[MemberFunction("E8 ?? ?? ?? ?? 3B C7 74 45")]
|
Makefile: build default acrn.efi with nuc6cayh
To be back compatible, the default acrn.efi should be built when
BOARD param is nuc6cayh, because apl-nuc was overridden to nuc6cayh
in acrn-hypervisor/Makefile; | @@ -91,7 +91,7 @@ all: $(EFIBIN)
install: $(EFIBIN) install-conf
install -D $(EFIBIN) $(DESTDIR)/usr/lib/acrn/$(HV_FILE).$(BOARD).$(SCENARIO).efi
# this is to keep the compatible with original output files
-ifeq ($(BOARD), apl-nuc)
+ifeq ($(BOARD), nuc6cayh)
ifeq ($(SCENARIO), sdc)
install -D $(EFIBIN) $(DESTDIR)/usr/lib/acrn/$(HV_FILE).efi
endif
@@ -101,7 +101,7 @@ install-debug: $(HV_OBJDIR)/$(HV_FILE).map $(HV_OBJDIR)/$(HV_FILE).out
install -D $(HV_OBJDIR)/$(HV_FILE).out $(DESTDIR)/usr/lib/acrn/$(HV_FILE).$(BOARD).$(SCENARIO).efi.out
install -D $(HV_OBJDIR)/$(HV_FILE).map $(DESTDIR)/usr/lib/acrn/$(HV_FILE).$(BOARD).$(SCENARIO).efi.map
# this is to keep the compatible with original output files
-ifeq ($(BOARD), apl-nuc)
+ifeq ($(BOARD), nuc6cayh)
ifeq ($(SCENARIO), sdc)
install -D $(HV_OBJDIR)/$(HV_FILE).out $(DESTDIR)/usr/lib/acrn/$(HV_FILE).efi.out
install -D $(HV_OBJDIR)/$(HV_FILE).map $(DESTDIR)/usr/lib/acrn/$(HV_FILE).efi.map
|
conn: don't send roc | @@ -542,8 +542,6 @@ _conn_moor_poke(void* ptr_v, c3_d len_d, c3_y* byt_y)
//
_conn_send_noun(can_u, u3nc(u3k(rid), c3y));
u3_pier_cram(con_u->car_u.pir_u);
- // TODO: send roc?
- //
break;
}
case c3__meld: {
|
Update: NAR.py: minor fixes regarding returning the proper punctuation in answers and including revisions in the returned derivations | @@ -20,7 +20,7 @@ def parseTask(s):
s = s.replace(" :|:","")
if "occurrenceTime" in s:
M["occurrenceTime"] = s.split("occurrenceTime=")[1].split(" ")[0]
- sentence = s.split(" occurrenceTime=")[0] if " occurrenceTime=" in s else s.split(" Priority=")[0]
+ sentence = s.split(" occurrenceTime=")[0] if " occurrenceTime=" in s else s.split(" Priority=")[0].split(" creationTime=")[0]
M["punctuation"] = sentence[-4] if ":|:" in sentence else sentence[-1]
M["term"] = sentence.split(" creationTime")[0].split(" occurrenceTime")[0].split(" Truth")[0][:-1]
if "Truth" in s:
|
docs: Modified three priority descriptions
Fix issue | @@ -30,19 +30,17 @@ There really are no special requirements for the operating system. Generally BoA
1. Support dynamic memory allocation / free.
2. Support mutual exclusion (mutex) protection mechanism.
3. Supports thread suspension for a specified duration (optional). If not, BoAT does not support timeout or polling functions, and other functions are not affected.
-4. According to priority, from either high to low, at least one of the following random number generators is supported: <br>
+4. According to priority from high to low, at least one of the following random number generators is supported: <br>
(1) TRNG, true random number generator (requires hardware support) <br>
(2) CSPRNG, a cryptographically secure pseudo-random number generator. For Linux, this capability can be provided by the OpenSSL library <br>
(3) PRNG, a (non-cryptographically secure) pseudo-random number generator <br>
-5. Depending on either a high to low minimum priority, at least one of the following types of times below is supported (for the pseudo-random number seed and the time in the data and log): <br>
-
+5. Depending on a high to low minimum priority, at least one of the following types of times below is supported (for the pseudo-random number seed and the time in the data and log): <br>
(1) RTC time, and can be consistent with the real time through protocols such as NTP <br>
(2) RTC time, needs to set the time manually <br>
(3) Tick since power on <br>
6. According to priority from high to low, at least one of the following communication protocols is supported: <br>
-
(1) HTTP / HTTPS (for Linux, this capability can be provided by the curl library) <br>
(2) CoAP <br>
(3) MQTT <br>
|
codegen: fix test | @@ -39,7 +39,7 @@ do_tests() {
succeed_if "application didn't read empty menu correctly"
EXPECTED_MENU=$(mktemp)
- cat <<- 'EOF'
+ cat > "$EXPECTED_MENU" <<- 'EOF'
Main Menu:
[1] Menu 1
|
esp_system: FIx TWDT SMP FreeRTOS unicore build error
When configNUM_CORES = 1, vTaskCoreAffinityGet() is not defined. This
commit fixes the TWDT to omit calls to vTaskCoreAffinityGet() when building
for unicore. | @@ -346,9 +346,14 @@ static void task_wdt_isr(void *arg)
if (!entry->has_reset) {
if (entry->task_handle) {
#if CONFIG_FREERTOS_SMP
- UBaseType_t uxCoreAffinity = vTaskCoreAffinityGet(entry->task_handle);
- ESP_EARLY_LOGE(TAG, " - %s (0x%x)", pcTaskGetName(entry->task_handle), uxCoreAffinity);
-#else
+#if configNUM_CORES > 1
+ // Log the task's name and its affinity
+ ESP_EARLY_LOGE(TAG, " - %s (0x%x)", pcTaskGetName(entry->task_handle), vTaskCoreAffinityGet(entry->task_handle));
+#else // configNUM_CORES > 1
+ // Log the task's name
+ ESP_EARLY_LOGE(TAG, " - %s", pcTaskGetName(entry->task_handle));
+#endif // configNUM_CORES > 1
+#else // CONFIG_FREERTOS_SMP
BaseType_t task_affinity = xTaskGetAffinity(entry->task_handle);
const char *cpu;
if (task_affinity == 0) {
@@ -359,7 +364,7 @@ static void task_wdt_isr(void *arg)
cpu = DRAM_STR("CPU 0/1");
}
ESP_EARLY_LOGE(TAG, " - %s (%s)", pcTaskGetName(entry->task_handle), cpu);
-#endif
+#endif // CONFIG_FREERTOS_SMP
} else {
ESP_EARLY_LOGE(TAG, " - %s", entry->user_name);
}
|
Add the DSA serializers to the default provider tools
The DSA serializers are implemented, but didn't get added to the
default provider's serializer algorithm table.
Fixes | @@ -432,6 +432,27 @@ static const OSSL_ALGORITHM deflt_serializer[] = {
dh_param_pem_serializer_functions },
#endif
+#ifndef OPENSSL_NO_DSA
+ { "DSA", "default=yes,format=text,type=private",
+ dsa_priv_text_serializer_functions },
+ { "DSA", "default=yes,format=text,type=public",
+ dsa_pub_text_serializer_functions },
+ { "DSA", "default=yes,format=text,type=domainparams",
+ dsa_param_text_serializer_functions },
+ { "DSA", "default=yes,format=der,type=private",
+ dsa_priv_der_serializer_functions },
+ { "DSA", "default=yes,format=der,type=public",
+ dsa_pub_der_serializer_functions },
+ { "DSA", "default=yes,format=der,type=domainparams",
+ dsa_param_der_serializer_functions },
+ { "DSA", "default=yes,format=pem,type=private",
+ dsa_priv_pem_serializer_functions },
+ { "DSA", "default=yes,format=pem,type=public",
+ dsa_pub_pem_serializer_functions },
+ { "DSA", "default=yes,format=pem,type=domainparams",
+ dsa_param_pem_serializer_functions },
+#endif
+
{ NULL, NULL, NULL }
};
|
Improved CI script. | @@ -164,12 +164,12 @@ EOF\""
# ====== Fedora: set up compiler ===================================
if [ "${TOOL}" == "compile" ] ; then
ci/retry -t ${RETRY_MAXTRIALS} -p ${RETRY_PAUSE} -- sudo docker exec ${CONTAINER} env LANG=C.UTF-8 \
- dnf install -y make clang ${FEDORA_DEPS}
+ dnf install -y --allowerasing make clang ${FEDORA_DEPS}
- # ====== Fedora: set up pbuilder ===================================
+ # ====== Fedora: set up mock =======================================
elif [ "${TOOL}" == "mock" ] ; then
ci/retry -t ${RETRY_MAXTRIALS} -p ${RETRY_PAUSE} -- sudo docker exec ${CONTAINER} env LANG=C.UTF-8 \
- dnf install -y make findutils fedora-release mock rpmdevtools ${FEDORA_DEPS}
+ dnf install -y --allowerasing make findutils fedora-release mock rpmdevtools ${FEDORA_DEPS}
else
echo >&2 "ERROR: Invalid setting of TOOL=${TOOL}"
|
Fix vrapi missing Oculus Go device type;
Backported the OCULUSGO device type enumerant. Need to test to
determine if the Oculus Go still reports this device type or if
it just reports unknown.
A more involved fix will be to use JNI to discover the build model
from the Android settings. | #pragma clang diagnostic pop
#define GL_SRGB8_ALPHA8 0x8C43
+#define VRAPI_DEVICE_TYPE_OCULUSGO 64
// Private platform functions
JNIEnv* lovrPlatformGetJNI(void);
@@ -57,9 +58,10 @@ static struct {
static bool vrapi_init(float offset, uint32_t msaa) {
ANativeActivity* activity = lovrPlatformGetActivity();
+ JNIEnv* jni = lovrPlatformGetJNI();
state.java.Vm = activity->vm;
state.java.ActivityObject = activity->clazz;
- state.java.Env = lovrPlatformGetJNI();
+ state.java.Env = jni;
state.offset = offset;
state.msaa = msaa;
const ovrInitParms config = vrapi_DefaultInitParms(&state.java);
@@ -85,7 +87,7 @@ static void vrapi_destroy() {
}
static bool vrapi_getName(char* buffer, size_t length) {
- switch (state.deviceType) {
+ switch ((int) state.deviceType) {
case VRAPI_DEVICE_TYPE_OCULUSGO: strncpy(buffer, "Oculus Go", length - 1); break;
case VRAPI_DEVICE_TYPE_OCULUSQUEST: strncpy(buffer, "Oculus Quest", length - 1); break;
default: return false;
|
Use old version range syntax to increase compatibility. | @@ -178,17 +178,17 @@ class CelixConan(ConanFile):
# libffi/3.3@zhengpeng/testing is a workaround of the following buggy commit:
# https://github.com/conan-io/conan-center-index/pull/5085#issuecomment-847487808
#self.requires("libffi/3.3@zhengpeng/testing")
- self.requires("libffi/[~3.2.1]")
+ self.requires("libffi/[>=3.2.1 <4.0.0]")
self.options['libffi'].shared = True
- self.requires("jansson/[~2.12]")
+ self.requires("jansson/[>=2.12 <3.0.0]")
self.options['jansson'].shared = True
- self.requires("libcurl/[~7.64.1]")
+ self.requires("libcurl/[>=7.64.1 <8.0.0]")
self.options['libcurl'].shared = True
- self.requires("zlib/[~1.2.8]")
+ self.requires("zlib/[>=1.2.8 <2.0.0]")
self.options['zlib'].shared = True
self.requires("libuuid/1.0.3")
self.options['libuuid'].shared = True
- self.requires("libzip/[~1.7.3]")
+ self.requires("libzip/[>=1.7.3 <2.0.0]")
self.options['libzip'].shared = True
self.options['openssl'].shared = True
self.options['libxml2'].shared = True
@@ -197,9 +197,9 @@ class CelixConan(ConanFile):
if self.options.celix_add_openssl_dep:
self.requires("openssl/1.1.1k")
if self.options.build_remote_service_admin or self.options.build_shell_bonjour:
- self.requires("libxml2/[~2.9.9]")
+ self.requires("libxml2/[>=2.9.9 <3.0.0]")
if self.options.build_cxx_remote_service_admin:
- self.requires("rapidjson/[~1.1.0]")
+ self.requires("rapidjson/[>=1.1.0 <2.0.0]")
if self.options.build_shell_bonjour:
# TODO: CC=cc is fixed in the official mdnsresponder Makefile, patching is needed to make cross-compile work
# https://github.com/conan-io/conan-center-index/issues/9711
|
SOVERSION bump to version 2.20.32 | @@ -66,7 +66,7 @@ set(LIBYANG_VERSION ${LIBYANG_MAJOR_VERSION}.${LIBYANG_MINOR_VERSION}.${LIBYANG_
# set version of the library
set(LIBYANG_MAJOR_SOVERSION 2)
set(LIBYANG_MINOR_SOVERSION 20)
-set(LIBYANG_MICRO_SOVERSION 31)
+set(LIBYANG_MICRO_SOVERSION 32)
set(LIBYANG_SOVERSION_FULL ${LIBYANG_MAJOR_SOVERSION}.${LIBYANG_MINOR_SOVERSION}.${LIBYANG_MICRO_SOVERSION})
set(LIBYANG_SOVERSION ${LIBYANG_MAJOR_SOVERSION})
|
Fix chip/stm32l562xx_rcc.c:78:20: error: unused function 'rcc_reset' | * Private Functions
****************************************************************************/
-/****************************************************************************
- * Name: rcc_reset
- *
- * Description:
- * Reset the RCC clock configuration to the default reset state
- *
- ****************************************************************************/
-
-static inline void rcc_reset(void)
-{
- uint32_t regval;
-
- /* Enable the multispeed internal clock (MSI) @ 4MHz */
-
- regval = getreg32(STM32L5_RCC_CR);
- regval &= ~RCC_CR_MSIRANGE_MASK;
- regval |= RCC_CR_MSION | RCC_CR_MSIRANGE_4M;
- putreg32(regval, STM32L5_RCC_CR);
-
- /* Reset CFGR register */
-
- putreg32(0x00000000, STM32L5_RCC_CFGR);
-
- /* Reset HSION, HSEON, CSSON and PLLON bits */
-
- regval = getreg32(STM32L5_RCC_CR);
- regval &= ~(RCC_CR_HSION | RCC_CR_HSEON | RCC_CR_CSSON | RCC_CR_PLLON);
- putreg32(regval, STM32L5_RCC_CR);
-
- /* Reset PLLCFGR register to reset default */
-
- putreg32(RCC_PLLCFG_RESET, STM32L5_RCC_PLLCFG);
-
- /* Reset HSEBYP bit */
-
- regval = getreg32(STM32L5_RCC_CR);
- regval &= ~RCC_CR_HSEBYP;
- putreg32(regval, STM32L5_RCC_CR);
-
- /* Disable all interrupts */
-
- putreg32(0x00000000, STM32L5_RCC_CIER);
-}
-
/****************************************************************************
* Name: rcc_enableahb1
*
|
apps/examples/nxlines/nxlines_bkgd.c: Fix a bad, copy-paste comment. | @@ -205,7 +205,7 @@ static void nxlines_kbdin(NXWINDOW hwnd, uint8_t nch, FAR const uint8_t *ch,
* Name: nxlines_test
*
* Description:
- * Print "Hello, World!" in the center of the display.
+ * Update line motion.
*
****************************************************************************/
|
timer: fix unit test regression | @@ -288,8 +288,7 @@ esp_err_t timer_init(timer_group_t group_num, timer_idx_t timer_num, const timer
timer_hal_set_divider(&(p_timer_obj[group_num][timer_num]->hal), config->divider);
timer_hal_set_counter_increase(&(p_timer_obj[group_num][timer_num]->hal), config->counter_dir);
timer_hal_set_alarm_enable(&(p_timer_obj[group_num][timer_num]->hal), config->alarm_en);
- // Disable level interrupt by default
- timer_hal_set_level_int_enable(&(p_timer_obj[group_num][timer_num]->hal), false);
+ timer_hal_set_level_int_enable(&(p_timer_obj[group_num][timer_num]->hal), config->intr_type == TIMER_INTR_LEVEL);
if (config->intr_type != TIMER_INTR_LEVEL) {
ESP_LOGW(TIMER_TAG, "only support Level Interrupt, switch to Level Interrupt instead");
}
|
[cfg] Fix typos when parsing CFG infos in PE load config
There was some uninspired copy-pastes when adding support for CFG parsing
for wow64 PE. | @@ -1277,7 +1277,7 @@ NTSTATUS PhGetMappedImageCfg64(
CfgConfig->NumberOfGuardAdressIatEntries = config64->GuardAddressTakenIatEntryCount;
CfgConfig->GuardAdressIatTable = PhMappedImageRvaToVa(
MappedImage,
- (ULONG)(config64->GuardAddressTakenIatEntryTable - MappedImage->NtHeaders->OptionalHeader.ImageBase),
+ (ULONG)(ULONG_PTR)PTR_SUB_OFFSET(config64->GuardAddressTakenIatEntryTable, MappedImage->NtHeaders->OptionalHeader.ImageBase),
NULL
);
@@ -1310,7 +1310,7 @@ NTSTATUS PhGetMappedImageCfg64(
CfgConfig->NumberOfGuardLongJumpEntries = config64->GuardLongJumpTargetCount;
CfgConfig->GuardLongJumpTable = PhMappedImageRvaToVa(
MappedImage,
- (ULONG)(config64->GuardLongJumpTargetTable - MappedImage->NtHeaders->OptionalHeader.ImageBase),
+ (ULONG)(ULONG_PTR)PTR_SUB_OFFSET(config64->GuardLongJumpTargetTable, MappedImage->NtHeaders->OptionalHeader.ImageBase),
NULL
);
@@ -1397,7 +1397,7 @@ NTSTATUS PhGetMappedImageCfg32(
CfgConfig->NumberOfGuardAdressIatEntries = config32->GuardAddressTakenIatEntryCount;
CfgConfig->GuardAdressIatTable = PhMappedImageRvaToVa(
MappedImage,
- (ULONG)(config32->GuardAddressTakenIatEntryTable - MappedImage->NtHeaders->OptionalHeader.ImageBase),
+ (ULONG)(ULONG_PTR)PTR_SUB_OFFSET(config32->GuardAddressTakenIatEntryTable, MappedImage->NtHeaders32->OptionalHeader.ImageBase),
NULL
);
@@ -1430,7 +1430,7 @@ NTSTATUS PhGetMappedImageCfg32(
CfgConfig->NumberOfGuardLongJumpEntries = config32->GuardLongJumpTargetCount;
CfgConfig->GuardLongJumpTable = PhMappedImageRvaToVa(
MappedImage,
- (ULONG)(config32->GuardLongJumpTargetTable - MappedImage->NtHeaders->OptionalHeader.ImageBase),
+ (ULONG)(ULONG_PTR)PTR_SUB_OFFSET(config32->GuardLongJumpTargetTable, MappedImage->NtHeaders32->OptionalHeader.ImageBase),
NULL
);
|
Remove some old comments. | @@ -63,17 +63,6 @@ func initPressureSensor() (ok bool) {
}
//TODO westphae: make bmp180.go to fit bmp interface
- //for i := 0; i < 5; i++ {
- // myBMPX80 = bmp180.New(i2cbus)
- // _, err := myBMPX80.Temperature() // Test to see if it works, since bmp180.New doesn't return err
- // if err != nil {
- // time.Sleep(250 * time.Millisecond)
- // } else {
- // globalStatus.BMPConnected = true
- // log.Println("AHRS Info: Successfully initialized BMP180")
- // return nil
- // }
- //}
log.Println("AHRS Info: couldn't initialize BMP280 or BMP180")
return false
@@ -206,14 +195,6 @@ func sensorAttitudeSender() {
m.T = float64(t.UnixNano()/1000) / 1e6
_, b1, b2, b3, a1, a2, a3, m1, m2, m3, mpuError, magError = myIMUReader.Read()
- // This is how the RY83XAI is wired up
- //m.A1, m.A2, m.A3 = -a2, +a1, -a3
- //m.B1, m.B2, m.B3 = +b2, -b1, +b3
- //m.M1, m.M2, m.M3 = +m1, +m2, +m3
- // This is how the OpenFlightBox board is wired up
- //m.A1, m.A2, m.A3 = +a1, -a2, +a3
- //m.B1, m.B2, m.B3 = -b1, +b2, -b3
- //m.M1, m.M2, m.M3 = +m2, +m1, +m3
m.A1 = -(ff[0][0]*a1 + ff[0][1]*a2 + ff[0][2]*a3)
m.A2 = -(ff[1][0]*a1 + ff[1][1]*a2 + ff[1][2]*a3)
m.A3 = -(ff[2][0]*a1 + ff[2][1]*a2 + ff[2][2]*a3)
|
sanitizers: promote char to unsigned char first for isspace(int) | @@ -183,7 +183,7 @@ size_t sanitizers_parseReport(run_t* run, pid_t pid, funcs_t* funcs, uint64_t* p
} else {
char* pLineLC = lineptr;
/* Trim leading spaces */
- while (*pLineLC != '\0' && isspace((int)*pLineLC)) {
+ while (*pLineLC != '\0' && isspace((unsigned char)*pLineLC)) {
++pLineLC;
}
|
test: add platon test case test_006GetBalance_0002GetWalletDefaultAddressSuccess
fix the issue aitos-io#1141
teambition task id | @@ -55,6 +55,36 @@ START_TEST(test_006GetBalance_0001GetSuccess)
}
END_TEST
+START_TEST(test_006GetBalance_0002GetWalletDefaultAddressSuccess)
+{
+ BOAT_RESULT result;
+ BoatPlatONTx tx_ctx;
+ BCHAR *cur_balance_wei = NULL;
+ BoatFieldVariable parse_result = {NULL, 0};
+
+ BoatIotSdkInit();
+
+ result = platonWalletPrepare();
+ ck_assert(result == BOAT_SUCCESS);
+
+ result = BoatPlatONTxInit(g_platon_wallet_ptr, &tx_ctx, BOAT_TRUE, NULL,
+ "0x333333",
+ (BCHAR *)TEST_RECIPIENT_ADDRESS);
+ ck_assert_int_eq(result, BOAT_SUCCESS);
+
+
+ cur_balance_wei = BoatPlatONWalletGetBalance(g_platon_wallet_ptr, NULL);
+ result = BoatPlatONParseRpcResponseStringResult(cur_balance_wei, &parse_result);
+
+ ck_assert_ptr_ne(parse_result.field_ptr, NULL);
+ ck_assert_int_eq(result, BOAT_SUCCESS);
+
+ BoatFree(parse_result.field_ptr);
+
+ BoatIotSdkDeInit();
+}
+END_TEST
+
Suite *make_transactions_suite(void)
{
/* Create Suite */
@@ -70,6 +100,7 @@ Suite *make_transactions_suite(void)
/* Test cases are added to the test set */
tcase_add_test(tc_transaction_api, test_006GetBalance_0001GetSuccess);
+ tcase_add_test(tc_transaction_api, test_006GetBalance_0002GetWalletDefaultAddressSuccess);
return s_transaction;
}
|
VERSION bump to version 2.2.11 | @@ -65,7 +65,7 @@ endif()
# micro version is changed with a set of small changes or bugfixes anywhere in the project.
set(SYSREPO_MAJOR_VERSION 2)
set(SYSREPO_MINOR_VERSION 2)
-set(SYSREPO_MICRO_VERSION 10)
+set(SYSREPO_MICRO_VERSION 11)
set(SYSREPO_VERSION ${SYSREPO_MAJOR_VERSION}.${SYSREPO_MINOR_VERSION}.${SYSREPO_MICRO_VERSION})
# Version of the library
|
ioam: fix coverity warning/NULL dereference
Add a NULL check and missing array index to avoid multiple NULL
derefences.
Runnning:
set ioam ip6 sr-tunnel-select disable
on a fresh VPP no longer crashes.
Type: fix | @@ -608,6 +608,8 @@ ioam_cache_ts_table_destroy (vlib_main_t * vm)
int i;
/* free pool and hash table */
+ if (cm->ioam_ts_pool)
+ {
for (i = 0; i < no_of_threads; i++)
{
pool_foreach (entry, cm->ioam_ts_pool[i])
@@ -615,10 +617,11 @@ ioam_cache_ts_table_destroy (vlib_main_t * vm)
ioam_cache_ts_entry_free (i, entry, cm->error_node_index);
}
pool_free (cm->ioam_ts_pool[i]);
- cm->ioam_ts_pool = 0;
+ cm->ioam_ts_pool[i] = 0;
tw_timer_wheel_free_16t_2w_512sl (&cm->timer_wheels[i]);
}
vec_free (cm->ioam_ts_pool);
+ }
return (0);
}
|
Update s2n_public_random with better variable name to be clear the paramter is exclusive | @@ -166,11 +166,14 @@ int s2n_get_urandom_data(struct s2n_blob *blob)
return 0;
}
-int64_t s2n_public_random(int64_t max)
+/*
+ * Return a random number in the range [0, bound)
+ */
+int64_t s2n_public_random(int64_t bound)
{
uint64_t r;
- gt_check(max, 0);
+ gt_check(bound, 0);
while (1) {
struct s2n_blob blob = {.data = (void *)&r, sizeof(r) };
@@ -184,13 +187,13 @@ int64_t s2n_public_random(int64_t max)
* r == 257 is out of range.
*
* To de-bias the dice, we discard values of r that are higher
- * that the highest multiple of 'max' an int can support. If
- * max is a uint, then in the worst case we discard 50% - 1 r's.
- * But since 'max' is an int and INT_MAX is <= UINT_MAX / 2,
+ * that the highest multiple of 'bound' an int can support. If
+ * bound is a uint, then in the worst case we discard 50% - 1 r's.
+ * But since 'bound' is an int and INT_MAX is <= UINT_MAX / 2,
* in the worst case we discard 25% - 1 r's.
*/
- if (r < (UINT64_MAX - (UINT64_MAX % max))) {
- return r % max;
+ if (r < (UINT64_MAX - (UINT64_MAX % bound))) {
+ return r % bound;
}
}
}
|
Don't ever call Py_SetPythonHome() on Windows. | @@ -2203,6 +2203,17 @@ void wsgi_python_init(apr_pool_t *p)
}
#if defined(WIN32)
+#if defined(WIN32_PYTHON_VENV_IS_BROKEN)
+ /*
+ * XXX Python new style virtual environments break Python embedding
+ * API for Python initialisation on Windows. So disable this code as
+ * any attempt to call Py_SetPythonHome() with location of the
+ * virtual environment will not work and will break initialization
+ * of the Python interpreter. Instead manually add the directory
+ * Lib/site-packages to the Python module search path later if
+ * WSGIPythonHome has been set.
+ */
+
/*
* Check for Python home being overridden. This is only being
* used on Windows. For UNIX systems we actually do a fiddle
@@ -2239,7 +2250,7 @@ void wsgi_python_init(apr_pool_t *p)
Py_SetPythonHome((char *)python_home);
#endif
}
-
+#endif
#else
/*
* Now for the UNIX version of the code to set the Python HOME.
|
Remove mention of the version number from pg_trgm docs
We don't usually mention the version number in similar situations. So, neither
mention it here.
Reported-by: Bruce Momjian
Discussion: | the purpose of very fast similarity searches. These index types support
the above-described similarity operators, and additionally support
trigram-based index searches for <literal>LIKE</literal>, <literal>ILIKE</literal>,
- <literal>~</literal> and <literal>~*</literal> queries. Beginning in
- <productname>PostgreSQL</productname> 14, these indexes also support
- the equality operator (inequality operators are not supported).
+ <literal>~</literal>, <literal>~*</literal> and <literal>=</literal> queries.
+ Inequality operators are not supported.
Note that those indexes may not be as efficient as regular B-tree indexes
for equality operator.
</para>
|
Add description to documented functions | @@ -22,6 +22,7 @@ module Foreign.Lua.Call
-- * Operators
, (<#>)
, (=#>)
+ , (#?)
-- * Documentation
, FunctionDoc (..)
, ParameterDoc (..)
@@ -75,7 +76,8 @@ data HaskellFunction = HaskellFunction
-- | Documentation for a Haskell function
data FunctionDoc = FunctionDoc
- { parameterDocs :: [ParameterDoc]
+ { functionDescription :: Text
+ , parameterDocs :: [ParameterDoc]
, functionResultDoc :: Maybe FunctionResultDoc
}
deriving (Eq, Ord, Show)
@@ -153,17 +155,26 @@ returnResult bldr (FunctionResult push fnResDoc) = HaskellFunction
Lua.error
Right x -> push x
, functionDoc = Just $ FunctionDoc
- { parameterDocs = reverse $ hsFnParameterDocs bldr
+ { functionDescription = ""
+ , parameterDocs = reverse $ hsFnParameterDocs bldr
, functionResultDoc = fnResDoc
}
}
+-- | Updates the description of a Haskell function. Leaves the function
+-- unchanged if it has no documentation.
+updateFunctionDescription :: HaskellFunction -> Text -> HaskellFunction
+updateFunctionDescription fn desc =
+ case functionDoc fn of
+ Nothing -> fn
+ Just fnDoc ->
+ fn { functionDoc = Just $ fnDoc { functionDescription = desc} }
--
-- Operators
--
-infixl 8 <#>, =#>
+infixl 8 <#>, =#>, #?
-- | Inline version of @'applyParameter'@.
(<#>) :: HsFnPrecursor (a -> b)
@@ -177,12 +188,17 @@ infixl 8 <#>, =#>
-> HaskellFunction
(=#>) = returnResult
+-- | Inline version of @'updateFunctionDescription'@.
+(#?) :: HaskellFunction -> Text -> HaskellFunction
+(#?) = updateFunctionDescription
+
--
-- Render documentation
--
render :: FunctionDoc -> Text
-render (FunctionDoc paramDocs resultDoc) =
+render (FunctionDoc desc paramDocs resultDoc) =
+ (if T.null desc then "" else desc <> "\n\n") <>
renderParamDocs paramDocs <>
case resultDoc of
Nothing -> ""
|
small bugfix in counter | @@ -323,9 +323,9 @@ for(l1 = 4; l1 <= essidlenin; l1++)
writepsk(essidstr);
if(l1 < 60)
keywriteessidyear(essidstr);
- if((l1 > 7) && (l1 < 63))
+ if((l1 > 6) && (l1 < 63))
keywriteessiddigitx(essidstr);
- if((l1 > 6) && (l1 < 62))
+ if((l1 > 5) && (l1 < 62))
keywriteessiddigitxx(essidstr);
}
}
|
host/mesh: Add VA flag to generic pending flags
This adds BT_MESH_SETTINGS_VA_PENDING to GENERIC_PENDING_BITS
as it should be stored by CONFIG_BT_MESH_STORE_TIMEOUT.
This is port of | @@ -93,7 +93,8 @@ static int mesh_commit(void)
BIT(BT_MESH_SETTINGS_APP_KEYS_PENDING) | \
BIT(BT_MESH_SETTINGS_HB_PUB_PENDING) | \
BIT(BT_MESH_SETTINGS_CFG_PENDING) | \
- BIT(BT_MESH_SETTINGS_MOD_PENDING))
+ BIT(BT_MESH_SETTINGS_MOD_PENDING) | \
+ BIT(BT_MESH_SETTINGS_VA_PENDING))
void bt_mesh_settings_store_schedule(enum bt_mesh_settings_flag flag)
{
|
config: release parsers_file ref if set on exit | @@ -171,6 +171,10 @@ void flb_config_exit(struct flb_config *config)
flb_log_stop(config->log, config);
}
+ if (config->parsers_file) {
+ flb_free(config->parsers_file);
+ }
+
if (config->kernel) {
flb_free(config->kernel->s_version.data);
flb_free(config->kernel);
@@ -330,6 +334,7 @@ int flb_config_set_property(struct flb_config *config,
else {
ret = 0;
tmp = flb_env_var_translate(config->env, v);
+ printf("translate=%s\n", tmp);
switch(service_configs[i].type) {
case FLB_CONF_TYPE_INT:
i_val = (int*)((char*)config + service_configs[i].offset);
|
toml: Fixed implicit call | extern int yyparse (Driver * driver);
extern int yylineno;
extern void initializeLexer (FILE * file);
+extern void clearLexer (void);
static Driver * createDriver (Key * parent, KeySet * keys);
static void destroyDriver (Driver * driver);
|
Add check for new lines in VERSION. | @@ -60,6 +60,7 @@ set(META_AUTHOR_MAINTAINER "[email protected]")
# Parse version
file(READ VERSION META_VERSION)
+string(REPLACE "\n" "" META_VERSION ${META_VERSION})
string(REPLACE "." ";" META_VERSION_LIST ${META_VERSION})
list(GET META_VERSION_LIST 0 META_VERSION_MAJOR)
list(GET META_VERSION_LIST 1 META_VERSION_MINOR)
|
Tests: check unique options in "action" object. | @@ -294,6 +294,56 @@ class TestRouting(TestApplicationProto):
'route pass absent configure',
)
+ def test_routes_action_unique(self):
+ self.assertIn(
+ 'success',
+ self.conf(
+ {
+ "listeners": {
+ "*:7080": {"pass": "routes"},
+ "*:7081": {"pass": "applications/app"},
+ },
+ "routes": [{"action": {"proxy": "http://127.0.0.1:7081"}}],
+ "applications": {
+ "app": {
+ "type": "python",
+ "processes": {"spare": 0},
+ "path": "/app",
+ "module": "wsgi",
+ }
+ },
+ }
+ ),
+ )
+
+ self.assertIn(
+ 'error',
+ self.conf(
+ {"proxy": "http://127.0.0.1:7081", "share": self.testdir},
+ 'routes/0/action',
+ ),
+ 'proxy share',
+ )
+ self.assertIn(
+ 'error',
+ self.conf(
+ {
+ "proxy": "http://127.0.0.1:7081",
+ "pass": "applications/app",
+ },
+ 'routes/0/action',
+ ),
+ 'proxy pass',
+ )
+ self.assertIn(
+ 'error',
+ self.conf(
+ {"share": self.testdir, "pass": "applications/app"},
+ 'routes/0/action',
+ ),
+ 'share pass',
+ )
+
def test_routes_rules_two(self):
self.assertIn(
'success',
|
os/board/rtl8721csm : Support Single channel scan
Modified the scan implementation to support, Full scan/Scan with SSID/Scan with channel/Scan with SSID in specific channel | @@ -485,7 +485,22 @@ trwifi_result_e wifi_netmgr_utils_scan_ap(struct netdev *dev, trwifi_scan_config
g_scan_num = 0;
g_scan_list = NULL;
if (config) {
- if (config->ssid_length > 0) {
+ if ((config->channel >= 1) && (config->channel <= 13)) {
+ uint32_t channel;
+ uint8_t pscan_config;
+ if (config->ssid_length == 0) {
+ rtw_memset(config->ssid, 0, sizeof(config->ssid));
+ config->ssid_length = 0;
+ }
+ channel = config->channel;
+ channel &= 0xff;
+ pscan_config = PSCAN_ENABLE;
+ if (wifi_set_pscan_chan((uint8_t *)&channel, &pscan_config, 1) < 0 ) {
+ RTW_API_INFO("set pscan channel failed\n");
+ return TRWIFI_FAIL;
+ }
+ }
+ if ((config->ssid_length > 0) || ((config->channel >= 1) && (config->channel <= 13))) {
int scan_buf_len = 500;
rltk_wlan_enable_scan_with_ssid_by_extended_security(1);
if (wifi_scan_networks_with_ssid(parse_scan_with_ssid_res, NULL,
@@ -493,8 +508,8 @@ trwifi_result_e wifi_netmgr_utils_scan_ap(struct netdev *dev, trwifi_scan_config
return TRWIFI_FAIL;
}
} else {
- // scan specified channel.
- return TRWIFI_NOT_SUPPORTED;
+ RTW_API_INFO("Invalid channel range\n");
+ return TRWIFI_FAIL;
}
} else {
if (wifi_scan_networks(app_scan_result_handler, NULL ) != RTW_SUCCESS) {
|
Retrieve device serial for AOA
The serial is necessary to find the correct Android device for AOA.
If it is not explicitly provided by the user via -s, then execute "adb
getserialno" to retrieve it. | @@ -436,7 +436,23 @@ scrcpy(struct scrcpy_options *options) {
if (options->keyboard_input_mode == SC_KEYBOARD_INPUT_MODE_HID) {
#ifdef HAVE_AOA_HID
bool aoa_hid_ok = false;
- if (!sc_aoa_init(&s->aoa, options->serial)) {
+
+ char *serialno = NULL;
+
+ const char *serial = options->serial;
+ if (!serial) {
+ serialno = adb_get_serialno();
+ if (!serialno) {
+ LOGE("Could not get device serial");
+ goto aoa_hid_end;
+ }
+ serial = serialno;
+ LOGI("Device serial: %s", serial);
+ }
+
+ bool ok = sc_aoa_init(&s->aoa, serial);
+ free(serialno);
+ if (!ok) {
goto aoa_hid_end;
}
|
libopae++: add copy ctor/=op to port_error
Also make `value()` function const | @@ -38,10 +38,19 @@ class port_error : public std::exception
{
public:
port_error(uint64_t err);
+ port_error(const port_error & other)
+ : err_(other.err_)
+ {
+ }
+ port_error & operator=(const port_error & other)
+ {
+ if(this != &other) err_ = other.err_;
+ return *this;
+ }
static uint64_t read(uint8_t socket_id);
static uint64_t clear(uint8_t socket_id, uint64_t errs);
- uint64_t value() { return err_; }
+ uint64_t value() const { return err_; }
friend std::ostream & operator<<(std::ostream & str, const port_error &err);
private:
uint64_t err_;
|
reset: use bare (default) files | @@ -18,12 +18,12 @@ if [ "$1" != "-f" ]; then
fail "This is a very dangerous operation, read the man page first"
fi
+"$KDB" reset-elektra -f
+
KDBSYSTEM=$("$KDB" file system)
KDBUSER=$("$KDB" file user)
KDBSPEC=$("$KDB" file spec)
-"$KDB" reset-elektra -f
-
"$KDB" rm -rf --without-elektra system || rm -f "$KDBSYSTEM"
"$KDB" rm -rf user || rm -f "$KDBUSER"
|
Update hydcoeffs.c
Only an Active PSV needs to preserve connectivity. | @@ -62,7 +62,6 @@ static void tcvcoeff(Project *pr, int k);
static void prvcoeff(Project *pr, int k, int n1, int n2);
static void psvcoeff(Project *pr, int k, int n1, int n2);
static void fcvcoeff(Project *pr, int k, int n1, int n2);
-static void valveconnectcoeffs(Project *pr, int k, int n1, int n2);
void resistcoeff(Project *pr, int k)
@@ -318,11 +317,9 @@ void valvecoeffs(Project *pr)
{
case PRV:
prvcoeff(pr, k, n1, n2);
- valveconnectcoeffs(pr, k, n1, n2);
break;
case PSV:
psvcoeff(pr, k, n1, n2);
- valveconnectcoeffs(pr, k, n1, n2);
break;
case FCV:
fcvcoeff(pr, k, n1, n2);
@@ -332,25 +329,6 @@ void valvecoeffs(Project *pr)
}
}
-void valveconnectcoeffs(Project *pr, int k, int n1, int n2)
-/*
-**--------------------------------------------------------------
-** Input: k = valve's link index
-** n1 = upstream node of valve
-** n2 = downstream node of valve
-** Output: none
-** Purpose: insures that the off-diagonals in the rows for a
-** PRV/PSV are non-zero to preserve connectivity.
-**--------------------------------------------------------------
-*/
-{
- Smatrix *sm = &pr->hydraul.smatrix;
- double p = 1.0 / CBIG;
- sm->Aij[sm->Ndx[k]] -= p;
- sm->Aii[sm->Row[n1]] += p;
- sm->Aii[sm->Row[n2]] += p;
-}
-
void emittercoeffs(Project *pr)
/*
@@ -1057,6 +1035,8 @@ void psvcoeff(Project *pr, int k, int n1, int n2)
{
sm->F[j] += hyd->Xflow[n1];
}
+ sm->Aij[sm->Ndx[k]] -= 1.0 / CBIG; // Preserve connectivity
+ sm->Aii[j] += 1.0 / CBIG;
return;
}
|
Fix Enabling Masternode Checks | @@ -3608,7 +3608,7 @@ bool CWallet::CreateCoinStake(const CKeyStore& keystore, unsigned int nBits, int
// Masternode Payments
int payments = 1;
// start masternode payments
- bool bMasterNodePayment = true; // note was false, set true to test
+ bool bMasterNodePayment = false;
if (fTestNet){
if (GetTime() > START_MASTERNODE_PAYMENTS_TESTNET ){
|
Update include/mbedtls/mbedtls_config.h | /**
* \def MBEDTLS_PKCS7_C
*
- * This feature is a work in progress and not ready for production. The API may
- * change. Testing and validation is incomplete.
+ * This feature is a work in progress and not ready for production. Testing and
+ * validation is incomplete, and handling of malformed inputs may not be robust.
+ * The API may change.
*
* Enable PKCS7 core for using PKCS7 formatted signatures.
* RFC Link - https://tools.ietf.org/html/rfc2315
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.