message
stringlengths
6
474
diff
stringlengths
8
5.22k
webp-lossless-bitstream-spec: fix num_code_lengths check in the 'Normal Code Length Code' description the number of valid code lengths is 19, not 18.
@@ -910,7 +910,7 @@ First, `num_code_lengths` specifies the number of code lengths. int num_code_lengths = 4 + ReadBits(4); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -If `num_code_lengths` is > 18, the bitstream is invalid. +If `num_code_lengths` is > 19, the bitstream is invalid. The code lengths are themselves encoded using prefix codes: lower level code lengths, `code_length_code_lengths`, first have to be read. The rest of those
Add separator fields
@@ -51,9 +51,6 @@ import qualified System.FilePath as Path description :: Text description = "Module for file path manipulations." -fields :: [Field] -fields = [] - documentedModule :: Module documentedModule = Module { moduleName = "paths" @@ -72,6 +69,33 @@ preloadModule :: String -> Lua () preloadModule name = Module.preloadModule $ documentedModule { moduleName = T.pack name } +-- +-- Fields +-- + +-- | Exported fields. +fields :: [Field] +fields = + [ separator + , search_path_separator + ] + +-- | Wrapper for @'Path.pathSeparator'@. +separator :: Field +separator = Field + { fieldName = "separator" + , fieldDescription = "The character that separates directories." + , fieldPushValue = pushString [Path.pathSeparator] + } + +-- | Wrapper for @'Path.searchPathSeparator'@. +search_path_separator :: Field +search_path_separator = Field + { fieldName = "search_path_separator" + , fieldDescription = "The character that is used to separate the entries in " + <> "the `PATH` environment variable." + , fieldPushValue = pushString [Path.searchPathSeparator] + } -- -- Functions
parallel-libs/boost: fix typo for patch
@@ -44,7 +44,7 @@ Patch1: boost-fenv_suse.patch # After download, all patch line numbers were all adjusted by +3 # Resolves https://bugzilla.redhat.com/show_bug.cgi?id=1190039 - boost package doesn't honor optflags #Patch2: boost-1.75.0-build-optflags.patch -Pathc2: boost-1.76.0-b2-build-flags.patch +Patch2: boost-1.76.0-b2-build-flags.patch %if 0%{?rhel} BuildRequires: bzip2-devel
ref_clock: port*_CRITICAL vanilla FreeRTOS compliance
@@ -130,10 +130,10 @@ void ref_clock_init() static void IRAM_ATTR pcnt_isr(void* arg) { - portENTER_CRITICAL(&s_lock); + portENTER_CRITICAL_ISR(&s_lock); PCNT.int_clr.val = BIT(REF_CLOCK_PCNT_UNIT); s_milliseconds += REF_CLOCK_PRESCALER_MS; - portEXIT_CRITICAL(&s_lock); + portEXIT_CRITICAL_ISR(&s_lock); } void ref_clock_deinit()
Cast to uintptr_t instead of size_t for mask ops on ptrs. Addressing reviewer comment.
@@ -742,7 +742,7 @@ DwaCompressor::LossyDctDecoderBase::execute () for (int i = 0; i < _SSE_ALIGNMENT; ++i) { - if ((reinterpret_cast<size_t>(rowBlockHandle + i) & _SSE_ALIGNMENT_MASK) == 0) + if ((reinterpret_cast<uintptr_t>(rowBlockHandle + i) & _SSE_ALIGNMENT_MASK) == 0) rowBlock[0] = (unsigned short *)(rowBlockHandle + i); } @@ -1010,7 +1010,7 @@ DwaCompressor::LossyDctDecoderBase::execute () for (int y = 8 * blocky; y < 8 * blocky + maxY; ++y) { - if (reinterpret_cast<size_t>(_rowPtrs[comp][y]) & _SSE_ALIGNMENT_MASK) + if (reinterpret_cast<uintptr_t>(_rowPtrs[comp][y]) & _SSE_ALIGNMENT_MASK) fastPath = false; }
Update Python winloader to 2.5.4
<topic id="topic2" xml:lang="en"> <title id="nw149721">Installing Python</title> <body> - <p>The Greenplum loader program (<codeph>gpload.py</codeph>) for Windows requires Python 2.5 + <p>The Greenplum loader program (<codeph>gpload.py</codeph>) for Windows requires Python 2.5.4 (32-bit version) to also be installed on your machine. If you do not have an installation of Python, you can get one from <xref href="https://www.python.org" scope="external" format="html">https://www.python.org</xref>. </p> <section id="nw149727"> <title>To install Python</title> <ol> - <li id="nw149728">Download the Python 2.5 installer for Windows from <xref + <li id="nw149728">Download the Python 2.5.4 installer for Windows from <xref href="https://www.python.org/downloads/" scope="external" format="html" >https://www.python.org/downloads/</xref>.</li> <li id="nw149730">Locate, then double-click on the <codeph>python Load Tools for - Windows-2.5.<varname>x</varname>.msi</codeph> package to launch the installer.</li> + Windows-2.5.4.<varname>x</varname>.msi</codeph> package to launch the + installer.</li> <li id="nw149731">Select <b>Install for all users</b> and click <b>Next</b>.</li> <li id="nw149732">By default, Python will be installed into <codeph>C:\Python<varname>xx</varname></codeph>. Click <b>Up</b> or <b>New</b> if
update test_client with new addr
@@ -52,7 +52,7 @@ main(int argc, char ** argv) evhtp_request_t * request; evbase = event_base_new(); - conn = evhtp_connection_new(evbase, "75.126.169.52", 80); + conn = evhtp_connection_new(evbase, "104.27.150.225", 80); request = evhtp_request_new(request_cb, evbase); evhtp_request_set_hook(request, evhtp_hook_on_read, print_data, evbase);
Added sceAppMgrGameDataMount header
@@ -126,6 +126,9 @@ int sceAppMgrLaunchAppByName2(const char *name, const char *param, SceAppMgrLaun //! return AppId ? SceUID sceAppMgrLaunchAppByName2ForShell(const char *name, const char *param, SceAppMgrLaunchAppOptParam *optParam); +//! Mount pfs, set unk and unk2 to 0 +int sceAppMgrGameDataMount(const char *path, int unk, int unk2, char *mount_point); + //! id: 100 (photo0), 101 (friends), 102 (messages), 103 (near), 105 (music), 108 (calendar) int sceAppMgrAppDataMount(int id, char *mount_point);
make: fix wildcard condition
@@ -10,7 +10,7 @@ SE=arm-none-eabi-size GCC_VERSION = $(shell arm-none-eabi-gcc -dumpversion) GIT_VERSION = unkown -ifeq (,$(wildcard .git/refs/heads/master)) +ifneq (,$(wildcard .git/refs/heads/master)) GIT_VERSION = $(shell cat .git/refs/heads/master) endif
pci: Fix the crash on deleting the pci device clib_file_index is 0 if it is not initialized result in following assertion on deleteing the pci device. vpp/src/vppinfra/file.h:122 (clib_file_del_by_index) assertion `! pool_is_free (um->file_pool, _e)' fails This patch fixes the issue by initializing the clib_file_index to -1.
@@ -1236,6 +1236,7 @@ vlib_pci_device_open (vlib_main_t * vm, vlib_pci_addr_t * addr, p->handle = p - lpm->linux_pci_devices; p->addr.as_u32 = di->addr.as_u32; p->intx_irq.fd = -1; + p->intx_irq.clib_file_index = -1; p->numa_node = di->numa_node; /* * pci io bar read/write fd @@ -1282,6 +1283,7 @@ vlib_pci_device_close (vlib_main_t * vm, vlib_pci_dev_handle_t h) if (p->type == LINUX_PCI_DEVICE_TYPE_UIO) { irq = &p->intx_irq; + if (irq->clib_file_index != -1) clib_file_del_by_index (&file_main, irq->clib_file_index); close (p->config_fd); if (p->io_fd != -1) @@ -1296,6 +1298,7 @@ vlib_pci_device_close (vlib_main_t * vm, vlib_pci_dev_handle_t h) err = vfio_set_irqs (vm, p, VFIO_PCI_INTX_IRQ_INDEX, 0, 0, VFIO_IRQ_SET_ACTION_TRIGGER, 0); clib_error_free (err); + if (irq->clib_file_index != -1) clib_file_del_by_index (&file_main, irq->clib_file_index); close (irq->fd); }
HTTP/1 -> HTTP/2 upgrade path fd leak On upgrade error, make sure we're closing the HTTP/1 socket before giving control to the HTTP/2 error handling.
@@ -579,8 +579,10 @@ static void on_upgrade_complete(h2o_socket_t *socket, const char *err) if (err == 0) { sock = conn->sock; reqsize = conn->_reqsize; - } close_connection(conn, 0); + } else { + close_connection(conn, 1); + } cb(data, sock, reqsize); }
Add dotnet command configurable from an option in order to provide support for Guix.
@@ -28,7 +28,7 @@ if(DOTNET_FOUND) endif() # Define dotnet command -set(DOTNET_COMMAND dotnet) +option(DOTNET_COMMAND "Path of .NET Core command" dotnet) # Detect dotnet command execute_process(COMMAND ${DOTNET_COMMAND}
when adding asset as history to mesh with no history, create intermediate copy of mesh for upstream history first
@@ -300,6 +300,27 @@ houdiniEngine_connectHistory(string $inputAttr, string $objects[], string $compo print "This asset is already connected as history\n"; return 0; } + // if there is no upstream mesh history, copy the mesh, insert as upstream history + // and make it intermediate so it doesn't mess up selection and other mesh UI + // yeah, keeping the name on the downstream node rather than the upstream node is bad for file referencing + // but it is consistent with the way that native maya construction history works + + if($upstreamNode == "") { + string $copyForUpstream[] = `duplicate -n "polySurface#" $targetMesh`; + string $newUpstreamShape[] = `listRelatives -shapes $copyForUpstream[0]`; + string $targetXform[] = `listRelatives -parent $targetMesh`; + string $upstreamNodes[] = `parent -add -shape $newUpstreamShape[0] $targetXform[0]`; + // reparenting can change name and/or partial path, so we re-get node name here + $upstreamNode = $upstreamNodes[0]; + setAttr ($upstreamNode + ".intermediateObject") 1; + delete $copyForUpstream[0]; + $upstreamAttr = ($upstreamNode + ".outMesh"); + connectAttr -f $upstreamAttr ($targetMesh + ".inMesh"); + } + if($upstreamNode == "") { + print "Could not add history to this mesh\n"; + return 0; + } int $upstreamIsAsset = 0; if($upstreamNode != "") { if(`nodeType $upstreamNode` == "houdiniAsset") { @@ -355,19 +376,10 @@ houdiniEngine_connectHistory(string $inputAttr, string $objects[], string $compo eval $cmd; } - // if there is no upstream history - // then we need a copy of the original mesh, so we sync - int $copyShape = ($upstreamAttr == ""); - - // if the selected mesh had history, connect the history rather than the shape - if(!$copyShape) { + // connect the history rather than the shape if(! $upstreamIsAsset) { connectAttr -f $upstreamAttr ($finalUpstreamNode + ".inputGeometry"); } - } else { - print "needed an upstream copy of the mesh because there is no history\n"; - print "just syncing the asset to get a new output mesh for now\n"; - } if(`isConnected $finalUpstreamAttr $inputAttr`) { @@ -380,24 +392,12 @@ houdiniEngine_connectHistory(string $inputAttr, string $objects[], string $compo connectAttr $finalUpstreamAttr $inputAttr; } - if(!`exists houdiniEngine_syncSelectedAsset`) - source houdiniEngineAssetSync; - - if($copyShape && `getAttr ($assetNode + ".assetConnectType")` != 1) - houdiniEngine_syncAssetOutput $assetNode; - - // if the selected mesh had history, connect the asset output back to the shape - if(!$copyShape){ - // NEED to disconnect it from the original output first + // connect the asset output back to the shape connectAttr -f ($assetNode + ".outputObjects[0].outputGeos[0].outputParts[0].outputPartMeshData") ($targetMesh + ".inMesh"); - } - // only want to sync output at most once for history node. + // flag this as a history asset so we know what to do with it later setAttr ($assetNode + ".assetConnectType") 1; - // if copyshape was true, need to parent copy next to input - // and set the upstream shape to intermediate - return 1; }
Fix double Ergo auth request header problem
@@ -16,9 +16,6 @@ public partial class ErgoClient private Task PrepareRequestAsync(HttpClient client, HttpRequestMessage request, String url, CancellationToken ct) { - foreach(var pair in RequestHeaders) - request.Headers.Add(pair.Key, pair.Value); - return Task.CompletedTask; }
Make sure that receiving RESET_STREAM twice does not cause harm
@@ -1876,6 +1876,14 @@ void test_ngtcp2_conn_recv_reset_stream(void) { rv = ngtcp2_conn_read_pkt(conn, &null_path.path, &null_pi, buf, pktlen, 2); CU_ASSERT(0 == rv); + CU_ASSERT(1024 == conn->rx.offset); + CU_ASSERT(128 * 1024 + 1024 == conn->rx.unsent_max_offset); + + /* Receiving same RESET_STREAM does not increase rx offsets. */ + rv = ngtcp2_conn_read_pkt(conn, &null_path.path, &null_pi, buf, pktlen, 3); + + CU_ASSERT(0 == rv); + CU_ASSERT(1024 == conn->rx.offset); CU_ASSERT(128 * 1024 + 1024 == conn->rx.unsent_max_offset); ngtcp2_conn_del(conn);
added __pre_resolve property for PM
@@ -3740,7 +3740,7 @@ send_properties_to_pm(neat_ctx *ctx, neat_flow *flow) { int rc = NEAT_ERROR_OUT_OF_MEMORY; struct ifaddrs *ifaddrs = NULL; - json_t *array = NULL, *endpoints = NULL, *properties = NULL, *domains = NULL, *address, *port; + json_t *array = NULL, *endpoints = NULL, *properties = NULL, *domains = NULL, *address, *port, *req_type; const char *home_dir; const char *socket_path; char socket_path_buf[128]; @@ -3859,6 +3859,15 @@ send_properties_to_pm(neat_ctx *ctx, neat_flow *flow) json_object_set(properties, "port", port); json_decref(port); + + req_type = json_pack("{s:s}", "value", "pre-resolve"); + if (req_type == NULL) + goto end; + + json_object_set(properties, "__request_type", req_type); + json_decref(req_type); + + if ((domains = json_array()) == NULL) goto end;
BugID:18068959: add all the band for inter freq of Class B
@@ -311,9 +311,13 @@ PhyParam_t RegionCN470AGetPhyParam(GetPhyParams_t *getPhy) #ifdef LORAMAC_CLASSB_ENABLED case PHY_BEACON_CHANNEL_FREQ: { if (get_lora_freq_mode() == FREQ_MODE_INTER) { - phyParam.Value = CN470A_BEACON_CHANNEL_INTER_FREQ; + if (TxFreqBandNum >= 8) { + phyParam.Value = 470300000 + 200000 * FreqBandStartChannelNum[TxFreqBandNum - 8]; } else { - phyParam.Value = CN470A_BEACON_CHANNEL_INTRA_FREQ; + phyParam.Value = 470300000 + 200000 * FreqBandStartChannelNum[TxFreqBandNum + 8]; + } + } else { + phyParam.Value = 470300000 + 200000 * FreqBandStartChannelNum[TxFreqBandNum]; } break;
add client buffer_out after headers
@@ -5386,13 +5386,16 @@ evhtp_make_request(evhtp_connection_t * c, evhtp_request_t * r, } - evbuffer_add_buffer(obuf, r->buffer_out); } evhtp_headers_for_each(r->headers_out, htp__create_headers_, obuf); evbuffer_add_reference(obuf, "\r\n", 2, NULL, NULL); + if (evbuffer_get_length(r->buffer_out)) { + evbuffer_add_buffer(obuf, r->buffer_out); + } + return 0; } /* evhtp_make_request */
Add Debug build for xdp
@@ -198,6 +198,16 @@ stages: config: Debug extraName: 'shared_ec' extraBuildArgs: -EnableTelemetryAsserts -SharedEC -ExtraArtifactDir shared_ec + - template: ./templates/build-config-user.yml + parameters: + image: windows-2019 + platform: windows + arch: x64 + tls: schannel + config: Debug + extraName: 'xdp' + extraPrepareArgs: -Xdp + extraBuildArgs: -EnableTelemetryAsserts -UseXdp -ExtraArtifactDir xdp - stage: build_windows_nontest displayName: Build Windows - Non Tested
rbd: clear WCE rbd disables its write cache during image open time, and WRITEs to the OSD will be written to disk when we get a succes response, so report WCE=0.
@@ -438,6 +438,8 @@ static int tcmu_rbd_open(struct tcmu_device *dev) tcmu_set_dev_max_xfer_len(dev, image_info.obj_size / tcmu_get_dev_block_size(dev)); + tcmu_set_dev_write_cache_enabled(dev, 0); + tcmu_dev_dbg(dev, "config %s, size %lld\n", tcmu_get_dev_cfgstring(dev), rbd_size); free(dev_cfg_dup);
Fix potential NULL reference on cleanup If allocation of bindings failed. Found with clang-tidy
@@ -39,9 +39,11 @@ void free_bar_config(struct bar_config *bar) { free(bar->swaybar_command); free(bar->font); free(bar->separator_symbol); + if (bar->bindings) { for (int i = 0; i < bar->bindings->length; i++) { free_bar_binding(bar->bindings->items[i]); } + } list_free(bar->bindings); list_free_items_and_destroy(bar->outputs); if (bar->client != NULL) {
Update: little fix, big consequence for event-based Q/A which now works perfectly! :)
@@ -264,7 +264,7 @@ void Memory_addEvent(Event *event, long currentTime, double priority, bool input if(Memory_FindConceptByTerm(&event->term, &concept_i)) { Concept *c = concepts.items[concept_i].address; - if(event->occurrenceTime == currentTime) + if(event->occurrenceTime != OCCURRENCE_ETERNAL) { c->belief_spike = Inference_IncreasedActionPotential(&c->belief_spike, event, currentTime, NULL); }
Refactor create sensor (3) Use a smaller generic approach to check top level attributes.
@@ -266,8 +266,8 @@ int DeRestPluginPrivate::createSensor(const ApiRequest &req, ApiResponse &rsp) bool ok; QVariant var = Json::parse(req.content, ok); - QVariantMap map = var.toMap(); - QString type = map["type"].toString(); + const QVariantMap map = var.toMap(); + const QString type = map["type"].toString(); Sensor sensor; if (!ok) @@ -295,14 +295,13 @@ int DeRestPluginPrivate::createSensor(const ApiRequest &req, ApiResponse &rsp) } //check invalid parameter - QVariantMap::const_iterator pi = map.begin(); - QVariantMap::const_iterator pend = map.end(); + const QStringList allowedAttributes = { "name", "modelid", "swversion", "type", "uniqueid", "manufacturername", "state", "config", "recycle" }; - for (; pi != pend; ++pi) + for (const QString &attr : map.keys()) { - if(!((pi.key() == "name") || (pi.key() == "modelid") || (pi.key() == "swversion") || (pi.key() == "type") || (pi.key() == "uniqueid") || (pi.key() == "manufacturername") || (pi.key() == "state") || (pi.key() == "config") || (pi.key() == "recycle"))) + if (!allowedAttributes.contains(attr)) { - rsp.list.append(errorToMap(ERR_PARAMETER_NOT_AVAILABLE, QString("/sensors/%2").arg(pi.key()), QString("parameter, %1, not available").arg(pi.key()))); + rsp.list.append(errorToMap(ERR_PARAMETER_NOT_AVAILABLE, QString("/sensors/%2").arg(attr), QString("parameter, %1, not available").arg(attr))); rsp.httpStatus = HttpStatusBadRequest; return REQ_READY_SEND; }
Performance: BUFR decoding: fixes
@@ -1948,7 +1948,6 @@ int codes_bufr_extract_headers_malloc(grib_context* c, const char* filename, cod void* mesg = NULL; size_t size = 0; off_t offset = 0; - codes_bufr_header* headers = *result; if (!c) c=grib_context_get_default(); fp = fopen(filename, "rb"); @@ -1958,21 +1957,30 @@ int codes_bufr_extract_headers_malloc(grib_context* c, const char* filename, cod return GRIB_IO_PROBLEM; } err = grib_count_in_file(c, fp, num_messages); - if (err) return err; + if (err) { + fclose(fp); + return err; + } - headers = (codes_bufr_header*)calloc((size_t)num_messages, sizeof(codes_bufr_header)); - if (!headers) { + size = *num_messages; + *result = (codes_bufr_header*)calloc(size, sizeof(codes_bufr_header)); + if (!*result) { + fclose(fp); return GRIB_OUT_OF_MEMORY; } i = 0; while (err != GRIB_END_OF_FILE) { mesg = wmo_read_bufr_from_file_malloc(fp, 0, &size, &offset, &err); if (mesg != NULL && err == 0) { - int err2 = bufr_decode_header(mesg, offset, size, &headers[i++]); - if (err2) return err2; + int err2 = bufr_decode_header(mesg, offset, size, &(*result)[i++]); + if (err2) { + fclose(fp); + return err2; + } grib_context_free(c, mesg); } } + fclose(fp); return GRIB_SUCCESS; }
[P2P] Fix bug of prev commit
@@ -238,10 +238,6 @@ func (ps *peerManager) init() { ps.selfMeta.Port = uint32(listenPort) ps.selfMeta.ID = pid - // init subprotocols also - for _, sub := range ps.subProtocols { - sub.startHandling() - } } func (ps *peerManager) run() {
Squashed 'opae-libs/' changes from 3421f781..9a062ce5 xfpga: fix device field of PCIE_PATH_PATTERN git-subtree-dir: opae-libs git-subtree-split:
@@ -147,7 +147,7 @@ pthread_mutex_t _sysfs_device_lock = PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP; #define SYSFS_MAX_DEVICES 128 static sysfs_fpga_device _devices[SYSFS_MAX_DEVICES]; -#define PCIE_PATH_PATTERN "([0-9a-fA-F]{4}):([0-9a-fA-F]{2}):([0-9]{2})\\.([0-9])/fpga" +#define PCIE_PATH_PATTERN "([0-9a-fA-F]{4}):([0-9a-fA-F]{2}):([0-9a-fA-F]{2})\\.([0-9])/fpga" #define PCIE_PATH_PATTERN_GROUPS 5 #define PARSE_MATCH_INT(_p, _m, _v, _b, _l) \
linux-raspberrypi: Minor recipe tidyup
@@ -3,8 +3,8 @@ FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}-${PV}:" LINUX_VERSION ?= "4.9.27" SRCREV = "9a5f215eda12bad29b35040dff00d0346fe517e2" -SRC_URI = "git://github.com/raspberrypi/linux.git;protocol=git;branch=rpi-4.9.y \ -" +SRC_URI = "git://github.com/raspberrypi/linux.git;branch=rpi-4.9.y" + require linux-raspberrypi.inc # A LOADADDR is needed when building a uImage format kernel. This value is not
Add var shader helper; Now you can write var(0) instead of layout(set = 2, binding = 0). The advantage is less typing and resilience in the event that the default set changes. The disadvantage is that now you can't use var.
@@ -155,6 +155,11 @@ layout(location = 14) in vec3 Tangent; // Helpers #define Constants layout(push_constant) uniform PushConstants +#ifdef GL_COMPUTE_SHADER +#define var(x) layout(set = 0, binding = x) +#else +#define var(x) layout(set = 2, binding = x) +#endif // Helper for sampling textures using the default sampler set using Pass:setSampler #ifndef GL_COMPUTE_SHADER
compile: fix symver for highlevel
libelektra_0.8 { # elektra.h; - #- elektraOpen: moved to libelektra_0.9; + elektraOpen; ## Getter; elektraGetRawString; @@ -132,8 +132,6 @@ libelektra_0.8 { }; libelektra_0.9 { - elektraOpen; - elektraFindReference; elektraFindReferenceArrayElement; elektraHelpKey;
cmake: add -Werror for CFLAGS
cmake_minimum_required (VERSION 2.8 FATAL_ERROR) project (tcmu-runner C) set(VERSION 1.3.0-rc1) -set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall -Wdeclaration-after-statement -std=c99") +set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Werror -Wall -Wdeclaration-after-statement -std=c99") include(GNUInstallDirs) include(CheckIncludeFile)
add missing PT_REGS_RET definition for x86 add missing PT_REGS_RET definition for x86
@@ -741,6 +741,7 @@ int bpf_usdt_readarg_p(int argc, struct pt_regs *ctx, void *buf, u64 len) asm("l #define PT_REGS_PARM4(ctx) ((ctx)->cx) #define PT_REGS_PARM5(ctx) ((ctx)->r8) #define PT_REGS_PARM6(ctx) ((ctx)->r9) +#define PT_REGS_RET(ctx) ((ctx)->sp) #define PT_REGS_FP(ctx) ((ctx)->bp) /* Works only with CONFIG_FRAME_POINTER */ #define PT_REGS_RC(ctx) ((ctx)->ax) #define PT_REGS_IP(ctx) ((ctx)->ip)
shapito: fix misc error field read
@@ -156,9 +156,8 @@ int so_feread_error(so_feerror_t *error, uint8_t *data, uint32_t size) return 0; default: { - uint8_t *data; - uint32_t data_len; - rc = so_stream_readsz(&data, &data_len); + uint32_t field_len = 0; + rc = so_stream_readsz(&data, &field_len); if (so_unlikely(rc == -1)) return -1; break;
Fix deprecation warning in the tests.
@@ -14,7 +14,7 @@ class RuggedTest < Rugged::TestCase version = Rugged::libgit2_version assert_equal version.length, 3 version.each do |i| - assert i.is_a? Fixnum + assert i.is_a? Integer end end
i8sak: Minor formatting fix
@@ -197,7 +197,6 @@ void i8sak_tx_cmd(FAR struct i8sak_s *i8sak, int argc, FAR char *argv[]) wpanlistener_add_eventreceiver(&i8sak->wpanlistener, tx_eventcb, &eventfilter, (FAR void *)i8sak, true); - ret = i8sak_tx(i8sak, fd); if (ret < 0) {
minor fix for last SGDK changes
@@ -78,7 +78,7 @@ Map bga; s16 camPosX; s16 camPosY; // require scroll update -bool scrollNeedUpdate; +//bool scrollNeedUpdate; fix32 maxSpeed; fix32 jumpSpeed; @@ -139,7 +139,7 @@ int main(u16 hard) // camera position (force refresh) camPosX = -1; camPosY = -1; - scrollNeedUpdate = FALSE; +// scrollNeedUpdate = FALSE; // default speeds maxSpeed = MAX_SPEED_DEFAULT; @@ -156,18 +156,15 @@ int main(u16 hard) // enemies position enemiesPosX[0] = FIX32(300L); - enemiesPosY[0] = FIX32(304L); + enemiesPosY[0] = MAX_POSY - FIX32(100); enemiesPosX[1] = FIX32(128L); - enemiesPosY[1] = FIX32(418L); + enemiesPosY[1] = MAX_POSY + FIX32(5); enemiesXOrder[0] = -1; enemiesXOrder[1] = 1; // init backgrounds - MAP_init(&bga_map, BG_A, TILE_ATTR_FULL(0, FALSE, FALSE, FALSE, bgBaseTileIndex[0]), 0, 0, &bga); - MAP_init(&bgb_map, BG_B, TILE_ATTR_FULL(0, FALSE, FALSE, FALSE, bgBaseTileIndex[1]), 0 >> 3, 0 >> 5, &bgb); - - // let map update - SYS_doVBlankProcess(); + MAP_init(&bga_map, BG_A, TILE_ATTR_FULL(0, FALSE, FALSE, FALSE, bgBaseTileIndex[0]), &bga); + MAP_init(&bgb_map, BG_B, TILE_ATTR_FULL(0, FALSE, FALSE, FALSE, bgBaseTileIndex[1]), &bgb); // init scrolling updateCameraPosition(); @@ -219,7 +216,7 @@ int main(u16 hard) // memcpy(&palette[48], enemies_sprite.palette->data, 16 * 2); // fade in - VDP_fadeIn(0, (4 * 16) - 1, palette, 20, FALSE); + PAL_fadeIn(0, (4 * 16) - 1, palette, 20, FALSE); JOY_setEventHandler(joyEvent); @@ -461,7 +458,7 @@ static void setCameraPosition(s16 x, s16 y) // scrolling is slower on BGB MAP_scrollTo(&bgb, x >> 3, y >> 5); - scrollNeedUpdate = TRUE; +// scrollNeedUpdate = TRUE; } }
vppinfra: fix corner cases in tw_timer_expire Type: fix
@@ -513,7 +513,7 @@ static inline u32 slow_wheel_index __attribute__ ((unused)); u32 glacier_wheel_index __attribute__ ((unused)); - /* Shouldn't happen */ + /* Called too soon to process new timer expirations? */ if (PREDICT_FALSE (now < tw->next_run_time)) return callback_vector_arg; @@ -525,6 +525,27 @@ static inline /* Remember when we ran, compute next runtime */ tw->next_run_time = (now + tw->timer_interval); + /* First call, or time jumped backwards? */ + if (PREDICT_FALSE + ((tw->last_run_time == 0.0) || (now <= tw->last_run_time))) + { + tw->last_run_time = now; + return callback_vector_arg; + } + + /* + * Refuse to do anything if we're about to process way too many slots. + * Should never come anywhere close to happening, with the possible exception + * of cases involving a large forward jump in the timebase. + */ + if (nticks > (1 << (TW_RING_SHIFT + 1))) + { + clib_warning ("Excessive nticks %u at %.6f last run %.6f", + nticks, now, tw->last_run_time); + tw->last_run_time = now; + return callback_vector_arg; + } + if (callback_vector_arg == 0) { _vec_len (tw->expired_timer_handles) = 0;
graph-store: properly take a deep tabulation
[e d] =* atom p.i.b =* node q.i.b + =. c (snoc c atom) ?- -.children.node - %empty $(e +(e), d (~(put by d) c node)) + %empty + $(b t.b, e +(e), d (~(put by d) c node), c ~) :: %graph - =/ f $(c (snoc c atom), b (tab:orm p.children.node ~ (sub a e))) + =/ f $(b (tab:orm p.children.node ~ (sub a e))) ?: =(e.f a) f %_ $ + b t.b e +(e.f) d (~(put by d.f) c node(children [%empty ~])) ==
Fix ActorCanvas import
import React from "react"; import PropTypes from "prop-types"; import { connect } from "react-redux"; -import SpriteSheetCanvas from "./SpriteSheetCanvas1"; +import SpriteSheetCanvas from "./SpriteSheetCanvas"; import { framesPerDirection } from "../../lib/helpers/gbstudio"; import { PaletteShape } from "../../store/stateShape"; import { getCachedObject } from "../../lib/helpers/cache";
Add predictive remarking for tui visualization
@@ -442,17 +442,42 @@ int main(int argc, char** argv) { } } + Field scratch_field; + field_init(&scratch_field); + Tui_cursor tui_cursor; tui_cursor_init(&tui_cursor); Usz tick_num = 0; Usz ruler_spacing_y = 8; Usz ruler_spacing_x = 8; + bool needs_remarking = true; for (;;) { int term_height = getmaxy(stdscr); int term_width = getmaxx(stdscr); assert(term_height >= 0 && term_width >= 0); - (void)term_height; - (void)term_width; + // We can predictavely step the next simulation tick and then use the + // resulting markmap buffer for better UI visualization. If we don't do + // this, after loading a fresh file or after the user performs some edit + // (or even after a regular simulation step), the new glyph buffer won't + // have had phase 0 of the simulation run, which means the ports and other + // flags won't be set on the markmap buffer, so the colors for disabled + // cells, ports, etc. won't be set. + // + // We can just perform a simulation step using the current state, keep the + // markmap buffer that it produces, then roll back the glyph buffer to + // where it was before. This should produce results similar to having + // specialized UI code that looks at each glyph and figures out the ports, + // etc. + if (needs_remarking) { + field_resize_raw_if_necessary(&scratch_field, field.height, field.width); + field_copy_subrect(&field, &scratch_field, 0, 0, 0, 0, field.height, + field.width); + orca_run(field.buffer, markmap_r.buffer, field.height, field.width, + tick_num, &bank); + field_copy_subrect(&scratch_field, &field, 0, 0, 0, 0, field.height, + field.width); + needs_remarking = false; + } draw_field(stdscr, term_height, term_width, 0, 0, field.buffer, markmap_r.buffer, field.height, field.width, ruler_spacing_y, ruler_spacing_x); @@ -503,6 +528,7 @@ int main(int argc, char** argv) { case AND_CTRL('u'): if (undo_history_count(&undo_hist) > 0) { undo_history_pop(&undo_hist, &field, &tick_num); + needs_remarking = true; } break; case '[': @@ -526,12 +552,18 @@ int main(int argc, char** argv) { orca_run(field.buffer, markmap_r.buffer, field.height, field.width, tick_num, &bank); ++tick_num; + needs_remarking = true; break; default: if (key >= '!' && key <= '~') { undo_history_push(&undo_hist, &field, tick_num); gbuffer_poke(field.buffer, field.height, field.width, tui_cursor.y, tui_cursor.x, (char)key); + // Indicate we want the next simulation step to be run predictavely, so + // that we can use the reulsting mark buffer for UI visualization. This + // is "expensive", so it could be skipped for non-interactive input in + // situations where max throughput is necessary. + needs_remarking = true; } break; } @@ -545,6 +577,7 @@ quit: markmap_reusable_deinit(&markmap_r); bank_deinit(&bank); field_deinit(&field); + field_deinit(&scratch_field); undo_history_deinit(&undo_hist); return 0; }
make find-doc-nits report function typedef w/ space before arg list
@@ -144,6 +144,11 @@ sub name_synopsis { $line =~ s/STACK_OF\([^)]+\)/int/g; $line =~ s/SPARSE_ARRAY_OF\([^)]+\)/int/g; $line =~ s/__declspec\([^)]+\)//; + if ( $line =~ /typedef.*\(\*\S+\)\s+\(/ ) { + # a callback function with whitespace before the argument list: + # typedef ... (*NAME) (... + err($id, "function typedef has space before arg list: $line"); + } if ( $line =~ /env (\S*)=/ ) { # environment variable env NAME=... $sym = $1;
simplify the serial frame ACK.
@@ -47,10 +47,7 @@ owerror_t openserial_printInfoErrorCritical( errorparameter_t arg1, errorparameter_t arg2 ); -owerror_t openserial_ackReply( - bool positiveAck, - bool hasFrameFollowed -); +owerror_t openserial_ackReply(void); // command handlers void openserial_handleRxFrame(void); @@ -250,22 +247,16 @@ owerror_t openserial_printSniffedPacket(uint8_t* buffer, uint8_t length, uint8_t } -owerror_t openserial_ackReply(bool positiveAck, bool hasFrameFollowed) { +owerror_t openserial_ackReply(void) { outputHdlcOpen(); outputHdlcWrite(SERFRAME_MOTE2PC_ACKREPLY); outputHdlcWrite(idmanager_getMyID(ADDR_16B)->addr_16b[0]); outputHdlcWrite(idmanager_getMyID(ADDR_16B)->addr_16b[1]); - outputHdlcWrite(positiveAck); outputHdlcClose(); - if (hasFrameFollowed){ - // there are frames following the ack, - // the openserial_flush will be called when sending next frame. - } else { // start TX'ing openserial_flush(); - } return E_SUCCESS; } @@ -596,24 +587,23 @@ void openserial_handleRxFrame() { switch (cmdByte) { case SERFRAME_PC2MOTE_SETROOT: idmanager_triggerAboutRoot(); - openserial_ackReply(TRUE,FALSE); + openserial_ackReply(); break; case SERFRAME_PC2MOTE_RESET: board_reset(); break; case SERFRAME_PC2MOTE_DATA: openbridge_triggerData(); - openserial_ackReply(TRUE,FALSE); + openserial_ackReply(); break; case SERFRAME_PC2MOTE_TRIGGERSERIALECHO: - openserial_ackReply(TRUE,TRUE); openserial_handleEcho( &openserial_vars.inputBuf[1], openserial_vars.inputBufFillLevel-1 ); break; case SERFRAME_PC2MOTE_COMMAND: - openserial_ackReply(TRUE,FALSE); + openserial_ackReply(); openserial_handleCommands(); break; } @@ -1089,10 +1079,6 @@ uint8_t isr_openserial_rx(void) { openserial_vars.hdlcBusyReceiving = FALSE; if (openserial_vars.inputBufFillLevel==0){ - - // this is a negative ack and error message is following to sent - openserial_ackReply(FALSE,TRUE); - // invalid HDLC frame openserial_printError( COMPONENT_OPENSERIAL,
Log Change: Use fence for code snippet
@@ -17,7 +17,9 @@ be notified of every removed, added or changed key easily. Prints every added, changed or deleted key on the console. To use it, add it during mounting: +```sh kdb mount logchange.dump user/logchange dump logchange +``` Configure the plugin with `log/get=1` to enable printing when configuration is loaded. For example, `kdb gmount logchange log/get=1`.
Cleanup some uses of wprintx non-formatted strings
@@ -468,19 +468,19 @@ void draw_hud(WINDOW* win, int win_y, int win_x, int height, int width, switch (input_mode) { case Ged_input_mode_normal: wattrset(win, A_normal); - wprintw(win, "insert"); + waddstr(win, "insert"); break; case Ged_input_mode_append: wattrset(win, A_bold); - wprintw(win, "append"); + waddstr(win, "append"); break; case Ged_input_mode_piano: wattrset(win, A_reverse); - wprintw(win, "trigger"); + waddstr(win, "trigger"); break; case Ged_input_mode_selresize: wattrset(win, A_bold); - wprintw(win, "select"); + waddstr(win, "select"); break; } wattrset(win, A_normal); @@ -1822,7 +1822,7 @@ void push_about_msg(void) { } wattrset(w, A_DIM); wmove(w, tpad + rows + sep, footer_left_pad); - wprintw(w, footer); + waddstr(w, footer); } void push_controls_msg(void) { @@ -1880,11 +1880,11 @@ void push_controls_msg(void) { for (int i = 0; i < (int)ORCA_ARRAY_COUNTOF(items); ++i) { if (items[i].input) { wmove(w, i, 1 + w_input - (int)strlen(items[i].input)); - wprintw(w, items[i].input); + waddstr(w, items[i].input); } if (items[i].desc) { wmove(w, i, 1 + w_input + mid_pad); - wprintw(w, items[i].desc); + waddstr(w, items[i].desc); } } } @@ -1948,11 +1948,10 @@ void push_opers_guide_msg(void) { WINDOW* w = qmsg_window(qm); for (int i = 0; i < (int)ORCA_ARRAY_COUNTOF(items); ++i) { wmove(w, i, left_pad); - wattrset(w, A_bold); - wprintw(w, "%c", items[i].glyph); + waddch(w, (chtype)items[i].glyph | A_bold); wmove(w, i, left_pad + 1 + mid_pad); wattrset(w, A_normal); - wprintw(w, "%s", items[i].desc); + waddstr(w, items[i].desc); } }
kiln: minor print cleanup
++ bump-one |= [kel=weft =desk] ^+ kiln - ~> %slog.(fmt "bump {<desk>} to {<[- +]:kel>}") + ~> %slog.(fmt "bump {<desk>} to {<[lal num]:kel>}") =< abet ^+ vats =. vats (abed desk) ?: =([~ kel] (read-kelvin-local our desk now)) - ~> %slog.(fmt "{here} already at {<[- +]:kel>}") + ~> %slog.(fmt "{here} already at {<[lal num]:kel>}") update-running-apps =^ tem rail.rak (crank-next %| kel) ?^ tem (emit merge-main:pass) =- (emit (pyre:pass leaf/- ~)) - "kiln: {here} killed upgrade to {<[- +]:kel>}" + "kiln: {here} killed upgrade to {<[lal num]:kel>}" :: +stop-agents: internal helper to suspend agents on .loc :: :: Will not shut down %hood or %dojo.
Documentation: Use correct tense
@@ -286,7 +286,7 @@ just run when a file is first mounted, but whenever a file gets updated, this fu ### `elektraPluginSet` -We also gave a brief overview of the `elektraPluginSet` function. This function is basically the opposite of `elektraPluginGet`. Where `elektraPluginGet` +We also give a brief overview of the `elektraPluginSet` function. This function is basically the opposite of `elektraPluginGet`. Where `elektraPluginGet` reads information from a file into the Elektra Key Database, `elektraPluginSet` writes information from the database back into the mounted file. First have a look at the signature of `elektraLineSet`:
KOKKOS Makefile Update. Check for /usr/lib64 as libkokkoscore.a is not created yet.
@@ -51,7 +51,7 @@ CPPFLAGS = $(INCLUDES) -Wall -Wextra -O3 -DNDEBUG -w $(TARGET_FLAGS) -std=c LINKFLAGS = $(enableopt) -Wall -Wextra -O3 -DNDEBUG -w $(TARGET_FLAGS) # Archive may be at lib64 for non-debian systems -ifneq (,$(wildcard $(KOKKOS_ROOT)/lib64/libkokkoscore.a)) +ifneq (,$(wildcard /usr/lib64)) KOKKOS_LIB = $(KOKKOS_ROOT)/lib64/libkokkoscore.a else KOKKOS_LIB = $(KOKKOS_ROOT)/lib/libkokkoscore.a
quickdump: fix memleaks
@@ -207,6 +207,7 @@ int elektraQuickdumpGet (Plugin * handle ELEKTRA_UNUSED, KeySet * returned, Key { if (c == EOF) { + keyDel (k); fclose (file); return ELEKTRA_PLUGIN_STATUS_ERROR; } @@ -216,6 +217,7 @@ int elektraQuickdumpGet (Plugin * handle ELEKTRA_UNUSED, KeySet * returned, Key char * metaName = readString (file, parentKey); if (metaName == NULL) { + keyDel (k); fclose (file); return ELEKTRA_PLUGIN_STATUS_ERROR; } @@ -223,6 +225,7 @@ int elektraQuickdumpGet (Plugin * handle ELEKTRA_UNUSED, KeySet * returned, Key char * metaValue = readString (file, parentKey); if (metaValue == NULL) { + keyDel (k); elektraFree (metaName); fclose (file); return ELEKTRA_PLUGIN_STATUS_ERROR;
jenkins: make image.id easier visible
@@ -939,7 +939,7 @@ def withDockerEnv(image, opts=[], cl) { "CTEST_PARALLEL_LEVEL='${cpu_count+2}'", "XDG_CONFIG_HOME=${WORKSPACE}/xdg/user", "XDG_CONFIG_DIRS=${WORKSPACE}/xdg/system"]) { - echo "Starting ${env.STAGE_NAME} on ${env.NODE_NAME}" + echo "Starting ${STAGE_NAME} on ${NODE_NAME} using ${image.id}" checkout scm docker.image(image.id) .inside(dockerArgs) { cl() }
Error info should be send, whatever cmd or cmdq
@@ -207,6 +207,8 @@ void replyMemcachedBinaryError(client *c, memcachedBinaryResponseStatus err, co char *start = buf + sizeof(memcachedBinaryResponseHeader); memcpy(start, errstr, len); } + /* when meet error, error info response should be send */ + c->flags &= ~CLIENT_NO_REPLY; addReplyStringMemcached(c, buf, sizeof(memcachedBinaryResponseHeader) + len); }
Missing time -> timestamp change done after compiling code again under OSX
@@ -136,7 +136,7 @@ static timestamp rdtsc(void) asm("cpuid":::"%rax", "%rbx", "%rcx", "%rdx"); asm volatile("rdtsc" : "=a" (a), "=d" (d)); - return (((time)a) | (((time)d) << 32)); + return (((timestamp)a) | (((timestamp)d) << 32)); } void init_clock(kernel_heaps kh);
Add Size == operator
@@ -32,5 +32,6 @@ namespace blit { inline Size operator/ (Size lhs, const int a) { lhs /= a; return lhs; } inline Size operator* (Size lhs, const float a) { lhs *= a; return lhs; } inline Size operator* (Size lhs, const int a) { lhs *= a; return lhs; } + inline bool operator== (Size lhs, Size rhs) { return lhs.w == rhs.w && lhs.h == rhs.h; } } \ No newline at end of file
Remove obsolete text in error message The HID/OTG features are now available on all platforms. PR <https://github.com/Genymobile/scrcpy/pull/3011>
@@ -1370,8 +1370,7 @@ parse_args_with_getopt(struct scrcpy_cli_args *args, int argc, char *argv[], opts->keyboard_input_mode = SC_KEYBOARD_INPUT_MODE_HID; break; #else - LOGE("HID over AOA (-K/--hid-keyboard) is disabled (or " - "unsupported on this platform)."); + LOGE("HID over AOA (-K/--hid-keyboard) is disabled."); return false; #endif case OPT_MAX_FPS: @@ -1389,8 +1388,7 @@ parse_args_with_getopt(struct scrcpy_cli_args *args, int argc, char *argv[], opts->mouse_input_mode = SC_MOUSE_INPUT_MODE_HID; break; #else - LOGE("HID over AOA (-M/--hid-mouse) is disabled (or " - "unsupported on this platform)."); + LOGE("HID over AOA (-M/--hid-mouse) is disabled."); return false; #endif case OPT_LOCK_VIDEO_ORIENTATION: @@ -1559,8 +1557,7 @@ parse_args_with_getopt(struct scrcpy_cli_args *args, int argc, char *argv[], opts->otg = true; break; #else - LOGE("OTG mode (--otg) is disabled (or unsupported on this " - "platform)."); + LOGE("OTG mode (--otg) is disabled."); return false; #endif case OPT_V4L2_SINK:
rm constraint for max value of button identifier updated error message to be more adequate for current contraint
@@ -19,10 +19,10 @@ struct cmd_results *input_cmd_scroll_button(int argc, char **argv) { new_input_config(current_input_config->identifier); int scroll_button = atoi(argv[0]); - if (scroll_button < 0 || scroll_button > 1000) { + if (scroll_button < 0) { free_input_config(new_config); return cmd_results_new(CMD_INVALID, "scroll_button", - "Input out of range [1, 10]"); + "Scroll button identifier cannot be negative"); } new_config->scroll_button = scroll_button;
Update compile options in msvc to properly build in release mode.
@@ -106,23 +106,15 @@ if(WIN32) if(CMAKE_BUILD_TYPE STREQUAL "Debug" OR CMAKE_BUILD_TYPE STREQUAL "RelWithDebInfo") # Disable optimizations add_compile_options(/Od) - - # Multithread MSV CTR - add_compile_options(/MDd) - - ##add_compile_options(/LTCG) # Enable debugging information else() - add_compile_options(/GS) # Buffer Security Check - add_compile_options(/GF) # Enable read-only string pooling - add_compile_options(/GW) # Enable read-only string pooling + # Enable read-only string pooling + add_compile_options(/GF) - # Multithread MSV CTR - add_compile_options(/MD) + # Buffer Security Check + add_compile_options(/GS) # Enable optimizations add_compile_options(/O2) - add_compile_options(/Ob) - add_compile_options(/Og) add_compile_options(/Oi) add_compile_options(/Oy) endif()
kernel/init: start the preapp task regardless of binary manager The preapp task which launches TASH and system tasks does not have any dependency with binary manager. So, it should be outside of binary manager conditional. This commit fixes an issue that TASH is not come up.
@@ -252,21 +252,18 @@ static inline void os_do_appstart(void) net_initialize(); #endif - /* Start the application initialization task. In a flat build, this is - * entrypoint is given by the definitions, CONFIG_USER_ENTRYPOINT. In - * the protected build, however, we must get the address of the - * entrypoint from the header at the beginning of the user-space blob. - */ - - svdbg("Starting application init thread\n"); - #ifdef CONFIG_BINARY_MANAGER + svdbg("Starting binary manager thread\n"); + pid = kernel_thread(BINARY_MANAGER_NAME, BINARY_MANAGER_PRIORITY, BINARY_MANAGER_STACKSIZE, binary_manager, NULL); if (pid < 0) { sdbg("Failed to start binary manager"); } +#endif #ifdef CONFIG_SYSTEM_PREAPP_INIT + svdbg("Starting application init task\n"); + #ifdef CONFIG_BUILD_PROTECTED DEBUGASSERT(USERSPACE->preapp_start != NULL); pid = task_create("appinit", SCHED_PRIORITY_DEFAULT, CONFIG_SYSTEM_PREAPP_STACKSIZE, USERSPACE->preapp_start, (FAR char *const *)NULL); @@ -295,9 +292,15 @@ static inline void os_do_appstart(void) } #endif -#else //binary manager - svdbg("Starting application main thread\n"); +#if !defined(CONFIG_BINARY_MANAGER) + /* Start the application initialization task. In a flat build, this is + * entrypoint is given by the definitions, CONFIG_USER_ENTRYPOINT. In + * the protected build, however, we must get the address of the + * entrypoint from the header at the beginning of the user-space blob. + */ + + svdbg("Starting application main task\n"); #ifdef CONFIG_BUILD_PROTECTED if (USERSPACE->us_entrypoint != NULL) { @@ -306,8 +309,8 @@ static inline void os_do_appstart(void) #elif defined(CONFIG_USER_ENTRYPOINT) pid = task_create("appmain", SCHED_PRIORITY_DEFAULT, CONFIG_USERMAIN_STACKSIZE, (main_t)CONFIG_USER_ENTRYPOINT, (FAR char *const *)NULL); #endif +#endif // !CONFIG_BINARY_MANAGER -#endif ASSERT(pid > 0); }
Fix missing external declaration
int blas_server_avail = 0; +extern int openblas_omp_adaptive_env(); + static void * blas_thread_buffer[MAX_PARALLEL_NUMBER][MAX_CPU_NUMBER]; #ifdef HAVE_C11 static atomic_bool blas_buffer_inuse[MAX_PARALLEL_NUMBER];
Testing: Add test for and HDF5
@@ -33,6 +33,8 @@ tempGrib=temp.${label}.grib tempNetcdf=temp.${label}.nc tempText=temp.${label}.txt +have_netcdf4=0 + # Do we have ncdump? NC_DUMPER="" if command -v "ncdump" >/dev/null 2>&1; then @@ -51,6 +53,20 @@ if test "x$NC_DUMPER" != "x"; then grep -q "short tp_0001" $tempText fi +echo "Test HDF5 decoding ..." +# ------------------------- +# Note: this is only available in NetCDF-4. So need to check if the command worked with -k3 +input=${data_dir}/sample.grib2 +set +e +${tools_dir}/grib_to_netcdf -k3 -o $tempNetcdf $input 2>/dev/null +stat=$? +set -e +if [ $stat -eq 0 ]; then + have_netcdf4=1 + res=`${tools_dir}/grib_get -TA -p identifier,versionNumberOfSuperblock,endOfFileAddress $tempNetcdf` + [ "$res" = "HDF5 0 11973" ] +fi + grib_files="\ regular_latlon_surface.grib2 \ @@ -78,8 +94,10 @@ echo "Test creating different kinds; netcdf3 classic and large ..." input=${data_dir}/regular_latlon_surface.grib2 ${tools_dir}/grib_to_netcdf -k 1 -o $tempNetcdf $input >/dev/null ${tools_dir}/grib_to_netcdf -k 2 -o $tempNetcdf $input >/dev/null -#${tools_dir}/grib_to_netcdf -k 3 -o $tempNetcdf $input >/dev/null -#${tools_dir}/grib_to_netcdf -k 4 -o $tempNetcdf $input >/dev/null +if [ $have_netcdf4 -eq 1 ]; then + ${tools_dir}/grib_to_netcdf -k 3 -o $tempNetcdf $input >/dev/null + ${tools_dir}/grib_to_netcdf -k 4 -o $tempNetcdf $input >/dev/null +fi echo "Test ECC-1060 ..." # ----------------------
Use tick elps
@@ -439,7 +439,7 @@ static lv_res_t lv_rotary_signal(lv_obj_t * rotary, lv_signal_t sign, void * par /*Calculate the slew rate limited angle based on threshold (degrees/sec)*/ int16_t delta_angle = angle - ext->last_angle; - uint32_t delta_tick = lv_tick_get() - ext->last_tick; + uint32_t delta_tick = lv_tick_elaps(ext->last_tick); int16_t delta_angle_threshold = (ext->threshold * 1000) / delta_tick; if (delta_angle > delta_angle_threshold) {
Add oc_string_array_t to the SWIG types Tested-by: IoTivity Jenkins
jstring jvalue = JCALL1(NewStringUTF, jenv, oc_string(temp$argnum)); JCALL3(SetObjectArrayElement, jenv, $input, 0, jvalue); } + +/******************************************************************** + * oc_string_array_t * + ********************************************************************/ +%typemap(jni) oc_string_array_t "jobjectArray" +%typemap(jni) oc_string_array_t "jobjectArray" +%typemap(jtype) oc_string_array_t "String[]" +%typemap(jstype) oc_string_array_t "String[]" +%typemap(in) oc_string_array_t (jint jsize) { + int i = 0; + if ($input) { + jsize = JCALL1(GetArrayLength, jenv, $input); + oc_new_string_array(&$1, jsize); + for (i = 0; i<jsize; i++) { + jstring j_string = (jstring)JCALL2(GetObjectArrayElement, jenv, $input, i); + const char *c_string = JCALL2(GetStringUTFChars, jenv, j_string, 0); + oc_string_array_add_item($1, c_string); + JCALL2(ReleaseStringUTFChars, jenv, j_string, c_string); + JCALL1(DeleteLocalRef, jenv, j_string); + } + } else { + $1.ptr = 0; + $1.size = 0; + jsize = 0; + } +} + +%typemap(freearg) oc_string_array_t "" + +%typemap(out) oc_string_array_t { + if ($1.ptr) { + int i; + jsize len=0; + jstring temp_string; + const jclass clazz = JCALL1(FindClass, jenv, "java/lang/String"); + len = (jsize)oc_string_array_get_allocated_size($1); + $result = JCALL3(NewObjectArray, jenv, len, clazz, NULL); + /* exception checking omitted */ + + for (i=0; i<len; i++) { + //temp_string = JCALL1(NewStringUTF, jenv, *$1++); + temp_string = JCALL1(NewStringUTF, jenv, oc_string_array_get_item($1, i)); + JCALL3(SetObjectArrayElement, jenv, $result, i, temp_string); + JCALL1(DeleteLocalRef, jenv, temp_string); + } + } +} + +%typemap(javain) oc_string_array_t "$javainput" +%typemap(javaout) oc_string_array_t { + return $jnicall; +}
ledc: Remove usage of legacy FreeRTOS type
@@ -597,7 +597,7 @@ static void ledc_cpu_reset_test_first_stage(void) ledc_timer_config_t ledc_time_config = create_default_timer_config(); TEST_ESP_OK(ledc_timer_config(&ledc_time_config)); - vTaskDelay(50 / portTICK_RATE_MS); + vTaskDelay(50 / portTICK_PERIOD_MS); esp_restart(); }
ssl_tls13_generate_and_write_ecdh_key_exchange(): remove redundant check This check can be removed as if the buffer is too small for the key, then export will fail.
@@ -262,12 +262,6 @@ static int ssl_tls13_generate_and_write_ecdh_key_exchange( } - if( own_pubkey_len > (size_t)( end - buf ) ) - { - MBEDTLS_SSL_DEBUG_MSG( 1, ( "No space in the buffer for ECDH public key." ) ); - return( MBEDTLS_ERR_SSL_BUFFER_TOO_SMALL ); - } - *out_len = own_pubkey_len; return( 0 );
docs - add palloc/malloc discussion
<codeph><xref href="../ref_guide/config_params/guc-list.xml#memory_spill_ratio" type="section"/></codeph> server configuration parameter.</p> </section> + <section id="topic833cons" xml:lang="en"> + <title>Other Memory Considerations</title> + <p>Resource groups track all Greenplum Database memory allocated via the <codeph>palloc()</codeph> function. Memory that you allocate using the Linux <codeph>malloc()</codeph> function is not managed by resource groups. To ensure that resource groups are accurately tracking memory usage, avoid <codeph>malloc()</codeph>ing large amounts of memory in custom Greenplum Database user-defined functions.</p> + </section> </body> </topic>
nailed down bits 24 and 25 in PPCI+0x488
</reg32> <reg32 offset="0x480" name="INTR" variants="G84-" type="g84_pci_intr"/> <reg32 offset="0x484" name="INTR_EN" variants="G84-" type="g84_pci_intr"/> + <reg32 offset="0x488" name="UNK488" variants="G84-"> + <bitfield low="24" high="25" name="MULTI_FUN_STATUS"> + <value value="0" name="DISABLED"/> + <value value="2" name="ENABLED"/> + </bitfield> + </reg32> <!-- XXX: 600+ is another vendor-specific cap --> <reg32 offset="0x700" name="GPU_RESET" variants="GT215-"> <!-- this thing resets *everything* -->
Fix SEGV when adding Philips hue motion sensor Issue
@@ -3463,7 +3463,7 @@ void DeRestPluginPrivate::addSensorNode(const deCONZ::Node *node, const SensorFi item = sensorNode.addItem(DataTypeUInt8, RConfigSensitivityMax); item->setValue(R_SENSITIVITY_MAX_DEFAULT); sensorNode.removeItem(RConfigDuration); - item = sensorNode.item(RConfigDelay); + item = sensorNode.addItem(DataTypeUInt16, RConfigDelay); item->setValue(0); } item = sensorNode.addItem(DataTypeString, RConfigAlert);
Added error for mass function when mass is out of range
@@ -225,7 +225,7 @@ TASK: Outputs fitting function for use in halo mass function calculation; ccl_angulo (arxiv 1203.3216 ) ccl_watson (arxiv 1212.0095 ) ccl_shethtormen (arxiv 9901122) -*/ +-*/ static double massfunc_f(ccl_cosmology *cosmo, double halomass, double a, double odelta, int *status) { double fit_A, fit_a, fit_b, fit_c, fit_d, fit_p, overdensity_delta; @@ -574,6 +574,12 @@ double ccl_massfunc(ccl_cosmology *cosmo, double halomass, double a, double odel return NAN; } + if (halomass > 1e17 || halomass < 1e6){ + *status = CCL_ERROR_HMF_INTERP; + ccl_cosmology_set_status_message(cosmo, "ccl_massfunc(): The specified halo mass is outside of the range."); + return NAN; + } + if (fabs(cosmo->params.mu_0)>1e-14 || fabs(cosmo->params.sigma_0)>1e-14){ *status = CCL_ERROR_NOT_IMPLEMENTED; strcpy(cosmo->status_message,"ccl_massfunc.c: ccl_massfunc(): The halo mass funcion is not implemented the mu / Sigma modified gravity parameterisation.\n");
haskell-bindings-fix-tests: quote bindir
@@ -62,7 +62,7 @@ if (GHC_EXECUTABLE) add_custom_target (c2hs_haskell ALL DEPENDS "${BINDING_HASKELL_NAME}") # build and install it to the cabal db - install (CODE "execute_process (COMMAND ${CABAL_EXECUTABLE} install WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR})") + install (CODE "execute_process (COMMAND ${CABAL_EXECUTABLE} install WORKING_DIRECTORY \"${CMAKE_CURRENT_BINARY_DIR}\")") if (BUILD_TESTING) # test it using the executables, so cmake takes care about the rpaths
SOVERSION bump to version 1.3.5
@@ -50,7 +50,7 @@ set(LIBNETCONF2_VERSION ${LIBNETCONF2_MAJOR_VERSION}.${LIBNETCONF2_MINOR_VERSION # with backward compatible change and micro version is connected with any internal change of the library. set(LIBNETCONF2_MAJOR_SOVERSION 1) set(LIBNETCONF2_MINOR_SOVERSION 3) -set(LIBNETCONF2_MICRO_SOVERSION 4) +set(LIBNETCONF2_MICRO_SOVERSION 5) set(LIBNETCONF2_SOVERSION_FULL ${LIBNETCONF2_MAJOR_SOVERSION}.${LIBNETCONF2_MINOR_SOVERSION}.${LIBNETCONF2_MICRO_SOVERSION}) set(LIBNETCONF2_SOVERSION ${LIBNETCONF2_MAJOR_SOVERSION})
os/fs/driver/mtd: Add 'TODO' comment to check part operations Add 'TODO comment to indicate that mtd part operations need to be checked in the future to ensure watertight checks and avoid memory leaks.
@@ -216,6 +216,10 @@ static bool part_bytecheck(FAR struct mtd_partition_s *priv, off_t byoff) * Private Functions ****************************************************************************/ +//TODO: Check mtd part functions for memory leaks such as unchecked buffer overflows, +// etc. happening especially with the procfs_part_read function. +// All functions should work irrespective of supplied buffer's size + /**************************************************************************** * Name: part_erase *
Make ++from-module not leak faces.
:: :: ++ from-module :: create wrapper - |* _[%module ..$ _abet]:(hood-module) - => .(+< [identity start finish]=+<) + |* _[identity=%module start=..$ finish=_abet]:(hood-module) =- [wrap=- *start] :: usage (wrap handle-arm):from-foo |* handle/_finish - |= _+<.handle + |= a=_+<.handle =. +>.handle (start hid (able identity)) - (ably (handle +<)) + (ably (handle a)) :: :: per-module interface wrappers ++ from-drum (from-module %drum [..$ _se-abet]:(hood-drum))
[remove] useless variable.
@@ -852,7 +852,6 @@ int timer_gettime(timer_t timerid, struct itimerspec *its) struct timer_obj *timer = (struct timer_obj *)timerid; rt_tick_t remaining; rt_uint32_t seconds, nanoseconds; - rt_int64_t nsecs, secs; if (timer == NULL) { @@ -918,7 +917,6 @@ int timer_settime(timer_t timerid, int flags, const struct itimerspec *value, struct itimerspec *ovalue) { struct timer_obj *timer = (struct timer_obj *)timerid; - rt_uint32_t duration, current; if (timer == NULL || value->it_interval.tv_nsec < 0 ||
VERSION bump to version 2.2.25
@@ -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 24) +set(SYSREPO_MICRO_VERSION 25) set(SYSREPO_VERSION ${SYSREPO_MAJOR_VERSION}.${SYSREPO_MINOR_VERSION}.${SYSREPO_MICRO_VERSION}) # Version of the library
idf.py: Don't expect "_" env. variable to be available from PowerShell
@@ -1113,7 +1113,7 @@ if __name__ == "__main__": WINPTY_VAR = "WINPTY" WINPTY_EXE = "winpty" if ("MSYSTEM" in os.environ) and ( - not os.environ["_"].endswith(WINPTY_EXE) and WINPTY_VAR not in os.environ + not os.environ.get("_", "").endswith(WINPTY_EXE) and WINPTY_VAR not in os.environ ): os.environ[WINPTY_VAR] = "1" # the value is of no interest to us # idf.py calls itself with "winpty" and WINPTY global variable set
interface: update md version Fixes urbit/landscape#662
@@ -103,6 +103,6 @@ export default class MetadataApi extends BaseApi<StoreState> { } private metadataAction(data) { - return this.action('metadata-push-hook', 'metadata-update-0', data); + return this.action('metadata-push-hook', 'metadata-update-1', data); } }
BugID:18973731:[http] update http download log and add rx buffer limit
#define HTTPCLIENT_READ_BUF_SIZE (1024) /* read payload */ #define HTTPCLIENT_RAED_HEAD_SIZE (32) /* read header */ #define HTTPCLIENT_SEND_BUF_SIZE (1024) /* send */ +#define HTTPCLIENT_CHUNK_SIZE (1024) #define HTTPCLIENT_MAX_URL_LEN (256) @@ -306,14 +307,14 @@ static int _http_get_response_body(httpclient_t *client, char *data, int data_le /* get data from internet and put into "data" buf temporary */ if (client_data->retrieve_len) { int ret; - int max_len_to_receive = client_data->response_buf_len - 1 - written_response_buf_len; + int max_len_to_receive = HTTPCLIENT_MIN(HTTPCLIENT_CHUNK_SIZE - 1, client_data->response_buf_len - 1 - written_response_buf_len); max_len_to_receive = HTTPCLIENT_MIN(max_len_to_receive, client_data->retrieve_len); ret = _http_recv(client, data, max_len_to_receive, &data_len_actually_received, iotx_time_left(&timer)); if (ret == ERROR_HTTP_CONN) { return ret; } - utils_debug("Total-Payload: %d Bytes; Read: %d Bytes", client_data->retrieve_len, data_len_actually_received); + utils_debug("Total-Remaining Payload: %d Bytes; currently Read: %d Bytes", client_data->retrieve_len, data_len_actually_received); /* TODO add deadloop processing*/ ret = _utils_check_deadloop(data_len_actually_received, &timer, ret, &dead_loop_count,
stm32/Makefile: Use MBOOT_PACK_KEYS_FILE as depedency of .pack.dfu. To match the definition of GENERATE_PACK_DFU, so a board can customise the location/name of this file if needed.
@@ -676,7 +676,7 @@ $(BUILD)/firmware.dfu: $(BUILD)/firmware0.bin $(BUILD)/firmware1.bin $(call GENERATE_DFU,$@,$(word 1,$^),$(TEXT0_ADDR),$(word 2,$^),$(TEXT1_ADDR)) endif -$(BUILD)/firmware.pack.dfu: $(BUILD)/firmware.dfu $(BOARD_DIR)/mboot_keys.h +$(BUILD)/firmware.pack.dfu: $(BUILD)/firmware.dfu $(MBOOT_PACK_KEYS_FILE) $(call GENERATE_PACK_DFU,$@,$<) $(BUILD)/firmware.hex: $(BUILD)/firmware.elf
Adds usage of PRIVATE to target_link_libraries for add_deploy CMake commands
@@ -102,7 +102,7 @@ function(add_celix_container) include_directories(${CELIX_INCLUDE_DIRS}) add_executable(${CONTAINER_TARGET} ${LAUNCHER_SRC}) set_target_properties(${CONTAINER_TARGET} PROPERTIES RUNTIME_OUTPUT_DIRECTORY ${CONTAINER_LOC}) - target_link_libraries(${CONTAINER_TARGET} ${CELIX_FRAMEWORK_LIBRARY} ${CELIX_UTILS_LIBRARY}) + target_link_libraries(${CONTAINER_TARGET} PRIVATE ${CELIX_FRAMEWORK_LIBRARY} ${CELIX_UTILS_LIBRARY}) set(LAUNCHER "$<TARGET_FILE:${CONTAINER_TARGET}>") endif ()
fix static code analysis issue
@@ -267,7 +267,7 @@ STATIC int opae_uio_init(struct opae_uio *u, const char *dfl_device) // Check for uio string in dfl_device ptr = strstr(dfl_device, "uio"); - if (ptr == dfl_device) { + if (ptr && (ptr == dfl_device)) { if (snprintf(u->device_path, sizeof(u->device_path), "/dev/%s", ptr) < 0) { ERR("snprintf() failed\n");
[BSP] Add BOARD_STM32F429_APPOLO option.
@@ -15,6 +15,11 @@ config $PKGS_DIR option env="PKGS_ROOT" default "packages" +config BOARD_STM32F429_APPOLO + bool + select ARCH_ARM_CORTEX_M4 + default y + source "$RTT_DIR/KConfig" source "$PKGS_DIR/KConfig"
Optimize setGenericCommand(): no need to remove the expiration entry when 'expire' is not NULL
@@ -99,7 +99,8 @@ void setGenericCommand(client *c, int flags, robj *key, robj *val, robj *expire, return; } - setkey_flags |= (flags & OBJ_KEEPTTL) ? SETKEY_KEEPTTL : 0; + /* When expire is not NULL, we avoid deleting the TTL so it can be updated later instead of being deleted and then created again. */ + setkey_flags |= ((flags & OBJ_KEEPTTL) || expire) ? SETKEY_KEEPTTL : 0; setkey_flags |= found ? SETKEY_ALREADY_EXIST : SETKEY_DOESNT_EXIST; setKey(c,c->db,key,val,setkey_flags);
chat-cli: Cosmetic improvements Better variable naming. Trailing newline.
=* path p.n.inbox =* mailbox q.n.inbox =/ =target (path-to-target path) - =^ mon this (read-envelopes target envelopes.mailbox) - =^ mol this $(inbox l.inbox) - =^ mor this $(inbox r.inbox) - [:(weld mon mol mor) this] + =^ moves-n this (read-envelopes target envelopes.mailbox) + =^ moves-l this $(inbox l.inbox) + =^ moves-r this $(inbox r.inbox) + [:(weld moves-n moves-l moves-r) this] :: +connect: connect to the chat-store :: ++ connect |= =path ^- target ?. ?=([@ @ *] path) - ::TODO but then doing target-to-path won't get us the same path... + ::TODO can we safely assert the above? + ~& [%path-without-host path] [our-self path] =+ who=(slaw %p i.path) ?~ who [our-self path] |= [=target envs=(list envelope)] ^- (quip move _this) ?~ envs [~ this] - =^ moi this (read-envelope target i.envs) - =^ mot this $(envs t.envs) - [(weld moi mot) this] + =^ moves-i this (read-envelope target i.envs) + =^ moves-t this $(envs t.envs) + [(weld moves-i moves-t) this] :: ++ notice-create |= =target ^- (quip move _this) - =^ moz this + =^ moves this ?: (~(has by bound) target) [~ this] (bind-default-glyph target) - [[(show-create:sh-out target) moz] this] + [[(show-create:sh-out target) moves] this] :: +bind-default-glyph: :: ++ bind-default-glyph
modinfo BUGFIX missing cache unlock Fixes
@@ -2468,6 +2468,10 @@ sr_modinfo_get_filter(struct sr_mod_info_s *mod_info, const char *xpath, sr_sess /* data will be changed, we cannot use the cache anymore */ lyd_dup_siblings(mod_info->data, NULL, LYD_DUP_RECURSIVE | LYD_DUP_WITH_FLAGS, &mod_info->data); mod_info->data_cached = 0; + + /* CACHE READ UNLOCK */ + sr_rwunlock(&mod_info->conn->running_cache_lock, SR_CONN_RUN_CACHE_LOCK_TIMEOUT, SR_LOCK_READ, + mod_info->conn->cid, __func__); } /* apply any currently handled changes (diff) or additional performed ones (edit) to get
Add missing replacements.
@@ -40,8 +40,8 @@ jobs: - C:\\Python27\\python -m pip install -U pip setuptools - C:\\Python27\\python -m pip install wheel - choco install python3 - - C:\\Python37\\python -m pip install -U pip setuptools - - C:\\Python37\\python -m pip install wheel + - C:\\Python38\\python -m pip install -U pip setuptools + - C:\\Python38\\python -m pip install wheel script: - mkdir python2 - pushd python2
For the DoH create_http_handler, also pass the socket.
@@ -3377,7 +3377,8 @@ static struct comm_point* comm_point_create_http_handler(struct comm_base *base, struct comm_point* parent, size_t bufsize, int harden_large_queries, uint32_t http_max_streams, char* http_endpoint, - comm_point_callback_type* callback, void* callback_arg) + comm_point_callback_type* callback, void* callback_arg, + struct unbound_socket* socket) { struct comm_point* c = (struct comm_point*)calloc(1, sizeof(struct comm_point)); @@ -3431,6 +3432,7 @@ comm_point_create_http_handler(struct comm_base *base, c->repinfo.c = c; c->callback = callback; c->cb_arg = callback_arg; + c->socket = socket; c->http_min_version = http_version_2; c->http2_stream_max_qbuffer_size = bufsize; @@ -3571,7 +3573,7 @@ comm_point_create_tcp(struct comm_base *base, int fd, int num, c->tcp_handlers[i] = comm_point_create_http_handler( base, c, bufsize, harden_large_queries, http_max_streams, http_endpoint, - callback, callback_arg); + callback, callback_arg, socket); } else { log_err("could not create tcp handler, unknown listen "
dms: don't load if pending
@@ -77,7 +77,7 @@ export function DmResource(props: DmResourceProps) { ); useEffect(() => { - if(dm.size === 0) { + if(dm.size === 0 && !pending) { getNewest(`~${window.ship}`, 'dm-inbox', 100, `/${patp2dec(ship)}`); } }, [ship, dm]); @@ -134,6 +134,7 @@ export function DmResource(props: DmResourceProps) { history.push('/~landscape/messages'); await airlock.poke(declineDm(ship)); }; + return ( <Col width="100%" height="100%" overflow="hidden"> <Row
[PRINTER] Fixed the VMOV.<dt> R, D[imm] instruction printer
@@ -396,7 +396,7 @@ const char* arm_print(uint32_t opcode) { int n = ((opcode >> 7) & 1) << 4 | ((opcode >> 16) & 0xF); int m = ((opcode >> 5) & 1) << 4 | ((opcode >> 0) & 0xF); - sprintf(ret, "VSHL.%s %s, %s, %s", dts[(u << 2) + size], vecname[(q << 5) + 0x20 + d], vecname[(q << 5) + 0x20 + n], vecname[(q << 5) + 0x20 + m]); + sprintf(ret, "VSHL.%s %s, %s, %s", dts[(u << 2) + size], vecname[(q << 5) + 0x20 + d], vecname[(q << 5) + 0x20 + m], vecname[(q << 5) + 0x20 + n]); } else if ((opcode & 0xFE800F10) == 0xF2000410) { int u = (opcode >> 24) & 1; int size = (opcode >> 20) & 0x3; @@ -4826,7 +4826,7 @@ const char* arm_print(uint32_t opcode) { int param1_2 = (opcode >> 21) & 0x3; int param2_2 = (opcode >> 5) & 0x3; - uint8_t opc = (u << 3) + (param1_2 << 2) + param2_2; + uint8_t opc = (u << 4) + (param1_2 << 2) + param2_2; uint8_t shift, size; if ((opc & 0b01000) == 0b01000) { shift = 0;
examples:dns_matching: fixed loop break condition The for loop was copying garbase characters after domain name. Fixed this by adding correct terminating condition. Also removed unnecessary code
@@ -70,10 +70,6 @@ int dns_matching(struct __sk_buff *skb) struct udp_t *udp = cursor_advance(cursor, sizeof(*udp)); if(udp->dport == 53){ - // Our Cursor + the length of our udp packet - size of the udp header - // - the two 16bit values for QTYPE and QCLASS. - u8 *sentinel = cursor + udp->length - sizeof(*udp) - 4; - struct dns_hdr_t *dns_hdr = cursor_advance(cursor, sizeof(*dns_hdr)); // Do nothing if packet is not a request. @@ -86,15 +82,17 @@ int dns_matching(struct __sk_buff *skb) struct dns_char_t *c; #pragma unroll for(i = 0; i<255;i++){ - if (cursor == sentinel) goto end; c = cursor_advance(cursor, 1); key.p[i] = c->c; + c = cursor_advance(cursor, 1); + if (c->c == 0) + break; + key.p[i] = c->c; } - end: - {} struct Leaf * lookup_leaf = cache.lookup(&key); // If DNS name is contained in our map, drop packet. if(lookup_leaf) { + bpf_trace_printk("Matched1\n"); return 0; } }
Solve syntax errors for Travis CI.
@@ -62,12 +62,12 @@ after_script: - TRAVIS_REPO_OWNER=${TRAVIS_REPO_SLUG%/*} - TRAVIS_REPO_NAME=${TRAVIS_REPO_SLUG#*/} - PREVIOUS_TAG=`git describe HEAD^1 --abbrev=0 --tags` - - GIT_HISTORY=`git log --no-merges --format="- %s" $PREVIOUS_TAG..HEAD` - - if [[ $PREVIOUS_TAG == "" ]]; then GIT_HISTORY=`git log --no-merges --format="- %s"` fi - - if [[ $TRAVIS_TAG == "" ]]; then TRAVIS_TAG=$PREVIOUS_TAG fi + - GIT_HISTORY=`git log --no-merges --format="- %s" ${PREVIOUS_TAG}..HEAD` + - if [[ $PREVIOUS_TAG == "" ]]; then GIT_HISTORY=`git log --no-merges --format="- %s"`; fi + - if [[ $TRAVIS_TAG == "" ]]; then TRAVIS_TAG=${PREVIOUS_TAG}; fi - RELEASE_DATE=`date '+%Y-%m-%d'` + - echo "MetaCall ${TRAVIS_TAG} [${RELEASE_DATE}]" - | ghr -t $GITHUB_TOKEN -u $TRAVIS_REPO_OWNER -r $TRAVIS_REPO_NAME -c $TRAVIS_COMMIT \ -n "MetaCall ${TRAVIS_TAG} [${RELEASE_DATE}]" -b "${GIT_HISTORY}" -replace \ $TRAVIS_TAG $ARTIFACTS_PATH/packages/ -
Removed usage of __popcnt Apparently some old processors don't support this instruction. It's up to the user to provide optimized implementation by defining macro VMA_COUNT_BITS_SET. Fixes
@@ -2685,6 +2685,11 @@ static void vma_aligned_free(void* VMA_NULLABLE ptr) #endif #endif +#ifndef VMA_COUNT_BITS_SET + // Returns number of bits set to 1 in (v) + #define VMA_COUNT_BITS_SET(v) VmaCountBitsSet(v) +#endif + #ifndef VMA_BITSCAN_LSB // Scans integer for index of first nonzero value from the Least Significant Bit (LSB). If mask is 0 then returns UINT8_MAX #define VMA_BITSCAN_LSB(mask) VmaBitScanLSB(mask) @@ -3074,21 +3079,28 @@ class VmaAllocationObjectAllocator; #ifndef _VMA_FUNCTIONS -// Returns number of bits set to 1 in (v). -static inline uint32_t VmaCountBitsSet(uint32_t v) -{ -#ifdef _MSC_VER + +/* +Returns number of bits set to 1 in (v). + +On specific platforms and compilers you can use instrinsics like: + +Visual Studio: return __popcnt(v); -#elif defined __GNUC__ || defined __clang__ +GCC, Clang: return static_cast<uint32_t>(__builtin_popcount(v)); -#else + +Define macro VMA_COUNT_BITS_SET to provide your optimized implementation. +But you need to check in runtime whether user's CPU supports these, as some old processors don't. +*/ +static inline uint32_t VmaCountBitsSet(uint32_t v) +{ uint32_t c = v - ((v >> 1) & 0x55555555); c = ((c >> 2) & 0x33333333) + (c & 0x33333333); c = ((c >> 4) + c) & 0x0F0F0F0F; c = ((c >> 8) + c) & 0x00FF00FF; c = ((c >> 16) + c) & 0x0000FFFF; return c; -#endif } static inline uint8_t VmaBitScanLSB(uint64_t mask) @@ -14625,8 +14637,8 @@ VkResult VmaAllocator_T::FindMemoryTypeIndex( if((requiredFlags & ~currFlags) == 0) { // Calculate cost as number of bits from preferredFlags not present in this memory type. - uint32_t currCost = VmaCountBitsSet(preferredFlags & ~currFlags) + - VmaCountBitsSet(currFlags & notPreferredFlags); + uint32_t currCost = VMA_COUNT_BITS_SET(preferredFlags & ~currFlags) + + VMA_COUNT_BITS_SET(currFlags & notPreferredFlags); // Remember memory type with lowest cost. if(currCost < minCost) {
Release jni_sync_lock it on put/post fail If initPut or initPost methods fail this will release the jni_sync_lock before returning to prevent the code from deadlocking.
@@ -1336,7 +1336,13 @@ bool jni_oc_init_put(const char *uri, oc_endpoint_t *endpoint, const char *query OC_DBG("JNI: %s\n", __func__); OC_DBG("JNI: - lock %s\n", __func__); jni_mutex_lock(jni_sync_lock); - return oc_init_put(uri, endpoint, query, handler, qos, jcb); + bool returnValue = oc_init_put(uri, endpoint, query, handler, qos, jcb); + if (returnValue == false) { + jni_mutex_unlock(jni_sync_lock); + OC_DBG("JNI - initPut failed releasing jni_sync_lock"); + OC_DBG("JNI: - unlock %s\n", __func__); + } + return returnValue; } %} @@ -1360,7 +1366,13 @@ bool jni_oc_init_post(const char *uri, oc_endpoint_t *endpoint, const char *quer OC_DBG("JNI: %s\n", __func__); OC_DBG("JNI: - lock %s\n", __func__); jni_mutex_lock(jni_sync_lock); - return oc_init_post(uri, endpoint, query, handler, qos, jcb); + bool returnValue = oc_init_post(uri, endpoint, query, handler, qos, jcb); + if (returnValue == false) { + jni_mutex_unlock(jni_sync_lock); + OC_DBG("JNI - initPost failed releasing jni_sync_lock"); + OC_DBG("JNI: - unlock %s\n", __func__); + } + return returnValue } %}
Synchronous egg commitment
@@ -1622,35 +1622,6 @@ _raft_punk(u3_noun ovo) } -static void -_raft_comm(c3_d bid_d) -{ - u3p(u3v_cart) egg_p; - - u3_lo_open(); - - egg_p = u3A->ova.egg_p; - while ( egg_p ) { - u3v_cart* egg_u = u3to(u3v_cart, egg_p); - - if ( egg_u->ent_d <= bid_d ) { - egg_u->cit = c3y; - } else break; - - egg_p = egg_u->nex_p; - } - u3_lo_shut(c3y); -} - -static void -_raft_comm_cb(uv_timer_t* tim_u) -{ - u3_raft* raf_u = tim_u->data; - - _raft_comm(raf_u->ent_d); -} - - static c3_d _raft_push(u3_raft* raf_u, c3_w* bob_w, c3_w len_w) { @@ -1664,8 +1635,17 @@ _raft_push(u3_raft* raf_u, c3_w* bob_w, c3_w len_w) u3t_event_trace("Recording", 'e'); raf_u->lat_w = raf_u->tem_w; // XX - if ( !uv_is_active((uv_handle_t*)&raf_u->tim_u) ) { - uv_timer_start(&raf_u->tim_u, _raft_comm_cb, 0, 0); + u3p(u3v_cart) egg_p; + + egg_p = u3A->ova.egg_p; + while ( egg_p ) { + u3v_cart* egg_u = u3to(u3v_cart, egg_p); + + if ( egg_u->ent_d <= raf_u->ent_d ) { + egg_u->cit = c3y; + } else break; + + egg_p = egg_u->nex_p; } return raf_u->ent_d;
libhfuzz: call __asan_init is it's available, and under Android
int hfuzz_module_instrument = 0; static bool guards_initialized = false; - -#if defined(__has_feature) -#if __has_feature(address_sanitizer) -void __asan_init(void); -#endif /* __has_feature(address_sanitizer) */ -#endif /* defined(__has_feature) */ +void __asan_init(void) __attribute__((weak)); /* * We require SSE4.2 with x86-(32|64) for the 'popcnt', as it's much faster than the software @@ -44,7 +39,6 @@ static feedback_t bbMapFb; feedback_t* feedback = &bbMapFb; uint32_t my_thread_no = 0; - __attribute__((constructor)) static void mapBB(void) { char* my_thread_no_str = getenv(_HF_THREAD_NO_ENV); if (my_thread_no_str == NULL) { @@ -239,8 +233,6 @@ ATTRIBUTE_X86_REQUIRE_SSE42 void __sanitizer_cov_trace_pc_guard_init( ATTRIBUTE_X86_REQUIRE_SSE42 void __sanitizer_cov_trace_pc_guard(uint32_t* guard) { #if defined(__ANDROID__) -#if defined(__has_feature) -#if __has_feature(address_sanitizer) // ANDROID: Bionic invokes routines that Honggfuzz wraps, before either // ASAN or Honggfuzz have initialized. Check to see if Honggfuzz // has initialized -- if not, force ASAN to initialize (otherwise @@ -248,12 +240,12 @@ ATTRIBUTE_X86_REQUIRE_SSE42 void __sanitizer_cov_trace_pc_guard(uint32_t* guard) // // Defer all trace_pc_guard activity until trace_pc_guard_init is // invoked via sancov.module_ctor in the normal process of things. - if (!inited) { + if (!guards_initialized) { + if (__asan_init) { __asan_init(); + } return; } -#endif /* __has_feature(address_sanitizer) */ -#endif /* defined(__has_feature) */ #endif /* defined(__ANDROID__) */ if (*guard == 0U) { return;
Fix TZ grid search and star refinement Changes TZ grid search and star refinement to keep the origin constant instead of moving to the best position after each iteration. Changes star refinement to loop until there is no more improvement, instead of running the step only once.
@@ -478,6 +478,7 @@ static bool early_terminate(inter_search_info_t *info) void kvz_tz_pattern_search(inter_search_info_t *info, unsigned pattern_type, const int iDist, + vector2d_t mv, int *best_dist) { assert(pattern_type < 4); @@ -573,8 +574,6 @@ void kvz_tz_pattern_search(inter_search_info_t *info, }; } - const vector2d_t mv = { info->best_mv.x >> 2, info->best_mv.y >> 2 }; - // Compute SAD values for all chosen points. int best_index = -1; for (int i = 0; i < n_points; i++) { @@ -632,9 +631,11 @@ static void tz_search(inter_search_info_t *info, vector2d_t extra_mv) return; } + vector2d_t start = { info->best_mv.x >> 2, info->best_mv.y >> 2 }; + //step 2, grid search for (int iDist = 1; iDist <= iSearchRange; iDist *= 2) { - kvz_tz_pattern_search(info, step2_type, iDist, &best_dist); + kvz_tz_pattern_search(info, step2_type, iDist, start, &best_dist); } //step 3, raster scan @@ -648,14 +649,19 @@ static void tz_search(inter_search_info_t *info, vector2d_t extra_mv) //raster refinement if (bRasterRefinementEnable && best_dist > 0) { for (int iDist = best_dist >> 1; iDist > 0; iDist >>= 1) { - kvz_tz_pattern_search(info, step4_type, iDist, &best_dist); + start.x = info->best_mv.x >> 2; + start.y = info->best_mv.y >> 2; + kvz_tz_pattern_search(info, step4_type, iDist, start, &best_dist); } } //star refinement (repeat step 2 for the current starting point) - if (bStarRefinementEnable && best_dist > 0) { + while (bStarRefinementEnable && best_dist > 0) { + best_dist = 0; + start.x = info->best_mv.x >> 2; + start.y = info->best_mv.y >> 2; for (int iDist = 1; iDist <= iSearchRange; iDist *= 2) { - kvz_tz_pattern_search(info, step4_type, iDist, &best_dist); + kvz_tz_pattern_search(info, step4_type, iDist, start, &best_dist); } } }
BugID:16944965: Fix test/Config.in
@@ -7,16 +7,15 @@ source "test/develop/benchmark/realtime_test/Config.in" source "test/develop/bluetooth/ble_bqb/Config.in" source "test/develop/bluetooth/blemesh/Config.in" source "test/develop/bluetooth/blemesh_cli/Config.in" +source "test/develop/bluetooth/blemesh_cmds/Config.in" source "test/develop/bluetooth/blemesh_srv/Config.in" source "test/develop/comboapp/Config.in" source "test/develop/cpp_demo/Config.in" -source "test/develop/cryptotest/Config.in" +source "test/develop/crypto_test/Config.in" source "test/develop/hdlcapp/hdlcclient/Config.in" source "test/develop/hdlcapp/hdlcserver/Config.in" source "test/develop/helloworld_nocli/Config.in" source "test/develop/i2c_hts221_test/Config.in" -source "test/develop/id2_app/Config.in" -source "test/develop/itls_app/Config.in" source "test/develop/kernel_test/Config.in" source "test/develop/linuxapp/Config.in" source "test/develop/littlevgl_simulate/Config.in" @@ -26,13 +25,13 @@ source "test/develop/nano/Config.in" source "test/develop/netmgrapp/Config.in" source "test/develop/networkapp/Config.in" source "test/develop/opusapp/Config.in" -source "test/develop/prov_app/Config.in" source "test/develop/rhinorun/Config.in" source "test/develop/salserver/Config.in" source "test/develop/smpapp/Config.in" source "test/develop/smpapp_4core/Config.in" source "test/develop/sst_app/Config.in" source "test/develop/syscall/Config.in" +source "test/develop/uapp1/Config.in" source "test/develop/uapp2/Config.in" source "test/develop/vflashdemo/Config.in" source "test/develop/wifihalapp/Config.in" @@ -53,6 +52,8 @@ source "test/testcase/kernel/fs/kv/Config.in" source "test/testcase/kernel/realtime/Config.in" source "test/testcase/kernel/rhino/Config.in" source "test/testcase/kernel/vfs/Config.in" +source "test/testcase/network/protocols/mesh_test/Config.in" +source "test/testcase/network/yloop_test/Config.in" source "test/testcase/osal_test/aos/Config.in" source "test/testcase/osal_test/posix/Config.in" source "test/testcase/security/id2_test/Config.in"
Add 'since' at mqtt APIs for doxygen
@@ -147,7 +147,7 @@ typedef struct _mqtt_client_t { * * @param[in] config the information of MQTT client object configuration * @return On success, the handle of MQTT client object is returned. On failure, NULL is returned. - * + * @since Tizen RT v1.1 */ mqtt_client_t *mqtt_init_client(mqtt_client_config_t *config); @@ -156,7 +156,7 @@ mqtt_client_t *mqtt_init_client(mqtt_client_config_t *config); * * @param[in] handle the handle of MQTT client object * @return On success, 0 is returned. On failure, a negative value is returned. - * + * @since Tizen RT v1.1 */ int mqtt_deinit_client(mqtt_client_t *handle); @@ -168,7 +168,7 @@ int mqtt_deinit_client(mqtt_client_t *handle); * @param[in] port MQTT broker port * @param[in] keep_alive MQTT keep-alive time in second * @return On success, 0 is returned. On failure, a negative value is returned. - * + * @since Tizen RT v1.1 */ int mqtt_connect(mqtt_client_t *handle, char *addr, int port, int keep_alive); @@ -177,7 +177,7 @@ int mqtt_connect(mqtt_client_t *handle, char *addr, int port, int keep_alive); * * @param[in] handle the handle of MQTT client object * @return On success, 0 is returned. On failure, a negative value is returned. - * + * @since Tizen RT v1.1 */ int mqtt_disconnect(mqtt_client_t *handle); @@ -191,7 +191,7 @@ int mqtt_disconnect(mqtt_client_t *handle); * @param[in] qos the Quality of Service to be used for the message. QoS value should be 0,1 or 2. * @param[in] retain the flag to make the message retained. * @return On success, 0 is returned. On failure, a negative value is returned. - * + * @since Tizen RT v1.1 */ int mqtt_publish(mqtt_client_t *handle, char *topic, char *data, uint32_t data_len, uint8_t qos, uint8_t retain); @@ -202,7 +202,7 @@ int mqtt_publish(mqtt_client_t *handle, char *topic, char *data, uint32_t data_l * @param[in] topic the topic on which the message to be unsubscribed * @param[in] qos the Quality of Service for the subscription. QoS value should be 0,1 or 2. * @return On success, 0 is returned. On failure, a negative value is returned. - * + * @since Tizen RT v1.1 */ int mqtt_subscribe(mqtt_client_t *handle, char *topic, uint8_t qos); @@ -212,7 +212,7 @@ int mqtt_subscribe(mqtt_client_t *handle, char *topic, uint8_t qos); * @param[in] handle the handle of MQTT client object * @param[in] topic the topic on which the message to be unsubscribed * @return On success, 0 is returned. On failure, a negative value is returned. - * + * @since Tizen RT v1.1 */ int mqtt_unsubscribe(mqtt_client_t *handle, char *topic);
spi_common: remove deprecated spi_common_periph_claim macros
@@ -143,18 +143,6 @@ esp_err_t spi_bus_free(spi_host_device_t host); */ bool spicommon_periph_claim(spi_host_device_t host, const char* source); -// The macro is to keep the back-compatibility of IDF v3.2 and before -// In this way we can call spicommon_periph_claim with two arguments, or the host with the source set to the calling function name -// When two arguments (host, func) are given, __spicommon_periph_claim2 is called -// or if only one arguments (host) is given, __spicommon_periph_claim1 is called -#define spicommon_periph_claim(host...) __spicommon_periph_claim(host, 2, 1) -#define __spicommon_periph_claim(host, source, n, ...) __spicommon_periph_claim ## n(host, source) -#define __spicommon_periph_claim1(host, _) ({ \ - char* warning_str = "calling spicommon_periph_claim without source string is deprecated.";\ - spicommon_periph_claim(host, __FUNCTION__); }) - -#define __spicommon_periph_claim2(host, func) spicommon_periph_claim(host, func) - /** * @brief Check whether the spi periph is in use. *
[bsp] Fix a CAN interrupt number macro definition bug for STM32F10X_LD,STM32F10X_MD and STM32F10X_XL series.
#include <rtdevice.h> #include <board.h> #include <bxcan.h> + #ifdef RT_USING_COMPONENTS_INIT #include <components.h> #endif + #ifdef RT_USING_CAN #ifndef STM32F10X_CL #define BX_CAN_FMRNUMBER 28 #define BX_CAN2_FMRSTART 14 #endif -#ifdef STM32F10X_HD -#undef USING_BXCAN2 +#if (defined (STM32F10X_LD)) || (defined (STM32F10X_MD)) || (defined (STM32F10X_HD)) || (defined (STM32F10X_XL)) +#undef USING_BXCAN2 #define CAN1_RX0_IRQn USB_LP_CAN1_RX0_IRQn #define CAN1_TX_IRQn USB_HP_CAN1_TX_IRQn #endif + #define BX_CAN_MAX_FILTERS (BX_CAN_FMRNUMBER * 4) #define BX_CAN_MAX_FILTER_MASKS BX_CAN_MAX_FILTERS #define BX_CAN_FILTER_MAX_ARRAY_SIZE ((BX_CAN_MAX_FILTERS + 32 - 1) / 32)
spi_master: change to DMA burst mode when access descriptors
@@ -607,6 +607,8 @@ static void SPI_MASTER_ISR_ATTR spi_intr(void *arg) host->hw->dma_in_link.start=0; host->hw->dma_conf.val &= ~(SPI_OUT_RST|SPI_IN_RST|SPI_AHBM_RST|SPI_AHBM_FIFO_RST); host->hw->dma_conf.out_data_burst_en=1; + host->hw->dma_conf.indscr_burst_en=1; + host->hw->dma_conf.outdscr_burst_en=1; //Set up QIO/DIO if needed host->hw->ctrl.val &= ~(SPI_FREAD_DUAL|SPI_FREAD_QUAD|SPI_FREAD_DIO|SPI_FREAD_QIO); host->hw->user.val &= ~(SPI_FWRITE_DUAL|SPI_FWRITE_QUAD|SPI_FWRITE_DIO|SPI_FWRITE_QIO);
Make use of POCL_DEVICES_ENV
@@ -617,9 +617,9 @@ pocl_init_devices () pocl_num_devices += device_count[i]; } - const char *dev_env = pocl_get_string_option ("POCL_DEVICES", NULL); + const char *dev_env = pocl_get_string_option (POCL_DEVICES_ENV, NULL); POCL_GOTO_ERROR_ON ((pocl_num_devices == 0), CL_DEVICE_NOT_FOUND, - "no devices found. POCL_DEVICES=%s\n", dev_env); + "no devices found. %s=%s\n", POCL_DEVICES_ENV, dev_env); pocl_devices = (struct _cl_device_id*) calloc(pocl_num_devices, sizeof(struct _cl_device_id)); POCL_GOTO_ERROR_ON ((pocl_devices == NULL), CL_OUT_OF_HOST_MEMORY,
Extend the note id to 32 bits
@@ -117,7 +117,7 @@ typedef int32_t clap_event_type; typedef struct clap_event_note { clap_event_header_t header; - int16_t note_id; // -1 if unspecified, otherwise >0 + int32_t note_id; // -1 if unspecified, otherwise >0 int16_t port_index; int16_t key; // 0..127 int16_t channel; // 0..15 @@ -148,7 +148,7 @@ typedef struct clap_event_note_expression { clap_note_expression expression_id; // target a specific note_id, port, key and channel, -1 for global - int16_t note_id; + int32_t note_id; int16_t port_index; int16_t key; int16_t channel; @@ -164,7 +164,7 @@ typedef struct clap_event_param_value { void *cookie; // @ref clap_param_info.cookie // target a specific note_id, port, key and channel, -1 for global - int16_t note_id; + int32_t note_id; int16_t port_index; int16_t channel; int16_t key; @@ -180,7 +180,7 @@ typedef struct clap_event_param_mod { void *cookie; // @ref clap_param_info.cookie // target a specific note_id, port, key and channel, -1 for global - int16_t note_id; + int32_t note_id; int16_t port_index; int16_t channel; int16_t key;
Completions: Do not suggest useless entries
@@ -69,7 +69,7 @@ end function __fish_kdb_print_namespaces -d 'Print a list of possible namespace completions' set -l namespace (commandline -ct) - kdb complete --max-depth=1 "$namespace" + kdb complete --max-depth=1 "$namespace" | string match -vr '(dir|proc|spec|user)$' end # -- Completions ---------------------------------------------------------------------------------------------------------------------------