message
stringlengths 6
474
| diff
stringlengths 8
5.22k
|
---|---|
options/linux: Implement getrandom | #include <bits/ensure.h>
#include <mlibc/debug.hpp>
+#include <mlibc/posix-sysdeps.hpp>
+
+#include <errno.h>
ssize_t getrandom(void *buffer, size_t max_size, unsigned int flags) {
- mlibc::infoLogger() << "\e[31mmlibc: getrandom() is a no-op\e[39m" << frg::endlog;
+ if(flags & ~(GRND_RANDOM | GRND_NONBLOCK)) {
+ errno = EINVAL;
+ return -1;
+ }
+ if(!mlibc::sys_getentropy) {
+ MLIBC_MISSING_SYSDEP();
+ errno = ENOSYS;
+ return -1;
+ }
+ if(int e = mlibc::sys_getentropy(buffer, max_size); e) {
+ errno = e;
+ return -1;
+ }
return max_size;
}
|
Add ContentsNote | @@ -22,6 +22,7 @@ public unsafe partial struct UIState
[FieldOffset(0x2A98)] public RelicNote RelicNote;
[FieldOffset(0x2AF8)] public AreaInstance AreaInstance;
+ [FieldOffset(0x29F0)] public ContentsNote ContentsNote;
[FieldOffset(0x3C60)] public RecipeNote RecipeNote;
[FieldOffset(0xA7C8)] public Director* ActiveDirector;
|
Only the fips module dependencies are relevant for fips.module.sources
Fixes | @@ -1196,12 +1196,12 @@ providers/fips.module.sources.new: configdata.pm
cd sources-tmp \
&& $$srcdir/Configure --banner=Configured enable-fips -O0 \
&& ./configdata.pm --query 'get_sources("providers/fips")' > sources1 \
- && $(MAKE) -sj 4 \
+ && $(MAKE) -sj 4 build_generated providers/fips.so \
&& find . -name '*.d' | xargs cat > dep1 \
&& $(MAKE) distclean \
&& $$srcdir/Configure --banner=Configured enable-fips no-asm -O0 \
&& ./configdata.pm --query 'get_sources("providers/fips")' > sources2 \
- && $(MAKE) -sj 4 \
+ && $(MAKE) -sj 4 build_generated providers/fips.so \
&& find . -name '*.d' | xargs cat > dep2 \
&& cat sources1 sources2 \
| grep -v ' : \\$$' | grep -v util/providers.num \
|
Memory leak in BUFR key splitting | @@ -368,8 +368,11 @@ static void search_from_accessors_list(grib_accessors_list* al, grib_accessors_l
{
char attribute_name[200] = {0,};
grib_accessor* accessor_result = 0;
+ grib_context* c = al->accessor->context;
+ int doFree = 1;
- char* accessor_name = grib_split_name_attribute(al->accessor->context, name, attribute_name);
+ char* accessor_name = grib_split_name_attribute(c, name, attribute_name);
+ if (*attribute_name == 0) doFree = 0;
while (al && al != end && al->accessor) {
if (grib_inline_strcmp(al->accessor->name, accessor_name) == 0) {
@@ -398,6 +401,7 @@ static void search_from_accessors_list(grib_accessors_list* al, grib_accessors_l
}
}
}
+ if (doFree) grib_context_free(c, accessor_name);
}
static void search_accessors_list_by_condition(grib_accessors_list* al, const char* name, codes_condition* condition, grib_accessors_list* result)
|
Improved readability in ccl_kNL function. | @@ -828,6 +828,6 @@ double ccl_kNL(ccl_cosmology *cosmo,double a,int *status) {
}
}
gsl_integration_cquad_workspace_free(workspace);
-
- return pow(sqrt(PL_integral/(6*M_PI*M_PI))*ccl_growth_factor(cosmo, a, status), -1);
+ double sigma_eta = sqrt(PL_integral/(6*M_PI*M_PI))*ccl_growth_factor(cosmo, a, status);
+ return pow(sigma_eta, -1);
}
|
Fix DirectorModule.ctor address | @@ -2649,7 +2649,7 @@ classes:
- ea: 0x14179ABF8
base: Client::Game::Event::ModuleBase
funcs:
- 0x140A78F00: ctor
+ 0x140A3EA80: ctor
Client::Game::Event::LeveDirector:
vtbls:
- ea: 0x14179CD68
|
Make the crash when coroutine tries to cancel itself more readable | @@ -392,6 +392,10 @@ static void dill_cr_close(struct dill_hvfs *vfs) {
should get control back pretty quickly. */
cr->closer = ctx->r;
int rc = dill_wait();
+ /* This assertion triggers when coroutine tries to close a bundle that
+ it is part of. There's no sane way to handle that so let's just
+ crash the process. */
+ dill_assert(!(rc == -1 && errno == ECANCELED));
dill_assert(rc == -1 && errno == 0);
}
#if defined DILL_CENSUS
|
Test picotls script update | @@ -8,8 +8,8 @@ cd ..
git clone --branch master --single-branch --shallow-submodules --recurse-submodules --no-tags https://github.com/h2o/picotls
cd picotls
git checkout "$COMMIT_ID"
-#git submodule init
-#git submodule update
+git submodule init
+git submodule update
cmake $CMAKE_OPTS .
make -j$(nproc) all
cd ..
|
Update cpudist.py
When calculating the ONCPU time, prev has left the CPU already. It is not necessary to judge whether the process state is TASK_RUNNING or not. | @@ -100,11 +100,6 @@ int sched_switch(struct pt_regs *ctx, struct task_struct *prev)
u64 pid_tgid = bpf_get_current_pid_tgid();
u32 tgid = pid_tgid >> 32, pid = pid_tgid;
-#ifdef ONCPU
- if (prev->state == TASK_RUNNING) {
-#else
- if (1) {
-#endif
u32 prev_pid = prev->pid;
u32 prev_tgid = prev->tgid;
#ifdef ONCPU
@@ -112,7 +107,6 @@ int sched_switch(struct pt_regs *ctx, struct task_struct *prev)
#else
store_start(prev_tgid, prev_pid, ts);
#endif
- }
BAIL:
#ifdef ONCPU
|
tests/posix: test ETIMEDOUT for pthread_cond_timedwait | @@ -35,6 +35,38 @@ static void test_broadcast_wakes_all() {
pthread_join(t2, NULL);
}
+static void test_timedwait_timedout() {
+ struct timespec before_now;
+ assert(!clock_gettime(CLOCK_REALTIME, &before_now));
+ before_now.tv_nsec -= 10000;
+
+ pthread_mutex_lock(&mtx);
+ int e = pthread_cond_timedwait(&cond, &mtx, &before_now);
+ assert(e == ETIMEDOUT);
+ pthread_mutex_unlock(&mtx);
+
+ long nanos_per_second = 1000000000;
+ struct timespec after_now;
+ assert(!clock_gettime(CLOCK_REALTIME, &after_now));
+ after_now.tv_nsec += nanos_per_second / 10; // 100ms
+ if (after_now.tv_nsec >= nanos_per_second) {
+ after_now.tv_nsec -= nanos_per_second;
+ after_now.tv_sec++;
+ }
+
+ pthread_mutex_lock(&mtx);
+ e = pthread_cond_timedwait(&cond, &mtx, &after_now);
+ assert(e == ETIMEDOUT);
+ pthread_mutex_unlock(&mtx);
+
+ after_now.tv_nsec += nanos_per_second;
+ pthread_mutex_lock(&mtx);
+ e = pthread_cond_timedwait(&cond, &mtx, &after_now);
+ assert(e == EINVAL);
+ pthread_mutex_unlock(&mtx);
+}
+
int main() {
test_broadcast_wakes_all();
+ test_timedwait_timedout();
}
|
ADDING FEC - ensure a symbol to have the correct size in malloc_repair_symbol_with_data | @@ -228,7 +228,7 @@ static inline repair_symbol_t *malloc_repair_symbol_with_data(picoquic_cnx_t *cn
repair_symbol_t *s = malloc_repair_symbol(cnx, repair_fpid, size);
if (!s)
return NULL;
-
+ s->data_length = size;
my_memcpy(s->data, data, size);
return s;
}
|
fix: string equality check | @@ -41,11 +41,11 @@ reddit_search(
return;
}
if (!IS_EMPTY_STRING(params->sort)
- && (!STREQ(params->sort, "relevance")
- || !STREQ(params->sort, "hot")
- || !STREQ(params->sort, "top")
- || !STREQ(params->sort, "new")
- || !STREQ(params->sort, "comments")))
+ && !(STREQ(params->sort, "relevance")
+ || STREQ(params->sort, "hot")
+ || STREQ(params->sort, "top")
+ || STREQ(params->sort, "new")
+ || STREQ(params->sort, "comments")))
{
log_error("'params.sort' should be one of: (relevance, hot, top, new, comments)");
return;
@@ -55,20 +55,20 @@ reddit_search(
return;
}
if (!IS_EMPTY_STRING(params->t)
- && (!STREQ(params->t, "hour")
- || !STREQ(params->t, "day")
- || !STREQ(params->t, "week")
- || !STREQ(params->t, "month")
- || !STREQ(params->t, "year")
- || !STREQ(params->t, "all")))
+ && !(STREQ(params->t, "hour")
+ || STREQ(params->t, "day")
+ || STREQ(params->t, "week")
+ || STREQ(params->t, "month")
+ || STREQ(params->t, "year")
+ || STREQ(params->t, "all")))
{
log_error("'params.t' should be one of: (hour, day, week, month, year, all)");
return;
}
if (!IS_EMPTY_STRING(params->type)
- && (!STREQ(params->type, "sr")
- || !STREQ(params->type, "link")
- || !STREQ(params->type, "user")))
+ && !(STREQ(params->type, "sr")
+ || STREQ(params->type, "link")
+ || STREQ(params->type, "user")))
{
log_error("'params.type' should be one of: (sr, link, user)");
return;
|
Short circuit Avahi-induced aborts. | @@ -650,7 +650,13 @@ _papplPrinterRegisterDNSSDNoLock(
if (printer->dns_sd_ref)
avahi_entry_group_free(printer->dns_sd_ref);
- printer->dns_sd_ref = avahi_entry_group_new(master, (AvahiEntryGroupCallback)dns_sd_printer_callback, printer);
+ if ((printer->dns_sd_ref = avahi_entry_group_new(master, (AvahiEntryGroupCallback)dns_sd_printer_callback, printer)) == NULL)
+ {
+ papplLogPrinter(printer, PAPPL_LOGLEVEL_ERROR, "Unable to register printer, is the Avahi daemon running?");
+ _papplDNSSDUnlock();
+ avahi_string_list_free(txt);
+ return (false);
+ }
if ((error = avahi_entry_group_add_service_strlst(printer->dns_sd_ref, AVAHI_IF_UNSPEC, AVAHI_PROTO_UNSPEC, 0, printer->dns_sd_name, "_printer._tcp", NULL, NULL, 0, NULL)) < 0)
{
@@ -963,7 +969,13 @@ _papplSystemRegisterDNSSDNoLock(
if (system->dns_sd_ref)
avahi_entry_group_free(system->dns_sd_ref);
- system->dns_sd_ref = avahi_entry_group_new(master, (AvahiEntryGroupCallback)dns_sd_system_callback, system);
+ if ((system->dns_sd_ref = avahi_entry_group_new(master, (AvahiEntryGroupCallback)dns_sd_system_callback, system)) == NULL)
+ {
+ papplLog(system, PAPPL_LOGLEVEL_ERROR, "Unable to register system, is the Avahi daemon running?");
+ _papplDNSSDUnlock();
+ avahi_string_list_free(txt);
+ return (false);
+ }
if ((error = avahi_entry_group_add_service_strlst(system->dns_sd_ref, AVAHI_IF_UNSPEC, AVAHI_PROTO_UNSPEC, 0, system->dns_sd_name, "_ipps-system._tcp", NULL, system->hostname, system->port, txt)) < 0)
{
|
Improve Win10 application icons | @@ -677,6 +677,8 @@ VOID PhGetStockApplicationIcon(
// fails the other threads.
if (PhBeginInitOnce(&initOnce))
+ {
+ if (WindowsVersion < WINDOWS_10)
{
PPH_STRING systemDirectory;
PPH_STRING dllFileName;
@@ -689,17 +691,8 @@ VOID PhGetStockApplicationIcon(
PH_STRINGREF dllBaseName;
ULONG index;
- // TODO: Find a better solution.
- if (WindowsVersion >= WINDOWS_10)
- {
- PhInitializeStringRef(&dllBaseName, L"\\imageres.dll");
- index = 11;
- }
- else
- {
PhInitializeStringRef(&dllBaseName, L"\\user32.dll");
index = 0;
- }
dllFileName = PhConcatStringRef2(&systemDirectory->sr, &dllBaseName);
PhDereferenceObject(systemDirectory);
@@ -707,6 +700,7 @@ VOID PhGetStockApplicationIcon(
ExtractIconEx(dllFileName->Buffer, index, &largeIcon, &smallIcon, 1);
PhDereferenceObject(dllFileName);
}
+ }
// Fallback icons
if (!smallIcon)
|
Add Bayer support in OV7725 driver. | @@ -181,17 +181,24 @@ static int set_pixformat(sensor_t *sensor, pixformat_t pixformat)
switch (pixformat) {
case PIXFORMAT_RGB565:
reg = COM7_SET_FMT(reg, COM7_FMT_RGB);
+ ret = SCCB_Write(sensor->slv_addr, DSP_CTRL4, 0);
break;
case PIXFORMAT_YUV422:
case PIXFORMAT_GRAYSCALE:
reg = COM7_SET_FMT(reg, COM7_FMT_YUV);
+ ret = SCCB_Write(sensor->slv_addr, DSP_CTRL4, 0);
break;
+ case PIXFORMAT_BAYER:
+ reg = COM7_SET_FMT(reg, COM7_FMT_P_BAYER);
+ ret = SCCB_Write(sensor->slv_addr, DSP_CTRL4, DSP_CTRL4_RAW8);
+ break;
+
default:
return -1;
}
// Write back register COM7
- ret = SCCB_Write(sensor->slv_addr, COM7, reg);
+ ret |= SCCB_Write(sensor->slv_addr, COM7, reg);
// Delay
systick_sleep(30);
|
sdl: filesystem: add warning message to SDL_GetBasePath() and SDL_GetPrefPath() if used on older SDL2 versions | @@ -3,22 +3,19 @@ package sdl
/*
#include "sdl_wrapper.h"
-static inline char* _SDL_GetBasePath() {
-#if (SDL_VERSION_ATLEAST(2,0,1))
- return SDL_GetBasePath();
-#else
+#if !(SDL_VERSION_ATLEAST(2,0,1))
+#pragma message("SDL_GetBasePath is not supported before SDL 2.0.1")
+static inline char* SDL_GetBasePath()
+{
return NULL;
-#endif
}
-static inline char* _SDL_GetPrefPath(const char *org, const char *app)
+#pragma message("SDL_GetPrefPath is not supported before SDL 2.0.1")
+static inline char* SDL_GetPrefPath(const char *org, const char *app)
{
-#if (SDL_VERSION_ATLEAST(2,0,1))
- return SDL_GetPrefPath(org, app);
-#else
return NULL;
-#endif
}
+#endif
*/
import "C"
@@ -26,7 +23,7 @@ import "unsafe"
// GetBasePath (https://wiki.libsdl.org/SDL_GetBasePath)
func GetBasePath() string {
- _val := C._SDL_GetBasePath()
+ _val := C.SDL_GetBasePath()
defer C.SDL_free(unsafe.Pointer(_val))
return C.GoString(_val)
}
@@ -37,7 +34,7 @@ func GetPrefPath(org, app string) string {
_app := C.CString(app)
defer C.free(unsafe.Pointer(_org))
defer C.free(unsafe.Pointer(_app))
- _val := C._SDL_GetPrefPath(_org, _app)
+ _val := C.SDL_GetPrefPath(_org, _app)
defer C.SDL_free(unsafe.Pointer(_val))
return C.GoString(_val)
}
|
tools/opensnoop: Use bpf_probe_read_user explicitly | @@ -215,8 +215,11 @@ KRETFUNC_PROBE(FNNAME, struct pt_regs *regs, int ret)
{
int dfd = PT_REGS_PARM1(regs);
const char __user *filename = (char *)PT_REGS_PARM2(regs);
- struct open_how __user *how = (struct open_how *)PT_REGS_PARM3(regs);
- int flags = how->flags;
+ struct open_how __user how;
+ int flags;
+
+ bpf_probe_read_user(&how, sizeof(struct open_how), (struct open_how*)PT_REGS_PARM3(regs));
+ flags = how.flags;
#else
KRETFUNC_PROBE(FNNAME, int dfd, const char __user *filename, struct open_how __user *how, int ret)
{
|
Simplify unnecessarily verbose checks in ++dedicate. | aud
%- ~(run in aud.gam.det)
|= c/circle
- ?. &(=(hos.c our.bol) =(nom.c nom)) c
+ ?. =(c [our.bol nom]) c
[who nom]
==
::
$config
- ?. &(=(hos.cir.det our.bol) =(nom.cir.det nom))
+ ?. =(cir.det [our.bol nom])
det
det(cir [who nom])
::
$status
- ?. &(=(hos.cir.det our.bol) =(nom.cir.det nom))
+ ?. =(cir.det [our.bol nom])
det
det(cir [who nom])
==
|
docs - remove beta designation from parallel retrieve cursor | ---
-title: Retrieving Query Results with a Parallel Retrieve Cursor (Beta)</title>
+title: Retrieving Query Results with a Parallel Retrieve Cursor</title>
---
A *parallel retrieve cursor* is an enhanced cursor implementation that you can use to create a special kind of cursor on the Greenplum Database coordinator node, and retrieve query results, on demand and in parallel, directly from the Greenplum segments.
|
use memcpy rather than structure assignment, since this might not be supported by all compilers | @@ -81,7 +81,7 @@ void lv_theme_set_current(lv_theme_t * th)
}
/*Copy group style modification callback functions*/
- current_theme.group = th->group;
+ memcpy(¤t_theme.group, &th->group, sizeof(th->group));
/*Let the object know their style might change*/
lv_obj_report_style_mod(NULL);
|
High-Level API: Add missing command to snippet | @@ -11,6 +11,7 @@ was provided.
```sh
sudo kdb mount spec.ini spec/sw/example/highlevel/#0/current ni
+kdb import spec/sw/example/highlevel/#0/current ni < spec.ini
sudo kdb spec-mount '/sw/example/highlevel/#0/current'
```
|
actually check that version is greater than 4.7 | @@ -74,8 +74,10 @@ ifndef NO_AVX2
ifeq ($(C_COMPILER), GCC)
# AVX2 support was added in 4.7.0
GCCVERSIONGTEQ4 := $(shell expr `$(CC) -dumpversion | cut -f1 -d.` \>= 4)
+GCCVERSIONGTEQ5 := $(shell expr `$(CC) -dumpversion | cut -f1 -d.` \>= 5)
GCCMINORVERSIONGTEQ7 := $(shell expr `$(CC) -dumpversion | cut -f2 -d.` \>= 7)
-ifeq ($(GCCVERSIONGTEQ4)$(GCCMINORVERSIONGTEQ7), 11)
+GCCVERSIONCHECK := $(GCCVERSIONGTEQ5)$(GCCVERSIONGTEQ4)$(GCCMINORVERSIONGTEQ7)
+ifeq ($(GCCVERSIONCHECK), $(filter $(GCCVERSIONCHECK), 011 110 111))
CCOMMON_OPT += -mavx2
endif
else
@@ -86,8 +88,10 @@ endif
ifeq ($(F_COMPILER), GFORTRAN)
# AVX2 support was added in 4.7.0
GCCVERSIONGTEQ4 := $(shell expr `$(FC) -dumpversion | cut -f1 -d.` \>= 4)
+GCCVERSIONGTEQ5 := $(shell expr `$(FC) -dumpversion | cut -f1 -d.` \>= 5)
GCCMINORVERSIONGTEQ7 := $(shell expr `$(FC) -dumpversion | cut -f2 -d.` \>= 7)
-ifeq ($(GCCVERSIONGTEQ4)$(GCCMINORVERSIONGTEQ7), 11)
+GCCVERSIONCHECK := $(GCCVERSIONGTEQ5)$(GCCVERSIONGTEQ4)$(GCCVERSIONMINORGTEQ7)
+ifeq ($(GCCVERSIONCHECK), $(filter $(GCCVERSIONCHECK), 011 110 111))
FCOMMON_OPT += -mavx2
endif
else
|
add "now-id" URL coherence hack | ta-done:(ta-update:ta (fall old *@da))
[mow ..prep(upd now.bol)]
::
+++ now-id
+ :: HACK "sanitized" now for id use, can't get mistaken for file with extension in url
+ `@da`(sub now.bol (div (mod now.bol ~s1) 2))
+::
++ poke-noun
|= a=$@(?(~ @da) [p=@da q=@da])
^- (quip move _+>)
(ta-create:ta ['a description' publ=& visi=& comm=& xeno=& ~])
?@ a
(ta-submit:ta a 'a topic' ~['with contents'])
- (ta-comment:ta p.a q.a now.bol ~['a comment' 'yo'])
+ (ta-comment:ta p.a q.a now-id ~['a comment' 'yo'])
::
++ writ
|= {wir/wire rit/riot:clay}
|= cof/config
^+ +>
::XX unhandled kind
- (ta-write /config now.bol %collections-config !>(cof))
+ (ta-write /config now-id %collections-config !>(cof))
::
++ ta-submit
|= {col/time tit/cord wat/wain}
=/ top/topic [tit src.bol wat]
- (ta-write /topic [col now.bol] %collections-topic !>(top))
+ (ta-write /topic [col now-id] %collections-topic !>(top))
::
++ ta-resubmit
|= {col/time wen/@da tit/cord wat/wain}
++ ta-comment
|= {col/time top/@da com/?(~ @da) wat/wain}
^+ +>
- ?~ com $(com now.bol) :: new comment
+ ?~ com $(com now-id) :: new comment
=; res/$@(~ _+>.$) ?^(res res +>.$)
%+ biff (ta-get-topic col top)
|= [^ cos=(map @da {@da comment}) ~]
=/ old/{@da comment}
- (fall (~(get by cos) com) [now.bol src.bol wat])
+ (fall (~(get by cos) com) [now-id src.bol wat])
?. =(who.old src.bol) ..ta-comment ::REVIEW error?
%^ ta-write /comment
[col top com]
|
Added some crawlers
Hi, I have some crawlers found in my log-files. I don't know what PxBroker really is, but Seekport is an old search engine (currently disabled) but their bots seems to be active...
Greetings,
Alex | @@ -279,6 +279,8 @@ static const char *browsers[][2] = {
{"Nmap Scripting Engine", "Crawlers"},
{"sqlmap", "Crawlers"},
{"Jorgee", "Crawlers"},
+ {"PxBroker", "Crawlers"},
+ {"Seekport", "Crawlers"},
/* Podcast fetchers */
{"Downcast", "Podcasts"},
|
enable pmix with slurm build | %include %{_sourcedir}/OHPC_macros
%global _with_mysql 1
+%global slurm_with_pmix %{OHPC_LIBS}/pmix
%define pname slurm
@@ -117,6 +118,8 @@ BuildRequires: klogd sysconfig
%endif
Requires: %{pname}-plugins%{PROJ_DELIM}
+BuildRequires: pmix%{PROJ_DELIM}
+Requires: pmix%{PROJ_DELIM}
#!BuildIgnore: post-build-checks
%ifos linux
|
docs : update filesystem usage guide
This patch adds the smartfs filesystem usage guide on
new board. | @@ -18,7 +18,7 @@ Don't call architecture codes from application directly. When protected build en
3. [How to add static library](HowToAddStaticLibrary.md)
## File System
-Will be updated
+1. [How to use SmartFS](HowToUseSmartFS.md)
## Network
1. How to use LWIP (will be updated)
|
Update keypoints.py script. | @@ -10,7 +10,8 @@ sensor.reset()
# Sensor settings
sensor.set_contrast(1)
sensor.set_gainceiling(16)
-sensor.set_framesize(sensor.QCIF)
+sensor.set_framesize(sensor.VGA)
+sensor.set_windowing((240, 240))
sensor.set_pixformat(sensor.GRAYSCALE)
sensor.set_auto_gain(False, value=100)
@@ -32,14 +33,16 @@ clock = time.clock()
while (True):
clock.tick()
img = sensor.snapshot()
- # NOTE: See the docs for other arguments
- kpts2 = img.find_keypoints(max_keypoints=100, scale_factor=1.2)
-
- if (kpts2 and kpts1 == None):
- kpts1 = kpts2
+ if (kpts1 == None):
+ # NOTE: By default find_keypoints returns multi-scale keypoints extracted from an image pyramid.
+ kpts1 = img.find_keypoints(max_keypoints=150, threshold=20, scale_factor=1.1)
draw_keypoints(img, kpts1)
- elif kpts2:
- c = image.match_descriptor(kpts1, kpts2, threshold=85)
+ else:
+ # NOTE: When extracting keypoints to match the first descriptor, we use normalized=True to extract
+ # keypoints from the first scale only, which will match one of the scales in the first descriptor.
+ kpts2 = img.find_keypoints(max_keypoints=150, threshold=20, normalized=True)
+ if (kpts2):
+ c = image.match_descriptor(kpts1, kpts2, threshold=80)
match = c[6] # C[6] contains the number of matches.
if (match>5):
img.draw_rectangle(c[2:6])
|
Make h2o_buffer_append's return an int since it's used as a boolean | @@ -245,7 +245,7 @@ h2o_iovec_t h2o_buffer_reserve(h2o_buffer_t **inbuf, size_t min_guarantee);
* copies @len bytes from @src to @dst, calling h2o_buffer_reserve
* @return 0 if the allocation failed, 1 otherwise
*/
-static ssize_t h2o_buffer_append(h2o_buffer_t **dst, void *src, size_t len);
+static int h2o_buffer_append(h2o_buffer_t **dst, void *src, size_t len);
/**
* throws away given size of the data from the buffer.
* @param delta number of octets to be drained from the buffer
@@ -392,7 +392,7 @@ inline void h2o_buffer_link_to_pool(h2o_buffer_t *buffer, h2o_mem_pool_t *pool)
*slot = buffer;
}
-inline ssize_t h2o_buffer_append(h2o_buffer_t **dst, void *src, size_t len)
+inline int h2o_buffer_append(h2o_buffer_t **dst, void *src, size_t len)
{
h2o_iovec_t buf = h2o_buffer_reserve(dst, len);
if (buf.base == NULL)
|
Save & load the SPKI disk cache using secure coding. | @@ -194,7 +194,13 @@ static unsigned int getAsn1HeaderSize(NSString *publicKeyType, NSNumber *publicK
// Update the cache on the filesystem
if (self.spkiCacheFilename.length > 0) {
- NSData *serializedSpkiCache = [NSKeyedArchiver archivedDataWithRootObject:_spkiCache];
+ NSData *serializedSpkiCache = nil;
+ if (@available(iOS 11.0, *)) { // prefer NSSecureCoding API when available
+ serializedSpkiCache = [NSKeyedArchiver archivedDataWithRootObject:_spkiCache requiringSecureCoding:YES error:nil];
+ } else {
+ serializedSpkiCache = [NSKeyedArchiver archivedDataWithRootObject:_spkiCache];
+ }
+
if ([serializedSpkiCache writeToURL:[self SPKICachePath] atomically:YES] == NO)
{
NSAssert(false, @"Failed to write cache");
@@ -210,8 +216,12 @@ static unsigned int getAsn1HeaderSize(NSString *publicKeyType, NSNumber *publicK
NSMutableDictionary *spkiCache = nil;
NSData *serializedSpkiCache = [NSData dataWithContentsOfURL:[self SPKICachePath]];
if (serializedSpkiCache) {
+ if (@available(iOS 11.0, *)) { // prefer NSSecureCoding API when available
+ spkiCache = [NSKeyedUnarchiver unarchivedObjectOfClass:[SPKICacheDictionnary class] fromData:serializedSpkiCache error:nil];
+ } else {
spkiCache = [NSKeyedUnarchiver unarchiveObjectWithData:serializedSpkiCache];
}
+ }
return spkiCache;
}
|
Have jsonfindptrs factor out escape_needed
On a mid-range x86_64 laptop, processing the 181 MiB citylots.json file
from github.com/zemirco/sf-city-lots-json:
$ time gen/bin/example-jsonfindptrs < citylots.json > /dev/null
Before this commit:
real 0m7.550s
After:
real 0m7.333s
Ratio: 1.03x | @@ -313,19 +313,21 @@ class JsonThing {
// ----
-std::string //
-escape(std::string s) {
- for (char& c : s) {
+bool //
+escape_needed(const std::string& s) {
+ for (const char& c : s) {
if ((c == '~') || (c == '/') || (c == '\n') || (c == '\r')) {
- goto escape_needed;
+ return true;
+ }
}
+ return false;
}
- return s;
-escape_needed:
+std::string //
+escape(const std::string& s) {
std::string e;
e.reserve(8 + s.length());
- for (char& c : s) {
+ for (const char& c : s) {
switch (c) {
case '~':
e += "~0";
@@ -377,11 +379,15 @@ print_json_pointers(JsonThing& jt, uint32_t depth) {
case JsonThing::Kind::Object:
g_dst += "/";
for (auto& kv : jt.value.o) {
+ if (!escape_needed(kv.first)) {
+ g_dst += kv.first;
+ } else {
std::string e = escape(kv.first);
- if (e.empty() && !kv.first.empty()) {
+ if (e.empty()) {
return "main: unsupported \"\\u000A\" or \"\\u000D\" in object key";
}
g_dst += e;
+ }
TRY(print_json_pointers(kv.second, depth));
g_dst.resize(n + 1);
}
|
TestKextInject: Add SetApfsTimeout to testing code | @@ -381,6 +381,14 @@ ApplyKextPatches (
} else {
DEBUG ((DEBUG_WARN, "[OK] Success KernelQuirkForceSecureBootScheme\n"));
}
+
+ Status = PrelinkedContextApplyQuirk (Context, KernelQuirkSetApfsTrimTimeout, KernelVersion);
+ if (EFI_ERROR (Status)) {
+ DEBUG ((DEBUG_WARN, "[FAIL] Failed to apply KernelQuirkSetApfsTrimTimeout - %r\n", Status));
+ FailedToProcess = TRUE;
+ } else {
+ DEBUG ((DEBUG_WARN, "[OK] Success KernelQuirkSetApfsTrimTimeout\n"));
+ }
}
VOID
|
Add recursive init in readme (just in case). | @@ -534,7 +534,7 @@ Usually the developer is the same who does the fork, but it may be possible that
Follow these steps to build and install **METACALL** manually.
``` sh
-git clone https://github.com/metacall/core.git
+git clone --recursive https://github.com/metacall/core.git
mkdir core/build && cd core/build
cmake ..
cmake --build . --target install
|
Fixed error on rd=3 | @@ -863,5 +863,5 @@ void kvz_search_cu_intra(encoder_state_t * const state,
uint8_t best_mode_i = select_best_mode_index(modes, costs, number_of_modes);
*mode_out = modes[best_mode_i];
- *cost_out = best_rough_cost;
+ *cost_out = skip_rough_search ? costs[best_mode_i]:best_rough_cost;
}
|
fixup attach_edns check for streamtcp (in case of future enhancements and smaller buffer sizes). | @@ -143,6 +143,8 @@ write_q(int fd, int udp, SSL* ssl, sldns_buffer* buf, uint16_t id,
edns.edns_present = 1;
edns.bits = EDNS_DO;
edns.udp_size = 4096;
+ if(sldns_buffer_capacity(buf) >=
+ sldns_buffer_limit(buf)+calc_edns_field_size(&edns))
attach_edns_record(buf, &edns);
}
|
kdb: remove null key setting in header file | @@ -28,7 +28,7 @@ public:
virtual std::string getSynopsis () override
{
- return "<name> [<value>]";
+ return "<name> <value>";
}
virtual std::string getShortHelpText () override
@@ -38,8 +38,7 @@ public:
virtual std::string getLongHelpText () override
{
- return "If no value is given, it will be set to a null-value\n"
- "To get an empty value you need to quote like \"\" (depending on shell)\n"
+ return "To get an empty value you need to quote like \"\" (depending on shell)\n"
"To set a negative value you need to use '--' to stop option processing.\n"
"(e.g. 'kdb set -- /tests/neg -3')\n";
}
|
Test invalid character reference with a decimal value
Previous limit test used hexed, which has a difference parse path. | @@ -5340,6 +5340,20 @@ START_TEST(test_invalid_character_entity_3)
}
END_TEST
+START_TEST(test_invalid_character_entity_4)
+{
+ const char *text =
+ "<!DOCTYPE doc [\n"
+ " <!ENTITY entity '�'>\n" /* = � */
+ "]>\n"
+ "<doc>&entity;</doc>";
+
+ expect_failure(text, XML_ERROR_BAD_CHAR_REF,
+ "Out of range character reference not faulted");
+}
+END_TEST
+
+
/* Test that processing instructions are picked up by a default handler */
START_TEST(test_pi_handled_in_default)
{
@@ -11823,6 +11837,7 @@ make_suite(void)
tcase_add_test(tc_basic, test_invalid_character_entity);
tcase_add_test(tc_basic, test_invalid_character_entity_2);
tcase_add_test(tc_basic, test_invalid_character_entity_3);
+ tcase_add_test(tc_basic, test_invalid_character_entity_4);
tcase_add_test(tc_basic, test_pi_handled_in_default);
tcase_add_test(tc_basic, test_comment_handled_in_default);
tcase_add_test(tc_basic, test_pi_yml);
|
xpath BUGFIX bad LY_CHECK macro | @@ -7260,7 +7260,7 @@ moveto:
/* Predicate* */
while (!lyxp_check_token(NULL, exp, *tok_idx, LYXP_TOKEN_BRACK1)) {
rc = eval_predicate(exp, tok_idx, set, options, 1);
- LY_CHECK_RET(rc);
+ LY_CHECK_GOTO(rc, cleanup);
}
cleanup:
|
docs/library: Fix docs for machine.WDT to specify millisecond timeout. | @@ -15,16 +15,18 @@ Example usage::
wdt = WDT(timeout=2000) # enable it with a timeout of 2s
wdt.feed()
-Availability of this class: pyboard, WiPy.
+Availability of this class: pyboard, WiPy, esp8266, esp32.
Constructors
------------
.. class:: WDT(id=0, timeout=5000)
- Create a WDT object and start it. The timeout must be given in seconds and
- the minimum value that is accepted is 1 second. Once it is running the timeout
- cannot be changed and the WDT cannot be stopped either.
+ Create a WDT object and start it. The timeout must be given in milliseconds.
+ Once it is running the timeout cannot be changed and the WDT cannot be stopped either.
+
+ Notes: On the esp32 the minimum timeout is 1 second. On the esp8266 a timeout
+ cannot be specified, it is determined by the underlying system.
Methods
-------
|
Limit the size of the new heap after GC.
This change set limits the size of the heap after a GC event, so that the allocations for the heap and stack do not grow without bound, after a GC. | @@ -49,12 +49,23 @@ HOT_FUNC term *memory_heap_alloc(Context *c, uint32_t size)
enum MemoryGCResult memory_ensure_free(Context *c, uint32_t size)
{
- if (context_avail_free_memory(c) < size + MIN_FREE_SPACE_SIZE) {
- if (UNLIKELY(memory_gc(c, MAX(context_memory_size(c) * 2, context_memory_size(c) + size)) != MEMORY_GC_OK)) {
+ size_t free_space = context_avail_free_memory(c);
+ if (free_space < size + MIN_FREE_SPACE_SIZE) {
+ size_t memory_size = context_memory_size(c);
+ if (UNLIKELY(memory_gc(c, memory_size + size + MIN_FREE_SPACE_SIZE) != MEMORY_GC_OK)) {
//TODO: handle this more gracefully
TRACE("Unable to allocate memory for GC\n");
return MEMORY_GC_ERROR_FAILED_ALLOCATION;
}
+ size_t new_free_space = context_avail_free_memory(c);
+ size_t new_minimum_free_space = 2 * (size + MIN_FREE_SPACE_SIZE);
+ if (new_free_space > new_minimum_free_space) {
+ size_t new_memory_size = context_memory_size(c);
+ if (UNLIKELY(memory_gc(c, (new_memory_size - new_free_space) + new_minimum_free_space) != MEMORY_GC_OK)) {
+ TRACE("Unable to allocate memory for GC shrink\n");
+ return MEMORY_GC_ERROR_FAILED_ALLOCATION;
+ }
+ }
}
return MEMORY_GC_OK;
|
runtimes/singularity: fix sysconfdir | @@ -99,7 +99,7 @@ cd $GOPATH/%{singgopath}/builddir
mkdir -p $RPM_BUILD_ROOT%{_mandir}/man1
make DESTDIR=$RPM_BUILD_ROOT install man
-chmod 644 $RPM_BUILD_ROOT%{_sysconfdir}/singularity/actions/*
+chmod 644 $RPM_BUILD_ROOT%{install_path}/etc/singularity/actions/*
# NO_BRP_CHECK_RPATH has no effect on CentOS 7
export NO_BRP_CHECK_RPATH=true
|
fix uninitialized memory in verification | @@ -196,6 +196,7 @@ NTSTATUS KphVerifyFile(
NT_ASSERT(KphpTrustedPublicKeyHandle);
signatureFileHandle = NULL;
+ RtlZeroMemory(&signatureFileName, sizeof(signatureFileName));
if ((FileName->Length <= KphpSigExtension.Length) ||
(FileName->Buffer[0] != L'\\'))
|
hv: assign: clean up HV_DEBUG usage related to vuart pin
replace HV_DEBUG with CONFIG_COM_IRQ which is more reasonable
Acked-by: Eddie Dong | @@ -52,7 +52,7 @@ ptdev_lookup_entry_by_vpin(struct acrn_vm *vm, uint8_t virt_pin, bool pic_pin)
return entry;
}
-#ifdef HV_DEBUG
+#ifdef CONFIG_COM_IRQ
static bool ptdev_hv_owned_intx(const struct acrn_vm *vm, const union source_id *virt_sid)
{
/* vm0 vuart pin is owned by hypervisor under debug version */
@@ -62,7 +62,7 @@ static bool ptdev_hv_owned_intx(const struct acrn_vm *vm, const union source_id
return false;
}
}
-#endif
+#endif /* CONFIG_COM_IRQ */
static uint64_t calculate_logical_dest_mask(uint64_t pdmask)
{
@@ -645,11 +645,12 @@ int ptdev_intx_pin_remap(struct acrn_vm *vm, uint8_t virt_pin,
*/
/* no remap for hypervisor owned intx */
-#ifdef HV_DEBUG
+#ifdef CONFIG_COM_IRQ
if (ptdev_hv_owned_intx(vm, &virt_sid)) {
goto END;
}
-#endif
+#endif /* CONFIG_COM_IRQ */
+
/* query if we have virt to phys mapping */
spinlock_obtain(&ptdev_lock);
entry = ptdev_lookup_entry_by_vpin(vm, virt_pin, pic_pin);
|
framework/task_manager: Move wrong #endif condition
Move wrong #endif for pthread | @@ -990,6 +990,7 @@ static int taskmgr_register_pthread(tm_pthread_info_t *pthread_info, int permiss
return handle;
}
+#endif
static int taskmgr_set_termination_cb(int type, void *data, int pid)
{
@@ -1029,7 +1030,6 @@ int task_manager_run_exit_cb(int pid)
}
return OK;
}
-#endif
static int taskmgr_dealloc_broadcast_msg(int msg)
{
|
Update main.bib
Replace the 2017arXiv170103592C reference by published version 2017A&A...602A..72C (JEC) | @@ -1054,16 +1054,20 @@ archivePrefix = "arXiv",
adsnote = {Provided by the SAO/NASA Astrophysics Data System}
}
-@ARTICLE{2017arXiv170103592C,
+@ARTICLE{2017A&A...602A..72C,
author = {{Campagne}, J.-E. and {Neveu}, J. and {Plaszczynski}, S.},
title = "{Angpow: a software for the fast computation of accurate tomographic power spectra}",
- journal = {ArXiv e-prints},
+ journal = {\aap},
archivePrefix = "arXiv",
eprint = {1701.03592},
- keywords = {Astrophysics - Cosmology and Nongalactic Astrophysics},
+ keywords = {large-scale structure of Universe, methods: numerical},
year = 2017,
- month = jan,
- adsurl = {http://adsabs.harvard.edu/abs/2017arXiv170103592C},
+ month = jun,
+ volume = 602,
+ eid = {A72},
+ pages = {A72},
+ doi = {10.1051/0004-6361/201730399},
+ adsurl = {http://adsabs.harvard.edu/abs/2017A%26A...602A..72C},
adsnote = {Provided by the SAO/NASA Astrophysics Data System}
}
|
btc: fix safari bitcoin address copy to clipboard
Using navigator.clipboard instead of document.execCommand('copy') works
in safari as well. | @@ -28,15 +28,7 @@ export default class Balance extends Component {
copyAddress(arg) {
let address = this.props.state.address;
- function listener(e) {
- e.clipboardData.setData('text/plain', address);
- e.preventDefault();
- }
-
- document.addEventListener('copy', listener);
- document.execCommand('copy');
- document.removeEventListener('copy', listener);
-
+ navigator.clipboard.writeText(address);
this.props.api.btcWalletCommand({'gen-new-address': null});
if (arg === 'button'){
|
Update pkg/npm/http-api/src/Urbit.ts | @@ -144,7 +144,7 @@ export class Urbit {
code,
verbose = false,
}: AuthenticationInterface) {
- const airlock = new Urbit(url.startsWith('http') ? url : `http://${url}, code);
+ const airlock = new Urbit(url.startsWith('http') ? url : `http://${url}`, code);
airlock.verbose = verbose;
airlock.ship = ship;
await airlock.connect();
|
[ci] remove gcc-4.6-base:i386 from ci env. | @@ -7,7 +7,7 @@ before_script:
# travis has changed to 64-bit and we require 32-bit compatibility libraries
- sudo apt-get update
# clang
- - "sudo apt-get -qq install gcc-multilib libc6:i386 libgcc1:i386 gcc-4.6-base:i386 libstdc++5:i386 libstdc++6:i386 libsdl-dev scons || true"
+ - "sudo apt-get -qq install gcc-multilib libc6:i386 libgcc1:i386 libstdc++5:i386 libstdc++6:i386 libsdl-dev scons || true"
# - sudo apt-get -qq install gcc-arm-none-eabi
# - "[ $RTT_TOOL_CHAIN = 'sourcery-arm' ] && export RTT_EXEC_PATH=/usr/bin && arm-none-eabi-gcc --version || true"
# - "[ $RTT_TOOL_CHAIN = 'sourcery-arm' ] && curl -s https://sourcery.mentor.com/public/gnu_toolchain/arm-none-eabi/arm-2014.05-28-arm-none-eabi-i686-pc-linux-gnu.tar.bz2 | sudo tar xjf - -C /opt && export RTT_EXEC_PATH=/opt/arm-2014.05/bin && /opt/arm-2014.05/bin/arm-none-eabi-gcc --version || true"
|
Fixes for BLE host connections w/ split support. | @@ -130,12 +130,12 @@ static struct bt_conn_auth_cb zmk_ble_auth_cb_display = {
static const struct bt_data zmk_ble_ad[] = {
BT_DATA_BYTES(BT_DATA_FLAGS, (BT_LE_AD_GENERAL | BT_LE_AD_NO_BREDR)),
BT_DATA_BYTES(BT_DATA_UUID16_SOME,
-#if !IS_ENABLED(CONFIG_ZMK_SPLIT_BLE)
+#if !IS_ENABLED(CONFIG_ZMK_SPLIT_BLE_ROLE_PERIPHERAL)
0x12, 0x18, /* HID Service */
#endif
0x0f, 0x18 /* Battery Service */
),
-#if IS_ENABLED(CONFIG_ZMK_SPLIT_BLE)
+#if IS_ENABLED(CONFIG_ZMK_SPLIT_BLE_ROLE_PERIPHERAL)
BT_DATA_BYTES(BT_DATA_UUID128_ALL,
ZMK_SPLIT_BT_SERVICE_UUID)
#endif
|
docket: better hash mismatch output
Could be useful to know both hashes when a mismatch happens. | ::
[%glob @ @ ~]
=* base i.t.path
- =* hash (slav %uv i.t.t.path)
+ =/ hash (slav %uv i.t.t.path)
=/ desk ~|(path/path (~(got by by-base) i.t.path))
=/ =charge ~|(desk/desk (~(got by charges) desk))
?> ?=(%glob -.chad.charge)
- ?> =(hash (hash-glob:cc glob.chad.charge))
+ =/ have (hash-glob:cc glob.chad.charge)
+ ~| [%glob-unavailable requested=hash have=have]
+ ?> =(hash have)
:_ state
:~ [%give %fact ~[path] %glob !>(`glob`glob.chad.charge)]
[%give %kick ~[path] ~]
=/ =docket docket:(~(got by charges) desk)
?. ?=([%glob * %ames *] href.docket)
`state
- ?. =(hash.glob-reference.href.docket (hash-glob glob))
- ~& [dap.bowl %glob-hash-mismatch on=desk from=src.bowl]
- `state
+ =* want hash.glob-reference.href.docket
+ =/ have (hash-glob glob)
+ ?. =(want have)
+ %. `state
+ %- slog
+ :~ leaf+"docket: glob hash mismatch on {<desk>} from {<src.bowl>}"
+ leaf+"expected: {<want>}"
+ leaf+"received: {<have>}"
+ ==
=. charges (new-chad:cha glob+glob)
=. by-base (~(put by by-base) base.href.docket desk)
[~[add-fact:cha] state]
|
can send one UDP packet; repeated tx fails ENOMEM b/c we're taking out of a TakeCell for the kbuf in the driver | @@ -25,29 +25,22 @@ int main(void) {
int temp, lux;
char packet[64];
- /* { IEEE802.15.4 configuration... temporary until we have full IP
+ /*
ieee802154_set_address(0x1540);
ieee802154_set_pan(0xABCD);
ieee802154_config_commit();
ieee802154_up();
- } IEEE802.15.4 configuration */
+ */
ipv6_addr_t ifaces[10];
udp_list_ifaces(ifaces, 10);
- /*
- printf("Listed %d out of 10 possible interfaces.\n", n);
- for(int i = 0; i < n; i++) {
- printf("Interface %d: ", i);
- print_ipv6(&ifaces[i]);
- printf("\n");
- }
- */
sock_handle_t handle;
sock_addr_t addr = {
ifaces[0],
15123
};
+
printf("Opening socket on ");
print_ipv6(&ifaces[0]);
printf(" : %d\n", addr.port);
@@ -58,7 +51,7 @@ char packet[64];
16123
};
- // while (1) {
+ while (1) {
temperature_read_sync(&temp);
humidity_read_sync(&humi);
ambient_light_read_intensity_sync(&lux);
@@ -66,14 +59,6 @@ char packet[64];
int len = snprintf(packet, sizeof(packet), "%d deg C; %d%%; %d lux;\n",
temp, humi, lux);
- /*
- int err = ieee802154_send(0x0802, // destination address (short MAC address)
- SEC_LEVEL_NONE, // No encryption
- 0, // unused since SEC_LEVEL_NONE
- NULL, // unused since SEC_LEVEL_NONE
- packet,
- len);
- */
printf("Sending packet (length %d) --> ", len);
print_ipv6(&(destination.addr));
printf(" : %d\n", destination.port);
@@ -98,7 +83,7 @@ char packet[64];
*/
delay_ms(1000);
- // }
+ }
udp_close(&handle);
}
|
doc: simplify documentation for function keyNew | *
* To just get a key object, simple do:
*
- * @snippet keyNew.c Simple
+ * @snippet keyNew.c With Name
*
* keyNew() allocates memory for a key object and keyDel() cleans
* everything up.
*
- * We can also give an empty key name and a KEY_END tag with the same
- * effect as before:
- *
- * @snippet keyNew.c Alternative
- *
- * But we can also give the key a proper name right from the start:
- *
- * @snippet keyNew.c With Name
- *
* If you want the key object to contain a name, value, comment and other
* meta info read on.
*
|
SetupTool: Update solution to VS2019 | <PropertyGroup Label="Globals">
<ProjectGuid>{5C00734F-F50A-49FC-9D2A-F6EE51ECB00F}</ProjectGuid>
<RootNamespace>CustomSetupTool</RootNamespace>
- <WindowsTargetPlatformVersion>10.0.17763.0</WindowsTargetPlatformVersion>
+ <WindowsTargetPlatformVersion>10.0</WindowsTargetPlatformVersion>
<ProjectName>CustomSetupTool</ProjectName>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<UseDebugLibraries>true</UseDebugLibraries>
- <PlatformToolset>v141</PlatformToolset>
+ <PlatformToolset>v142</PlatformToolset>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries>
- <PlatformToolset>v141</PlatformToolset>
+ <PlatformToolset>v142</PlatformToolset>
<WholeProgramOptimization>true</WholeProgramOptimization>
<CharacterSet>Unicode</CharacterSet>
<SpectreMitigation>Spectre</SpectreMitigation>
|
Simplify tracing.
Less noise, less code. | @@ -203,6 +203,9 @@ const run = {re, str, idx, wholestr
;;
while re.nthr > 0
while re.runq != Zthr
+ if re.trace
+ std.put("switch\n")
+ ;;
/* set up the next thread */
thr = re.runq
re.runq = thr.next
@@ -423,35 +426,20 @@ const within = {re, str
const itrace = {re, thr, inst
match inst
- | `Ibyte b: trace(re, thr, "\t{}: Byte ({})\n", thr.ip, b)
- | `Irange (lo, hi): trace(re, thr, "\t{}: Range {}, {}\n", thr.ip, lo, hi)
- | `Ilbra m: trace(re, thr, "\t{}: Lbra {}\n", thr.ip, m)
- | `Irbra m: trace(re, thr, "\t{}: Rbra {}\n", thr.ip, m)
+ | `Ibyte b: std.put("\t{}.{}:\tByte ({})\n", thr.tid, thr.ip, thr.tid, thr.ip, b)
+ | `Irange (lo, hi): std.put("\t{}.{}:\tRange {}, {}\n", thr.tid, thr.ip, lo, hi)
+ | `Ilbra m: std.put("\t{}.{}:\tLbra {}\n", thr.tid, thr.ip, m)
+ | `Irbra m: std.put("\t{}.{}:\tRbra {}\n", thr.tid, thr.ip, m)
/* anchors */
- | `Ibol: trace(re, thr, "\t{}: Bol\n", thr.ip)
- | `Ieol: trace(re, thr, "\t{}: Eol\n", thr.ip)
- | `Ibow: trace(re, thr, "\t{}: Bow\n", thr.ip)
- | `Ieow: trace(re, thr, "\t{}: Eow\n", thr.ip)
+ | `Ibol: std.put("\t{}.{}:\tBol\n", thr.tid, thr.ip)
+ | `Ieol: std.put("\t{}.{}:\tEol\n", thr.tid, thr.ip)
+ | `Ibow: std.put("\t{}.{}:\tBow\n", thr.tid, thr.ip)
+ | `Ieow: std.put("\t{}.{}:\tEow\n", thr.tid, thr.ip)
/* control flow */
- | `Ifork (l, r): trace(re, thr, "\t{}: Fork {}, {}\n", thr.ip, l, r)
- | `Ijmp ip: trace(re, thr, "\t{}: Jmp {}\n", thr.ip, ip)
- | `Imatch m: trace(re, thr, "\t{}: Match {}\n", thr.ip, m)
- ;;
-}
-
-const trace : (re : regex#, thr : rethread#, msg : byte[:], args : ... -> void) = {re, thr, msg, args
- var ap
-
- if re.trace && thr != Zthr
- ap = std.vastart(&args)
- std.putv(msg, &ap)
- std.put("\t{}\n", re.pat)
- std.put("\t")
- for var i = 0; i < re.pcidx[thr.ip] - 1; i++
- std.put(" ")
- ;;
- std.put("^\n")
+ | `Ifork (l, r): std.put("\t{}.{}:\tFork {}, {}\n", thr.tid, thr.ip, l, r)
+ | `Ijmp ip: std.put("\t{}.{}:\tJmp {}\n", thr.tid, thr.ip, ip)
+ | `Imatch m: std.put("\t{}.{}:\tMatch {}\n", thr.tid, thr.ip, m)
;;
}
|
nimble/ll: Fix not clearing scan rsp on scan duration timeout
If timeout fired when we were waiting for scan response,
scan_rsp_pending would be left set and this would trigger assert
when starting next scan. | @@ -1269,6 +1269,12 @@ ble_ll_scan_sm_stop(int chk_disable)
scansm->ext_scanning = 0;
}
#endif
+
+ /* Update backoff if we failed to receive scan response */
+ if (scansm->scan_rsp_pending) {
+ scansm->scan_rsp_pending = 0;
+ ble_ll_scan_req_backoff(scansm, 0);
+ }
OS_EXIT_CRITICAL(sr);
/* Count # of times stopped */
|
fix pep again :) | @@ -1934,7 +1934,9 @@ def train(pool=None, params=None, dtrain=None, logging_level=None, verbose=None,
return model
-def cv(pool=None, params=None, dtrain=None, iterations=None, num_boost_round=None, fold_count=3, nfold=None, inverted=False, partition_random_seed=0, seed=None, shuffle=True, logging_level=None, stratified=False):
+def cv(pool=None, params=None, dtrain=None, iterations=None, num_boost_round=None,
+ fold_count=3, nfold=None, inverted=False, partition_random_seed=0, seed=None,
+ shuffle=True, logging_level=None, stratified=False):
"""
Cross-validate the CatBoost model.
|
Make Pool ShareMultiplier optional | @@ -377,7 +377,7 @@ Pool Fee: {(poolConfig.RewardRecipients?.Any() == true ? poolConfi
}
public abstract double HashrateFromShares(double shares, double interval);
- public abstract double ShareMultiplier { get; }
+ public virtual double ShareMultiplier => 1;
public virtual async Task RunAsync(CancellationToken ct)
{
|
acvp_test: Do not expect exact number of self tests
There might be more because internal instances of the DRBG
might be initialized for the first time and thus
self-tested as well. | @@ -127,7 +127,7 @@ static int ecdsa_keygen_test(int id)
|| !TEST_int_gt(EVP_PKEY_keygen_init(ctx), 0)
|| !TEST_true(EVP_PKEY_CTX_set_group_name(ctx, tst->curve_name))
|| !TEST_int_gt(EVP_PKEY_keygen(ctx, &pkey), 0)
- || !TEST_int_eq(self_test_args.called, 3)
+ || !TEST_int_ge(self_test_args.called, 3)
|| !TEST_true(pkey_get_bn_bytes(pkey, OSSL_PKEY_PARAM_PRIV_KEY, &priv,
&priv_len))
|| !TEST_true(pkey_get_bn_bytes(pkey, OSSL_PKEY_PARAM_EC_PUB_X, &pubx,
|
efi: makefile: install the EFI configuration file
The EFI configuration example file is not installed.
This patch adds a rule to install the configuration example file
at /usr/share/acrn | @@ -76,10 +76,12 @@ LDFLAGS=-T $(LDSCRIPT) -Bsymbolic -shared -nostdlib -znocombreloc \
EFIBIN=$(HV_OBJDIR)/$(HV_FILE).efi
BOOT=$(EFI_OBJDIR)/boot.efi
+CONF_FILE=$(CURDIR)/../clearlinux/acrn.conf
+
all: $(EFIBIN)
$(OBJCOPY) --add-section .hv="$(HV_OBJDIR)/$(HV_FILE).bin" --change-section-vma .hv=0x6e000 --set-section-flags .hv=alloc,data,contents,load --section-alignment 0x1000 $(EFI_OBJDIR)/boot.efi $(EFIBIN)
-install: $(EFIBIN)
+install: $(EFIBIN) install-conf
install -D $(EFIBIN) $(DESTDIR)/usr/share/acrn/$(HV_FILE).efi
$(EFIBIN): $(BOOT)
@@ -89,6 +91,10 @@ $(EFI_OBJDIR)/boot.efi: $(EFI_OBJDIR)/boot.so
$(EFI_OBJDIR)/boot.so: $(ACRN_OBJS) $(FS)
$(LD) $(LDFLAGS) -o $@ $^ -lgnuefi -lefi $(shell $(CC) $(CFLAGS) -print-libgcc-file-name)
+install-conf: $(CONF_FILE)
+ install -d $(DESTDIR)/usr/share/acrn/demo
+ install -t $(DESTDIR)/usr/share/acrn/demo -m 644 $^
+
clean:
rm -f $(BOOT) $(HV_OBJDIR)/$(HV_FILE).efi $(EFI_OBJDIR)/boot.so $(ACRN_OBJS) $(FS)
|
refine apicv capability check
deinfe rule like below:
must support TPR shadow and apicv access
based on above, check apicv register support
based on above, check virtual interrupt delivery and post
interrupt support
Changes to be committed:
modified: arch/x86/cpu_caps.c | @@ -218,27 +218,32 @@ static void detect_ept_cap(void)
static void detect_apicv_cap(void)
{
- uint8_t features;
+ uint8_t features = 0U;
uint64_t msr_val;
msr_val = msr_read(MSR_IA32_VMX_PROCBASED_CTLS);
- if (!is_ctrl_setting_allowed(msr_val, VMX_PROCBASED_CTLS_TPR_SHADOW)) {
+ if (is_ctrl_setting_allowed(msr_val, VMX_PROCBASED_CTLS_TPR_SHADOW)) {
+ features |= VAPIC_FEATURE_TPR_SHADOW;
+ } else {
+ /* must support TPR shadow */
return;
}
msr_val = msr_read(MSR_IA32_VMX_PROCBASED_CTLS2);
- if (!is_ctrl_setting_allowed(msr_val, VMX_PROCBASED_CTLS2_VAPIC)) {
+ if (is_ctrl_setting_allowed(msr_val, VMX_PROCBASED_CTLS2_VAPIC)) {
+ features |= VAPIC_FEATURE_VIRT_ACCESS;
+ if (is_ctrl_setting_allowed(msr_val, VMX_PROCBASED_CTLS2_VAPIC_REGS)) {
+ features |= VAPIC_FEATURE_VIRT_REG;
+ } else {
+ /* platform may only support APICV access */
+ cpu_caps.apicv_features = features;
return;
}
-
- if (!is_ctrl_setting_allowed(msr_val, VMX_PROCBASED_CTLS2_VAPIC_REGS)) {
+ } else {
+ /* must support APICV access */
return;
}
- features = (VAPIC_FEATURE_TPR_SHADOW
- | VAPIC_FEATURE_VIRT_ACCESS
- | VAPIC_FEATURE_VIRT_REG);
-
if (is_ctrl_setting_allowed(msr_val, VMX_PROCBASED_CTLS2_VX2APIC)) {
features |= VAPIC_FEATURE_VX2APIC_MODE;
}
@@ -485,6 +490,7 @@ int32_t detect_hardware_support(void)
if (!is_apicv_supported()) {
pr_fatal("%s, APICV not supported\n", __func__);
+ return -ENODEV;
}
if (boot_cpu_data.cpuid_level < 0x15U) {
|
Address
Also improve docs for dofile and related functions. | (def buf (buffer "(" name))
(while (< index arglen)
(buffer/push-string buf " ")
- (buffer/format buf "%p" (in args index))
+ (buffer/format buf "%j" (in args index))
(set index (+ index 1)))
(array/push modifiers (string buf ")\n\n" docstr))
# Build return value
(defn run-context
"Run a context. This evaluates expressions of janet in an environment,
and is encapsulates the parsing, compilation, and evaluation.
+ Returns (in environment :exit-value environment) when complete.
opts is a table or struct of options. The options are as follows:\n\n\t
:chunks - callback to read into a buffer - default is getline\n\t
:on-parse-error - callback when parsing fails - default is bad-parse\n\t
@{})
(defn dofile
- "Evaluate a file and return the resulting environment."
- [path & args]
- (def {:exit exit-on-error
- :source source
+ "Evaluate a file and return the resulting environment. :env, :expander, and
+ :evaluator are passed through to the underlying run-context call.
+ If exit is true, any top level errors will trigger a call to (os/exit 1)
+ after printing the error."
+ [path &keys
+ {:exit exit
:env env
:expander expander
- :evaluator evaluator} (table ;args))
+ :evaluator evaluator}]
(def f (if (= (type path) :core/file)
path
(file/open path :rb)))
(defn chunks [buf _] (file/read f 2048 buf))
(defn bp [&opt x y]
(def ret (bad-parse x y))
- (if exit-on-error (os/exit 1))
+ (if exit (os/exit 1))
ret)
(defn bc [&opt x y z]
(def ret (bad-compile x y z))
- (if exit-on-error (os/exit 1))
+ (if exit (os/exit 1))
ret)
(unless f
(error (string "could not find file " path)))
:on-status (fn [f x]
(when (not= (fiber/status f) :dead)
(debug/stacktrace f x)
- (if exit-on-error (os/exit 1) (eflush))))
+ (if exit (os/exit 1) (eflush))))
:evaluator evaluator
:expander expander
:source (if path-is-file "<anonymous>" spath)}))
any errors encountered at the top level in the module will cause (os/exit 1)
to be called. Dynamic bindings will NOT be imported."
[path & args]
- (def argm (map (fn [x]
- (if (keyword? x)
- x
- (string x)))
- args))
+ (def argm (map |(if (keyword? $) $ (string $)) args))
(tuple import* (string path) ;argm))
(defmacro use
"Similar to import, but imported bindings are not prefixed with a namespace
identifier. Can also import multiple modules in one shot."
[& modules]
- ~(do ,;(map (fn [x] ~(,import* ,(string x) :prefix "")) modules)))
+ ~(do ,;(map |~(,import* ,(string $) :prefix "") modules)))
###
###
the repl in."
[&opt chunks onsignal env]
(default env (make-env))
- (default chunks (fn [buf p] (getline (string "repl:"
+ (default chunks
+ (fn [buf p]
+ (getline
+ (string
+ "repl:"
((parser/where p) 0)
":"
(parser/state p :delimiters) "> ")
|
Fix the JSON stringify context abort in case of error
This patch fixes and fixes as well.
Also add a shortcut to access the length of the array in `ecma_builtin_json_array`.
JerryScript-DCO-1.0-Signed-off-by: Robert Fancsik | @@ -1654,14 +1654,8 @@ ecma_builtin_json_object (ecma_object_t *obj_p, /**< the object*/
ecma_free_values_collection (property_keys_p, 0);
}
- if (!ecma_is_value_empty (ret_value))
+ if (ecma_is_value_empty (ret_value))
{
- ecma_free_values_collection (partial_p, 0);
- ecma_deref_ecma_string (stepback_p);
- ecma_deref_ecma_string (context_p->indent_str_p);
- return ret_value;
- }
-
/* 9. */
if (partial_p->item_count == 0)
{
@@ -1690,6 +1684,7 @@ ecma_builtin_json_object (ecma_object_t *obj_p, /**< the object*/
context_p);
}
}
+ }
ecma_free_values_collection (partial_p, 0);
@@ -1717,6 +1712,8 @@ static ecma_value_t
ecma_builtin_json_array (ecma_object_t *obj_p, /**< the array object*/
ecma_json_stringify_context_t *context_p) /**< context*/
{
+ JERRY_ASSERT (ecma_get_object_type (obj_p) == ECMA_OBJECT_TYPE_ARRAY);
+
/* 1. */
if (ecma_json_has_object_in_stack (context_p->occurence_stack_last_p, obj_p))
{
@@ -1742,18 +1739,10 @@ ecma_builtin_json_array (ecma_object_t *obj_p, /**< the array object*/
ecma_collection_header_t *partial_p = ecma_new_values_collection ();
/* 6. */
- ECMA_TRY_CATCH (array_length,
- ecma_op_object_get_by_magic_id (obj_p, LIT_MAGIC_STRING_LENGTH),
- ret_value);
-
- ECMA_OP_TO_NUMBER_TRY_CATCH (array_length_num,
- array_length,
- ret_value);
+ uint32_t array_length = ((ecma_extended_object_t *) obj_p)->u.array.length;
/* 7. - 8. */
- for (uint32_t index = 0;
- index < ecma_number_to_uint32 (array_length_num) && ecma_is_value_empty (ret_value);
- index++)
+ for (uint32_t index = 0; index < array_length && ecma_is_value_empty (ret_value); index++)
{
/* 8.a */
@@ -1810,9 +1799,6 @@ ecma_builtin_json_array (ecma_object_t *obj_p, /**< the array object*/
}
}
- ECMA_OP_TO_NUMBER_FINALIZE (array_length_num);
- ECMA_FINALIZE (array_length);
-
ecma_free_values_collection (partial_p, 0);
/* 11. */
|
Fixed bz2's stream unwrapping | @@ -142,9 +142,9 @@ typedef struct {
A->bzalloc = find_alloc_Fct(A->bzalloc); \
A->bzfree = find_free_Fct(A->bzfree);
-#define UNWRAP_BZ(A) if(A->bzalloc || A->bzfree) \
- A->bzalloc = reverse_alloc_Fct(A->bzalloc); \
- A->bzfree = reverse_free_Fct(A->bzfree);
+#define UNWRAP_BZ(A) \
+ if(A->bzalloc) A->bzalloc = reverse_alloc_Fct(A->bzalloc); \
+ if(A->bzfree) A->bzfree = reverse_free_Fct(A->bzfree);
EXPORT int my_BZ2_bzCompressInit(x86emu_t* emu, my_bz_stream_t* strm, int blocksize, int verbosity, int work)
{
|
Spores almost iced. | |- ^- hoon
?~ t.p.mod ^$(mod i.p.mod)
$(i.p.mod i.t.p.mod, t.p.mod t.t.p.mod)
- {$funk *} :: build trivial gate
+ {$funk *} :: see under %weed
::
- :+ %tsgr
- [$(mod p.mod) $(mod q.mod)]
- [%ktbr [%brcl [~ ~] [%$ 2] [%$ 15]]]
+ [%rock %n 0]
{$herb *} :: borrow sample
::
[%tsgl [%$ 6] p.mod]
?. clean -
[%tsgr [%rock %n 0] -]
:^ %brcl ~^~
- ?:(fab [%cold spore] [%iced spore])
+ [%iced spore]
~(relative local(dom (peg 7 dom)) [6 %&])
::
++ local
=+ pro=(mint gol gen)
=+ jon=(apex:musk bran q.pro)
?: |(?=(~ jon) ?=($wait -.u.jon))
+ ?: &(!fab vet)
~& %bleu-fail
!!
+ [p.pro q.pro]
[p.pro %1 p.u.jon]
::
++ blow
|- ^- (pair type type)
?~ rig
[p.q.p.lop p.q.q.lop]
- =+ zil=(mull(fab &) %noun dox q.i.rig)
+ =+ zil=(mull %noun dox q.i.rig)
=+ ^= dar
:- p=(tack(sut p.q.p.lop) p.i.rig p.zil)
q=(tack(sut p.q.q.lop) p.i.rig q.zil)
|- ^- (pair (list (pair type foot)) (list (pair type foot)))
?~ rig
hag
- =+ zil=(mull(fab &) %noun dox q.i.rig)
+ =+ zil=(mull %noun dox q.i.rig)
=+ ^= dix
:- p=(toss p.i.rig p.zil p.hag)
q=(toss p.i.rig q.zil q.hag)
~+
?- -.fut
$ash q:(mint %noun p.fut)
- $elm q:(mint(fab &, vet |) %noun p.fut)
+ $elm q:(mint(vet |) %noun p.fut)
==
::
++ laze
|
Modified build_visit to check for non blank checksums before using. | @@ -276,11 +276,21 @@ function uncompress_untar
# *************************************************************************** #
# Function: verify_checksum #
# #
-# Purpose: Verify the checksum of given file #
+# Purpose: Verify the checksum of the given file #
# #
# verify_md5_checksum: checks md5 #
# verify_sha_checksum: checks sha (256,512) #
+# verfiy_checksum_by_lookup: pick which checksum method to use #
+# based on if they are defined giving #
+# preference to the strongest checksums. #
+# #
# Programmer: Hari Krishnan #
+# #
+# Modifications: #
+# Eric Brugger, Thu Apr 11 15:51:25 PDT 2019 #
+# Modified verify_checksum_by_lookup to also check that the checksum is #
+# not blank in addition to being defined before using it. #
+# #
# *************************************************************************** #
function verify_md5_checksum
@@ -343,7 +353,7 @@ function verify_checksum
checksum=$2
dfile=$3
- info "verifying type $checksum_type, checksum $checksum for $dfile . . ."
+ info "verifying $checksum_type checksum $checksum for $dfile . . ."
if [[ "$checksum_type" == "MD5" ]]; then
verify_md5_checksum $checksum $dfile
@@ -379,20 +389,20 @@ function verify_checksum_by_lookup
md5sum_varname=${varbase}_MD5_CHECKSUM
sha256_varname=${varbase}_SHA256_CHECKSUM
sha512_varname=${varbase}_SHA512_CHECKSUM
- if [ ! -z ${!sha512_varname+x} ]; then
+ if [ ! -z ${!sha512_varname} ]; then
verify_checksum SHA512 ${!sha512_varname} $dlfile
return $?
- elif [ ! -z ${!sha256_varname+x} ]; then
+ elif [ ! -z ${!sha256_varname} ]; then
verify_checksum SHA256 ${!sha256_varname} $dlfile
return $?
- elif [ ! -z ${!md5sum_varname+x} ]; then
+ elif [ ! -z ${!md5sum_varname} ]; then
verify_checksum MD5 ${!md5sum_varname} $dlfile
return $?
fi
fi
done
- #since this is an optional check, all cases should pass if it gets here..
+ # since this is an optional check, all cases should pass if it gets here.
info "unable to find a MD5, SHA256, or SHA512, checksum associated with $dlfile; check disabled"
return 0
}
|
APPS: Fix 'openssl dhparam'
'dhparam' can't be completely rewritten in terms of EVP_PKEY functions
yet, because we lack X9.42 support. However, we do when generating,
but forgot to extract a DH pointer with EVP_PKEY_get0_DH(). | @@ -84,7 +84,7 @@ const OPTIONS dhparam_options[] = {
int dhparam_main(int argc, char **argv)
{
BIO *in = NULL, *out = NULL;
- DH *dh = NULL;
+ DH *dh = NULL, *alloc_dh = NULL;
EVP_PKEY *pkey = NULL;
EVP_PKEY_CTX *ctx = NULL;
char *infile = NULL, *outfile = NULL, *prog;
@@ -216,7 +216,7 @@ int dhparam_main(int argc, char **argv)
goto end;
}
- dh = DSA_dup_DH(dsa);
+ dh = alloc_dh = DSA_dup_DH(dsa);
DSA_free(dsa);
BN_GENCB_free(cb);
if (dh == NULL) {
@@ -256,6 +256,7 @@ int dhparam_main(int argc, char **argv)
ERR_print_errors(bio_err);
goto end;
}
+ dh = EVP_PKEY_get0_DH(pkey);
}
} else {
in = bio_open_default(infile, 'r', informat);
@@ -277,7 +278,7 @@ int dhparam_main(int argc, char **argv)
goto end;
}
- dh = DSA_dup_DH(dsa);
+ dh = alloc_dh = DSA_dup_DH(dsa);
DSA_free(dsa);
if (dh == NULL) {
ERR_print_errors(bio_err);
@@ -291,13 +292,13 @@ int dhparam_main(int argc, char **argv)
* We have no PEM header to determine what type of DH params it
* is. We'll just try both.
*/
- dh = ASN1_d2i_bio_of(DH, DH_new, d2i_DHparams, in, NULL);
+ dh = alloc_dh = ASN1_d2i_bio_of(DH, DH_new, d2i_DHparams, in, NULL);
/* BIO_reset() returns 0 for success for file BIOs only!!! */
if (dh == NULL && BIO_reset(in) == 0)
- dh = ASN1_d2i_bio_of(DH, DH_new, d2i_DHxparams, in, NULL);
+ dh = alloc_dh = ASN1_d2i_bio_of(DH, DH_new, d2i_DHxparams, in, NULL);
} else {
/* informat == FORMAT_PEM */
- dh = PEM_read_bio_DHparams(in, NULL, NULL, NULL);
+ dh = alloc_dh = PEM_read_bio_DHparams(in, NULL, NULL, NULL);
}
if (dh == NULL) {
@@ -389,6 +390,7 @@ int dhparam_main(int argc, char **argv)
}
ret = 0;
end:
+ DH_free(alloc_dh);
BIO_free(in);
BIO_free_all(out);
EVP_PKEY_free(pkey);
|
[update] remove extra code. | #define LIST_FIND_OBJ_NR 8
-long hello(void)
-{
- rt_kprintf("Hello RT-Thread!\n");
-
- return 0;
-}
-MSH_CMD_EXPORT(hello, say hello world);
-
static long clear(void)
{
rt_kprintf("\x1b[2J\x1b[H");
@@ -886,28 +878,4 @@ long list_device(void)
MSH_CMD_EXPORT(list_device, list device in system);
#endif
-long list(void)
-{
- rt_kprintf("--Commands List:\n");
- {
- struct finsh_syscall *index;
- for (index = _syscall_table_begin;
- index < _syscall_table_end;
- FINSH_NEXT_SYSCALL(index))
- {
- /* skip the internal command */
- if (strncmp((char *)index->name, "__", 2) == 0) continue;
-
-#if defined(FINSH_USING_DESCRIPTION) && defined(FINSH_USING_SYMTAB)
- rt_kprintf("%-16s -- %s\n", index->name, index->desc);
-#else
- rt_kprintf("%s\n", index->name);
-#endif
- }
- }
-
- return 0;
-}
-MSH_CMD_EXPORT(list, list all commands in system)
-
#endif /* RT_USING_FINSH */
|
Add glReadBuffer OGL_EXT | @@ -178,6 +178,9 @@ OGL_EXT(glBlitFramebuffer, void, (GLint srcX0, GLint srcY0, GLint srcX1, GLint s
OGL_EXT(glRenderbufferStorageMultisample,void,(GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height) );
OGL_EXT(glDrawArraysInstanced,void,(GLenum mode, GLint first, GLsizei count, GLsizei primcount) );
OGL_EXT(glDrawElementsInstanced,void,(GLenum mode, GLsizei count, GLenum type, const void * indices, GLsizei primcount));
+OGL_EXT(glReadBuffer,void,(GLenum src));
+
+
#ifdef DYNAMIC_OGL
//OGL_EXT(glActiveTexture,void, (GLenum texture));
|
doc: update security advisory for 3.0.1 release
Update security advisory for release_3.0.1 | Security Advisory
#################
-Addressed in ACRN v2.7
+Addressed in ACRN v3.0.1
************************
+We recommend that all developers upgrade to this v3.0.1 release (or later), which
+addresses the following security issue discovered in previous releases:
+
+-----
+- Disable RRSBA on platforms using retpoline
+ For platforms that supports RRSBA (Restricted Return Stack Buffer
+ Alternate), using retpoline may not be sufficient to guard against branch
+ history injection or intra-mode branch target injection. RRSBA must
+ be disabled to prevent CPUs from using alternate predictors for RETs.
+ (Addresses security issue tracked by CVE-2022-29901 and CVE-2022-28693.)
+
+ **Affected Release:** v3.0 and earlier
+
+Addressed in ACRN v2.7
+************************
We recommend that all developers upgrade to this v2.7 release (or later), which
addresses the following security issue discovered in previous releases:
|
v2.0.12 landed | +ejdb2 (2.0.12) testing; urgency=medium
+
+ * Upgraded to iowow_1.3.16 with critical fixes
+
+ -- Anton Adamansky <[email protected]> Fri, 03 May 2019 11:59:56 +0700
+
ejdb2 (2.0.11) testing; urgency=medium
* Upgraded to iowow_1.3.15 with critical fixes
|
esp_wifi: fix esp32c2 tx crash issue | @@ -2119,7 +2119,6 @@ ieee80211_amsdu_encap_check = 0x400020e8;
ieee80211_amsdu_length_check = 0x400020ec;
ieee80211_encap_amsdu = 0x400020f0;
ieee80211_output_raw_process = 0x400020f4;
-esp_wifi_80211_tx = 0x400020f8;
ieee80211_raw_frame_sanity_check = 0x400020fc;
ieee80211_crypto_aes_128_cmac_encrypt = 0x40002100;
ieee80211_crypto_aes_128_cmac_decrypt = 0x40002104;
|
[ctr/lua] bug fix at checking contract code | @@ -318,7 +318,7 @@ func Call(contractState *state.ContractState, code, contractAddress, txHash []by
func Create(contractState *state.ContractState, code, contractAddress, txHash []byte, bcCtx *LBlockchainCtx, dbTx db.Transaction) error {
ctrLog.Debug().Str("contractAddress", types.EncodeAddress(contractAddress)).Msg("new contract is deployed")
codeLen := binary.LittleEndian.Uint32(code[0:])
- if uint32(len(code)) < codeLen+4 {
+ if uint32(len(code)) < codeLen {
err := fmt.Errorf("invalid deploy code(%d:%d)", codeLen, len(code))
ctrLog.Warn().AnErr("err", err)
return err
|
query fw versions example - use extended diagnostic session | #!/usr/bin/env python3
from tqdm import tqdm
from panda import Panda
-from panda.python.uds import UdsClient, MessageTimeoutError, NegativeResponseError, DATA_IDENTIFIER_TYPE
+from panda.python.uds import UdsClient, MessageTimeoutError, NegativeResponseError, SESSION_TYPE, DATA_IDENTIFIER_TYPE
if __name__ == "__main__":
addrs = [0x700 + i for i in range(256)]
@@ -21,6 +21,7 @@ if __name__ == "__main__":
uds_client = UdsClient(panda, addr, bus=1 if panda.has_obd() else 0, timeout=0.1, debug=False)
try:
uds_client.tester_present()
+ uds_client.diagnostic_session_control(SESSION_TYPE.EXTENDED_DIAGNOSTIC)
except NegativeResponseError:
pass
except MessageTimeoutError:
|
mac: try (maybe) to make it compilable under MacOS 10.12 | @@ -87,7 +87,7 @@ else ifeq ($(OS),Darwin)
ifneq (,$(findstring 10.13,$(OS_VERSION)))
CRASH_REPORT := $(CRASHWRANGLER)/CrashReport_Sierra.o
else ifneq (,$(findstring 10.12,$(OS_VERSION)))
- CRASH_REPORT := $(CRASHWRANGLER)/CrashReport_Yosemite.o
+ CRASH_REPORT := $(CRASHWRANGLER)/CrashReport_Sierra.o
else ifneq (,$(findstring 10.11,$(OS_VERSION)))
# El Capitan didn't break compatibility
CRASH_REPORT := $(CRASHWRANGLER)/CrashReport_Yosemite.o
@@ -103,7 +103,9 @@ else ifeq ($(OS),Darwin)
# Figure out which XCode SDK to use.
OSX_SDK_VERSION := $(shell xcrun --show-sdk-version)
- SDK_NAME :=macosx$(OSX_SDK_VERSION)
+ SDK_NAME_V := macosx$(OSX_SDK_VERSION)
+ SDK_V := $(shell xcrun --sdk $(SDK_NAME) --show-sdk-path 2>/dev/null)
+ SDK_NAME := macosx
SDK := $(shell xcrun --sdk $(SDK_NAME) --show-sdk-path 2>/dev/null)
CC := $(shell xcrun --sdk $(SDK_NAME) --find cc)
@@ -114,7 +116,8 @@ else ifeq ($(OS),Darwin)
-Wreturn-type -Wpointer-arith -Wno-gnu-case-range -Wno-gnu-designator \
-Wno-deprecated-declarations -Wno-unknown-pragmas -Wno-attributes
ARCH_LDFLAGS := -F/System/Library/PrivateFrameworks -framework CoreSymbolication -framework IOKit \
- -F$(SDK)/System/Library/Frameworks -F$(SDK)/System/Library/PrivateFrameworks \
+ -F$(SDK_V)/System/Library/Frameworks -F$(SDK_V)/System/Library/PrivateFrameworks \
+ -F$(SDK)/System/Library/Frameworks \
-framework Foundation -framework ApplicationServices -framework Symbolication \
-framework CoreServices -framework CrashReporterSupport -framework CoreFoundation \
-framework CommerceKit $(CRASH_REPORT)
|
stm32/modmachine: Disable IRQs before entering bootloader.
To make sure that the code that enters the bootloader is not interrupted. | @@ -257,6 +257,8 @@ STATIC NORETURN mp_obj_t machine_bootloader(size_t n_args, const mp_obj_t *args)
storage_flush();
#endif
+ __disable_irq();
+
#if MICROPY_HW_USES_BOOTLOADER
if (n_args == 0 || !mp_obj_is_true(args[0])) {
// By default, with no args given, we enter the custom bootloader (mboot)
|
doc: tweak kata tutorial pre-requisites | @@ -20,12 +20,13 @@ Prerequisites
#. For a default prebuilt ACRN binary in the E2E package, you must have 4
CPU cores or enable "CPU Hyper-Threading" in order to have 4 CPU threads for 2 CPU cores.
#. Follow :ref:`these instructions <Ubuntu Service OS>` to set up the ACRN Service VM
- based on Ubuntu, this article is validated on the following configurations.
- Please note that only ACRN hypervisors compiled for
- SDC scenario support Kata Containers currently.
+ based on Ubuntu.
+#. This tutorial is validated on the following configurations:
- ACRN v1.6.1 (tag: acrn-2020w18.4-140000p)
- Ubuntu 18.04.4
+#. Kata Containers are only supported for ACRN hypervisors configured for
+ the SDC scenario.
Install Docker
|
removing arastorage_data_t definition | @@ -56,8 +56,6 @@ struct arastorage_data_type_s {
double double_value;
};
-typedef struct arastorage_data_type_s arastorage_data_t;
-
const static struct arastorage_data_type_s g_arastorage_data_set[DATA_SET_NUM] = {
{20160101, "apple" , 1.0 },
{20160102, "banana" , 2.0 },
|
[viostor] Fix for Bug Windows guest physical block size change to 512 after installation with the size 4096 | @@ -1554,20 +1554,30 @@ RhelScsiGetCapacity(
{
UCHAR SrbStatus = SRB_STATUS_SUCCESS;
PREAD_CAPACITY_DATA readCap;
+#if (NTDDI_VERSION >= NTDDI_WIN7)
+ PREAD_CAPACITY16_DATA readCapEx;
+#else
PREAD_CAPACITY_DATA_EX readCapEx;
+#endif
u64 lastLBA;
EIGHT_BYTE lba;
u64 blocksize;
PADAPTER_EXTENSION adaptExt= (PADAPTER_EXTENSION)DeviceExtension;
PCDB cdb = SRB_CDB(Srb);
+ ULONG srbdatalen = 0;
UCHAR PMI = 0;
if (!cdb)
return SRB_STATUS_ERROR;
readCap = (PREAD_CAPACITY_DATA)SRB_DATA_BUFFER(Srb);
+#if (NTDDI_VERSION >= NTDDI_WIN7)
+ readCapEx = (PREAD_CAPACITY16_DATA)SRB_DATA_BUFFER(Srb);
+#else
readCapEx = (PREAD_CAPACITY_DATA_EX)SRB_DATA_BUFFER(Srb);
+#endif
+ srbdatalen = SRB_DATA_TRANSFER_LENGTH(Srb);
lba.AsULongLong = 0;
if (cdb->CDB6GENERIC.OperationCode == SCSIOP_READ_CAPACITY16 ){
PMI = cdb->READ_CAPACITY16.PMI & 1;
@@ -1590,7 +1600,7 @@ RhelScsiGetCapacity(
lastLBA = adaptExt->info.capacity / (blocksize / SECTOR_SIZE) - 1;
adaptExt->lastLBA = adaptExt->info.capacity;
- if (SRB_DATA_TRANSFER_LENGTH(Srb) == sizeof(READ_CAPACITY_DATA)) {
+ if (srbdatalen == sizeof(READ_CAPACITY_DATA)) {
if (lastLBA > 0xFFFFFFFF) {
readCap->LogicalBlockAddress = (ULONG)-1;
} else {
@@ -1600,12 +1610,18 @@ RhelScsiGetCapacity(
REVERSE_BYTES(&readCap->BytesPerBlock,
&blocksize);
} else {
- ASSERT(SRB_DATA_TRANSFER_LENGTH(Srb) ==
- sizeof(READ_CAPACITY_DATA_EX));
REVERSE_BYTES_QUAD(&readCapEx->LogicalBlockAddress.QuadPart,
&lastLBA);
REVERSE_BYTES(&readCapEx->BytesPerBlock,
&blocksize);
+
+#if (NTDDI_VERSION >= NTDDI_WIN7)
+ if (srbdatalen >= (ULONG)FIELD_OFFSET(READ_CAPACITY16_DATA, Reserved3)) {
+ readCapEx->LogicalPerPhysicalExponent = adaptExt->info.physical_block_exp;
+ srbdatalen = FIELD_OFFSET(READ_CAPACITY16_DATA, Reserved3);
+ SRB_SET_DATA_TRANSFER_LENGTH(Srb, FIELD_OFFSET(READ_CAPACITY16_DATA, Reserved3));
+ }
+#endif
}
return SrbStatus;
}
|
data tree MAINTENANCE improve error on inner node creation
Because list must be created with another
function. | @@ -764,7 +764,7 @@ lyd_new_inner(struct lyd_node *parent, const struct lys_module *module, const ch
}
schema = lys_find_child(parent ? parent->schema : NULL, module, name, 0, LYS_CONTAINER | LYS_NOTIF | LYS_RPC | LYS_ACTION, 0);
- LY_CHECK_ERR_RET(!schema, LOGERR(ctx, LY_EINVAL, "Inner node \"%s\" not found.", name), NULL);
+ LY_CHECK_ERR_RET(!schema, LOGERR(ctx, LY_EINVAL, "Inner node (and not a list) \"%s\" not found.", name), NULL);
if (!lyd_create_inner(schema, &ret) && parent) {
lyd_insert_node(parent, NULL, ret);
|
dm: virtio-net: add variable name in function declaration
We should keep variable name in function declaration. It makes
things clearer and easier to be understood.
Acked-by: Yu Wang | @@ -152,12 +152,11 @@ struct virtio_net {
int iovcnt, int len);
};
-static void virtio_net_reset(void *);
-static void virtio_net_tx_stop(struct virtio_net *);
-/* static void virtio_net_notify(void *, struct virtio_vq_info *); */
-static int virtio_net_cfgread(void *, int, int, uint32_t *);
-static int virtio_net_cfgwrite(void *, int, int, uint32_t);
-static void virtio_net_neg_features(void *, uint64_t);
+static void virtio_net_reset(void *vdev);
+static void virtio_net_tx_stop(struct virtio_net *net);
+static int virtio_net_cfgread(void *vdev, int offset, int size, uint32_t *retval);
+static int virtio_net_cfgwrite(void *vdev, int offset, int size, uint32_t value);
+static void virtio_net_neg_features(void *vdev, uint64_t negotiated_features);
static struct virtio_ops virtio_net_ops = {
"vtnet", /* our name */
|
Update cpp-start-android.md
Add sub section that mentions how to run the tests | @@ -15,7 +15,7 @@ On Android, there are two database implementations to choose from. By default (t
The Room database implementation adds one additional initialization requirement, since it needs a pointer to the JVM and an object reference to the application context. See below (4.5) for the required call to either ```connectContext``` (in Java) or ```ConnectJVM``` (in C++) to set this up.
-If you are building on Windows, a helper script [build-android.cmd](../build-android.cmd) is provided to illustrate how to deploy the necessary SDK and NDK dependencies. Once you installed the necessary dependencies, you may use Android Studio IDE for local builds. See [ide.cmd](../lib/android_build/ide.cmd).
+If you are building on Windows, this helper script [build-android.cmd](../build-android.cmd) is provided to illustrate how to deploy the necessary SDK and NDK dependencies. Once you installed the necessary dependencies, you may use Android Studio IDE for local builds. See [ide.cmd](../lib/android_build/ide.cmd) that shows how to build the project from IDE. The `app` project (`maesdktest`) allows to build and run all SDK tests on either emulator or real Android device. While the tests are running, you can monitor the test results in logcat output.
## 3. Integrate the SDK into your C++ project
|
Remove namespace/LockState restrictions from issuing secure erase with master/user passphrase | @@ -2484,7 +2484,7 @@ Finish:
@param[in] pDimmIds Pointer to an array of DIMM IDs - if NULL, execute operation on all dimms
@param[in] DimmIdsCount Number of items in array of DIMM IDs
@param[in] SecurityOperation Security Operation code
- @param[in] pPassphrase a pointer to string with current passphrase
+ @param[in] pPassphrase a pointer to string with current passphrase. For default Master Passphrase (0's) use a zero length, null terminated string.
@param[in] pNewPassphrase a pointer to string with new passphrase
@param[out] pCommandStatus Structure containing detailed NVM error codes
@@ -2766,8 +2766,7 @@ SetSecurityState(
goto Finish;
}
- if (!(DimmSecurityState & SECURITY_MASK_LOCKED) &&
- !(DimmSecurityState & SECURITY_MASK_FROZEN)) {
+ if (!(DimmSecurityState & SECURITY_MASK_FROZEN)) {
SubOpcode = SubopSecEraseUnit;
pSecurityPayload->PassphraseType = SECURITY_USER_PASSPHRASE;
#ifndef OS_BUILD
@@ -2847,18 +2846,7 @@ SetSecurityState(
goto Finish;
}
- ReturnCode = IsNamespaceOnDimms(&pDimms[Index], 1, &NamespaceFound);
- if (EFI_ERROR(ReturnCode)) {
- goto Finish;
- }
- if (NamespaceFound) {
- ReturnCode = EFI_ABORTED;
- SetObjStatusForDimm(pCommandStatus, pDimms[Index], NVM_ERR_SECURE_ERASE_NAMESPACE_EXISTS);
- goto Finish;
- }
-
- if (!(DimmSecurityState & SECURITY_MASK_LOCKED) &&
- !(DimmSecurityState & SECURITY_MASK_FROZEN)) {
+ if (!(DimmSecurityState & SECURITY_MASK_FROZEN)) {
if (pPassphrase == NULL) {
ResetCmdStatus(pCommandStatus, NVM_ERR_PASSPHRASE_NOT_PROVIDED);
ReturnCode = EFI_INVALID_PARAMETER;
|
[numerics] fix bug in extracting 5x5 diagonal block | @@ -1232,7 +1232,11 @@ void NM_extract_diag_block5(NumericsMatrix* M, int block_row_nb, double ** Block
{
case NM_DENSE:
{
- double* Mptr = M->matrix0 + (M->size0 + 1)*(block_row_nb + block_row_nb + block_row_nb);
+ double* Mptr = M->matrix0 + (M->size0 + 1)*(block_row_nb
+ + block_row_nb
+ + block_row_nb
+ + block_row_nb
+ + block_row_nb);
double* Bmat = *Block;
/* The part of MM which corresponds to the current block is copied into MLocal */
Bmat[0] = Mptr[0];
|
Eliminated line-specific behavior in kelp. | fetch-wing(axe (peg axe 2))
:: if so, use this form
::
- :- [%rock p.p.one q.p.one]
- relative:clear(mod q.one, top &, axe (peg axe 3))
+ relative:clear(mod tup, top [& &])
:: continue in the loop
::
fin
|
Adjuct PKG_CONFIG_PATH for MSYS builds | @@ -176,11 +176,13 @@ ifdef MINGW32
LIB_PATH ?=$(PREFIX)/mingw32/lib
LIBDEV_PATH ?=$(PREFIX)/mingw32/lib
INCLUDE_PATH ?=$(PREFIX)/mingw32/include
+PKG_CONFIG_PATH =$PKG_CONFIG_PATH:/mingw64/lib/pkgconfig
else
ifdef MSYS
LIB_PATH ?=$(PREFIX)/usr/lib
LIBDEV_PATH ?=$(PREFIX)/usr/lib
INCLUDE_PATH ?=$(PREFIX)/usr/include
+PKG_CONFIG_PATH =$PKG_CONFIG_PATH:/mingw64/lib/pkgconfig
else
LIB_PATH ?=$(PREFIX)/usr/lib/x86_64-linux-gnu
LIBDEV_PATH ?=$(PREFIX)/usr/lib/x86_64-linux-gnu
|
OnlineChecks: Move sendto menu on the modules tab | @@ -258,6 +258,7 @@ VOID NTAPI MainMenuInitializingCallback(
}
PPH_EMENU_ITEM CreateSendToMenu(
+ _In_ BOOLEAN ProcessesMenu,
_In_ PPH_EMENU_ITEM Parent,
_In_ PPH_STRING FileName
)
@@ -270,7 +271,7 @@ PPH_EMENU_ITEM CreateSendToMenu(
PhInsertEMenuItem(sendToMenu, PhPluginCreateEMenuItem(PluginInstance, 0, MENUITEM_VIRUSTOTAL_UPLOAD, L"virustotal.com", FileName), -1);
PhInsertEMenuItem(sendToMenu, PhPluginCreateEMenuItem(PluginInstance, 0, MENUITEM_JOTTI_UPLOAD, L"virusscan.jotti.org", FileName), -1);
- if (menuItem = PhFindEMenuItem(Parent, PH_EMENU_FIND_STARTSWITH, L"Search online", 0))
+ if (ProcessesMenu && (menuItem = PhFindEMenuItem(Parent, PH_EMENU_FIND_STARTSWITH, L"Search online", 0)))
{
insertIndex = PhIndexOfEMenuItem(Parent, menuItem);
PhInsertEMenuItem(Parent, sendToMenu, insertIndex + 1);
@@ -299,7 +300,7 @@ VOID NTAPI ProcessMenuInitializingCallback(
else
processItem = NULL;
- sendToMenu = CreateSendToMenu(menuInfo->Menu, processItem ? processItem->FileName : NULL);
+ sendToMenu = CreateSendToMenu(TRUE, menuInfo->Menu, processItem ? processItem->FileName : NULL);
// Only enable the Send To menu if there is exactly one process selected and it has a file name.
if (!processItem || !processItem->FileName)
@@ -322,7 +323,7 @@ VOID NTAPI ModuleMenuInitializingCallback(
else
moduleItem = NULL;
- sendToMenu = CreateSendToMenu(menuInfo->Menu, moduleItem ? moduleItem->FileName : NULL);
+ sendToMenu = CreateSendToMenu(FALSE, menuInfo->Menu, moduleItem ? moduleItem->FileName : NULL);
if (!moduleItem)
{
@@ -364,7 +365,7 @@ VOID NTAPI ServiceMenuInitializingCallback(
PhAutoDereferenceObject(serviceFileName);
}
- sendToMenu = CreateSendToMenu(menuInfo->Menu, serviceFileName ? serviceFileName : NULL);
+ sendToMenu = CreateSendToMenu(FALSE, menuInfo->Menu, serviceFileName ? serviceFileName : NULL);
if (!serviceItem || !serviceFileName)
{
|
show N/A if we have no GPS | @@ -4556,11 +4556,8 @@ static inline bool globalinit()
{
static int c;
static int gpiobasemem = 0;
-
-static char weakcandidatedefault[] =
-{
-"12345678"
-};
+static const char notavailable[] = { "N/A" };
+static const char weakcandidatedefault[] = { "12345678" };
fd_socket_mccli = 0;
fd_socket_mcsrv = 0;
@@ -4669,6 +4666,7 @@ filterclientlistentries = 0;
nmealen = 0;
memset(&nmeatempsentence, 0, NMEA_MAX);
memset(&nmeasentence, 0, NMEA_MAX);
+memcpy(&nmeasentence, ¬available, 3);
weakcandidatelen = 8;
memset(&weakcandidate, 0, 64);
|
test: increase test gpio time timeout | @@ -18,4 +18,4 @@ from pytest_embedded import Dut
def test_gpio(dut: Dut) -> None:
dut.expect_exact('Press ENTER to see the list of tests')
dut.write('*')
- dut.expect_unity_test_output()
+ dut.expect_unity_test_output(timeout=300)
|
Change useragent | * for both ravend and raven-qt, to make it harder for attackers to
* target servers or GUI users specifically.
*/
-const std::string CLIENT_NAME("Satoshi");
+const std::string CLIENT_NAME("Ravencoin");
/**
* Client version number
|
dh: fix coverity argument cannot be negative | @@ -463,10 +463,11 @@ static int pkey_dh_derive(EVP_PKEY_CTX *ctx, unsigned char *key,
if (*keylen != dctx->kdf_outlen)
return 0;
ret = 0;
- Zlen = DH_size(dh);
- Z = OPENSSL_malloc(Zlen);
- if (Z == NULL) {
- goto err;
+ if ((Zlen = DH_size(dh)) <= 0)
+ return 0;
+ if ((Z = OPENSSL_malloc(Zlen)) == NULL) {
+ ERR_raise(ERR_LIB_DH, ERR_R_MALLOC_FAILURE);
+ return 0;
}
if (DH_compute_key_padded(Z, dhpubbn, dh) <= 0)
goto err;
|
mactime: fix undefined symbol in mactime_test
undefined symbol format_macaddress
Type: fix | #include <vpp-api/client/stat_client.h>
/* Declare message IDs */
+#include <vnet/format_fns.h>
#include <mactime/mactime.api_enum.h>
#include <mactime/mactime.api_types.h>
@@ -202,7 +203,7 @@ format_device (u8 * s, va_list * args)
current_status = 4;
print:
- macstring = format (0, "%U", format_mac_address, dp->mac_address);
+ macstring = format (0, "%U", format_vl_api_mac_address_t, dp->mac_address);
switch (current_status)
{
case 0:
|
Waddledee: Remove CONFIG_FPU
FPU no longer needed with charger using integer math to convert Vbus
into a voltage.
BRANCH=None
TEST=make -j buildall | /* Charger */
#define CONFIG_CHARGER_SM5803 /* C0 and C1: Charger */
-#define CONFIG_FPU /* For charger calculations */
#define CONFIG_USB_PD_VBUS_DETECT_CHARGER
#define CONFIG_USB_PD_5V_CHARGER_CTRL
#define CONFIG_CHARGER_OTG
|
Fix an issue with _yr_re_prine_node().
When printing certain RE ASTs I noticed that some nodes were not handled
properly. This patch adds in the missing nodes. | @@ -2459,6 +2459,30 @@ static void _yr_re_print_node(RE_NODE* re_node, uint32_t indent)
printf(")");
break;
+ case RE_NODE_EMPTY:
+ printf("Empty");
+ break;
+
+ case RE_NODE_ANCHOR_START:
+ printf("AnchorStart");
+ break;
+
+ case RE_NODE_ANCHOR_END:
+ printf("AnchorEnd");
+ break;
+
+ case RE_NODE_WORD_BOUNDARY:
+ printf("WordBoundary");
+ break;
+
+ case RE_NODE_NON_WORD_BOUNDARY:
+ printf("NonWordBoundary");
+ break;
+
+ case RE_NODE_RANGE_ANY:
+ printf("RangeAny");
+ break;
+
default:
printf("???");
break;
|
change registry keys to UUIDs | @@ -1320,10 +1320,11 @@ local libopen = [[
#define TITAN_PATH_VAR "TITAN_PATH"
#define TITAN_PATH_SEP "/"
#define TITAN_PATH_DEFAULT "/usr/local/lib/titan/" TITAN_VER ";."
- #define TITAN_LIBS_VAR "TITAN_LIBS"
+ #define TITAN_PATH_KEY "ec10e486-d8fd-11e7-87f4-e7e9581a929c"
+ #define TITAN_LIBS_KEY "ecfc9174-d8fd-11e7-8be2-abbaa3ded45f"
static void pushpath (lua_State *L) {
- lua_pushliteral(L, TITAN_PATH_VAR TITAN_VER_SUFFIX);
+ lua_pushliteral(L, TITAN_PATH_KEY);
lua_rawget(L, LUA_REGISTRYINDEX);
if(lua_isnil(L, -1)) {
lua_pop(L, 1);
@@ -1338,7 +1339,7 @@ local libopen = [[
path = luaL_gsub(L, path, "\1", TITAN_PATH_DEFAULT);
lua_remove(L, -2); /* remove result from 1st 'gsub' */
}
- lua_pushliteral(L, TITAN_PATH_VAR TITAN_VER_SUFFIX);
+ lua_pushliteral(L, TITAN_PATH_KEY);
lua_pushvalue(L, -2);
lua_rawset(L, LUA_REGISTRYINDEX);
}
@@ -1381,13 +1382,13 @@ local libopen = [[
lua_pushcfunction(L, gctm);
lua_setfield(L, -2, "__gc"); /* set finalizer */
lua_setmetatable(L, -2);
- lua_pushliteral(L, TITAN_LIBS_VAR TITAN_VER_SUFFIX);
+ lua_pushliteral(L, TITAN_LIBS_KEY);
lua_pushvalue(L, -2);
lua_rawset(L, LUA_REGISTRYINDEX);
}
static void pushlibs(lua_State *L) {
- lua_pushliteral(L, TITAN_LIBS_VAR TITAN_VER_SUFFIX);
+ lua_pushliteral(L, TITAN_LIBS_KEY);
lua_rawget(L, LUA_REGISTRYINDEX);
if(lua_isnil(L, -1)) {
lua_pop(L, 1);
|
host/mesh: comp pointer check
comp data pointer check before using
This is port of | @@ -328,7 +328,7 @@ int bt_mesh_comp_register(const struct bt_mesh_comp *comp)
int err;
/* There must be at least one element */
- if (!comp->elem_count) {
+ if (!comp || !comp->elem_count) {
return -EINVAL;
}
|
Add documentation for CLI to README | @@ -43,10 +43,65 @@ Download a release for your operating system from the [GB Studio Downloads](http
Or to run from source, clone this repo then:
+- Install latest stable [NodeJS](https://nodejs.org/)
+- Install [Yarn](https://yarnpkg.com/)
+
```bash
-$ yarn
-$ npm start
+> cd gb-studio
+
+> yarn
+
+> npm start
+```
+
+## GB Studio CLI
+
+Install GB Studio from source as above then
+
+```
+> npm run make:cli
+
+> yarn link
+
+# From any folder you can now run gb-studio-cli
+> gb-studio-cli -V
+2.0.0-beta5
+
+> gb-studio-cli --help
+```
+
+### Update the CLI
+
+Pull the latest code and run make:cli again, yarn link is only needed for the first run.
+
+```
+> npm run make:cli
+```
+
+### CLI Examples
+
+- **Export Project**
+
+ ```
+ gb-studio-cli export path/to/project.gbsproj out/
+ ```
+ Export GBDK project from gbsproj to out directory
+
+- **Export Data**
+ ```
+ gb-studio-cli export -d path/to/project.gbsproj out/
+ ```
+ Export only src/data and include/data from gbsproj to out directory
+- **Make ROM**
+ ```
+ gb-studio-cli make:rom path/to/project.gbsproj out/game.gb
+ ```
+ Make a ROM file from gbsproj
+- **Make Web**
+ ```
+ gb-studio-cli make:web path/to/project.gbsproj out/game.gb
```
+ Make a Web build from gbsproj
## Documentation
|
build tests: fail test run if we can't patch scapy
Type: fix | @@ -145,7 +145,7 @@ $(PIP_PATCH_DONE): $(PIP_INSTALL_DONE)
echo Applying patch: $$(basename $$f) ; \
patch --forward -p1 -d $(SCAPY_SOURCE) < $$f ; \
retCode=$$?; \
- [ $$retCode -gt 1 ] && exit $$retCode; \
+ [ $$retCode -gt 0 ] && exit $$retCode; \
done; \
touch $@
|
out_kafka: librdkafka: build library statically | @@ -76,7 +76,7 @@ if(NOT HAVE_REGEX)
list(APPEND sources regexp.c)
endif()
-add_library(rdkafka SHARED ${sources})
+add_library(rdkafka STATIC ${sources})
# Support '#include <rdkafka.h>'
target_include_directories(rdkafka PUBLIC "$<BUILD_INTERFACE:${CMAKE_CURRENT_LIST_DIR}>")
|
Removing writes to read-only PLIC interrupt pending registers. | @@ -141,10 +141,6 @@ struct metal_interrupt *pxInterruptController;
/* Set all interrupt enable bits to 0. */
mainPLIC_ENABLE_0 = 0UL;
mainPLIC_ENABLE_1 = 0UL;
-
- /* Clear all pending interrupts. */
- mainPLIC_PENDING_0 = 0UL;
- mainPLIC_PENDING_1 = 0UL;
}
/*-----------------------------------------------------------*/
|
generate_cookie_callback: free temporary memory on an error path | @@ -786,6 +786,7 @@ int generate_cookie_callback(SSL *ssl, unsigned char *cookie,
/* Create buffer with peer's address and port */
if (!BIO_ADDR_rawaddress(peer, NULL, &length)) {
BIO_printf(bio_err, "Failed getting peer address\n");
+ BIO_ADDR_free(lpeer);
return 0;
}
OPENSSL_assert(length != 0);
|
sdl/render: Add GetMetalLayer() and GetMetalCommandEncoder() for SDL2 2.0.8 | @@ -9,6 +9,22 @@ static inline int SDL_UpdateYUVTexture(SDL_Texture* texture, const SDL_Rect* rec
{
return -1;
}
+#endif
+
+#if !(SDL_VERSION_ATLEAST(2,0,8))
+
+#pragma message("SDL_RenderGetMetalLayer is not supported before SDL 2.0.8")
+static inline void * SDL_RenderGetMetalLayer(SDL_Renderer *renderer)
+{
+ return NULL;
+}
+
+#pragma message("SDL_RenderGetMetalCommandEncoder is not supported before SDL 2.0.8")
+static inline void * SDL_RenderGetMetalCommandEncoder(SDL_Renderer *renderer)
+{
+ return NULL;
+}
+
#endif
*/
import "C"
@@ -642,3 +658,23 @@ func (texture *Texture) GLUnbind() error {
return errorFromInt(int(
C.SDL_GL_UnbindTexture(texture.cptr())))
}
+
+// GetMetalLayer gets the CAMetalLayer associated with the given Metal renderer
+// (https://wiki.libsdl.org/SDL_RenderGetMetalLayer)
+func (renderer *Renderer) GetMetalLayer() (layer unsafe.Pointer, err error) {
+ layer = C.SDL_RenderGetMetalLayer(renderer.cptr())
+ if layer == nil {
+ err = GetError()
+ }
+ return
+}
+
+// GetMetalCommandEncoder gets the Metal command encoder for the current frame
+// (https://wiki.libsdl.org/SDL_RenderGetMetalCommandEncoder)
+func (renderer *Renderer) GetMetalCommandEncoder() (encoder unsafe.Pointer, err error) {
+ encoder = C.SDL_RenderGetMetalCommandEncoder(renderer.cptr())
+ if encoder == nil {
+ err = GetError()
+ }
+ return
+}
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.