message
stringlengths 6
474
| diff
stringlengths 8
5.22k
|
---|---|
fix single doc multiclass | @@ -420,10 +420,9 @@ inline void CalcTreesSingleDocImpl(
if (IsSingleClassModel) { // single class model
result += treeLeafPtr[index];
} else { // mutliclass model
- auto docResultPtr = &results[model.ObliviousTrees.ApproxDimension];
auto leafValuePtr = treeLeafPtr + index * model.ObliviousTrees.ApproxDimension;
for (int classId = 0; classId < model.ObliviousTrees.ApproxDimension; ++classId) {
- docResultPtr[classId] += leafValuePtr[classId];
+ results[classId] += leafValuePtr[classId];
}
}
treeSplitsCurPtr += curTreeSize;
|
Drop tasks to unknown groups | @@ -6241,6 +6241,12 @@ void DeRestPluginPrivate::processTasks()
DBG_Printf(DBG_INFO, "delayed group sending\n");
}
}
+ else
+ {
+ DBG_Printf(DBG_INFO, "drop request to unknown group\n");
+ tasks.erase(i);
+ return;
+ }
}
// unicast/broadcast tasks
else
|
Testing: remove unused BUFR files | @@ -39,7 +39,6 @@ bufr_files_zero_leaks="
aeolus_wmo_26.bufr
delayed_repl_01.bufr
goes16_nm.bufr
- good_j2eo.bufr
israel_observations_2017041010.bufr
mhen_55.bufr
modw_87.bufr
@@ -173,10 +172,7 @@ bufr_files_known_leaks="
s4kn_165.bufr
sb19_206.bufr
sbu8_206.bufr
- ship_11.bufr
- ship_12.bufr
ship_13.bufr
- ship_14.bufr
ship_19.bufr
ship_9.bufr
smin_49.bufr
@@ -190,11 +186,9 @@ bufr_files_known_leaks="
ssbt_127.bufr
stuk_7.bufr
syno_1.bufr
- syno_2.bufr
syno_3.bufr
syno_4.bufr
syno_multi.bufr
- synop.bufr
temp-land-with-substituted-values.bufr
temp_101.bufr
temp_102.bufr
|
Update README.md
Add POWER 8 to the list of additional architectures. | @@ -106,6 +106,9 @@ Please read GotoBLAS_01Readme.txt
- **ARMV8**: Experimental
- **ARM Cortex-A57**: Experimental
+#### PPC/PPC64
+- **POWER8**: Optmized Level-3 BLAS and some Level-1, only with USE_OPENMP=1
+
#### IBM zEnterprise System:
- **Z13**: Optimized Level-3 BLAS and Level-1,2 (double precision)
|
groups: add invite count to tile | @@ -8,13 +8,36 @@ export default class ContactTile extends Component {
render() {
const { props } = this;
+ let data = _.get(props.data, "invites", false);
+ let inviteNum = 0;
+
+ if (data && "/contacts" in data) {
+ inviteNum = Object.keys(data["/contacts"]).length;
+ }
+
+ let numNotificationsElem =
+ inviteNum > 0 ? (
+ <p
+ className="absolute green2 white-d"
+ style={{
+ bottom: 6,
+ fontWeight: 400,
+ fontSize: 12,
+ lineHeight: "20px"
+ }}>
+ {inviteNum > 99 ? "99+" : inviteNum}
+ </p>
+ ) : (
+ <div />
+ );
+
return (
- <div className={"w-100 h-100 relative bg-white bg-gray0-d " +
- "b--black b--gray1-d ba"}>
+ <div
+ className={
+ "w-100 h-100 relative bg-white bg-gray0-d " + "b--black b--gray1-d ba"
+ }>
<a className="w-100 h-100 db pa2 bn" href="/~groups">
- <p
- className="black white-d absolute f9"
- style={{ left: 8, top: 8 }}>
+ <p className="black white-d absolute f9" style={{ left: 8, top: 8 }}>
Groups
</p>
<img
@@ -24,6 +47,7 @@ export default class ContactTile extends Component {
width={48}
height={48}
/>
+ {numNotificationsElem}
</a>
</div>
);
|
opae-sdk: fix fpaginfo image info typo | @@ -648,7 +648,7 @@ fpga_result fpga_image_info(fpga_token token)
const char *image_info_label[IMAGE_INFO_COUNT] = {
"User1 Image Info",
"User2 Image Info",
- "User2 ImFactory Info"
+ "Factory Image Info"
};
fpga_object fpga_object;
|
Peek: add function pushKeyValuePairs | @@ -85,6 +85,13 @@ pushRealFloat f =
then pushnumber (realToFrac f :: Lua.Number)
else pushString (showGFloat Nothing f "")
+-- | Push list of pairs as default key-value Lua table.
+pushKeyValuePairs :: Pusher a -> Pusher b -> Pusher [(a,b)]
+pushKeyValuePairs pushKey pushValue m = do
+ let addValue (k, v) = pushKey k *> pushValue v *> rawset (-3)
+ newtable
+ mapM_ addValue m
+
-- | Push list as numerically indexed table.
pushList :: Pusher a -> [a] -> Lua ()
pushList push xs = do
@@ -94,10 +101,7 @@ pushList push xs = do
-- | Push 'Map' as default key-value Lua table.
pushMap :: Pusher a -> Pusher b -> Pusher (Map a b)
-pushMap pushKey pushValue m = do
- let addValue (k, v) = pushKey k *> pushValue v *> rawset (-3)
- newtable
- mapM_ addValue (toList m)
+pushMap pushKey pushValue m = pushKeyValuePairs pushKey pushValue $ toList m
-- | Push a 'Set' as idiomatic Lua set, i.e., as a table with the set
-- elements as keys and @true@ as values.
|
OpenCanopy: Remove pointless clipping code | @@ -76,10 +76,8 @@ InternalAppleEventNotification (
//
NewX = Information->PointerPosition.Horizontal;
- if (NewX == 0 || (UINT32) NewX == Context->MaxX) {
- Context->CurState.X = (UINT32) NewX;
- } else {
- NewCoord = (INT64) Context->CurState.X + 2 * ((INT64) NewX - Context->RawX);
+
+ NewCoord = (INT64) Context->CurState.X + ((INT64) NewX - Context->RawX);
if (NewCoord < 0) {
NewCoord = 0;
} else if (NewCoord > Context->MaxX) {
@@ -87,15 +85,11 @@ InternalAppleEventNotification (
}
Context->CurState.X = (UINT32) NewCoord;
- }
-
Context->RawX = NewX;
NewY = Information->PointerPosition.Vertical;
- if (NewY == 0 || (UINT32) NewY == Context->MaxY) {
- Context->CurState.Y = (UINT32) NewY;
- } else {
- NewCoord = (INT64) Context->CurState.Y + 2 * ((INT64) NewY - Context->RawY);
+
+ NewCoord = (INT64) Context->CurState.Y + ((INT64) NewY - Context->RawY);
if (NewCoord < 0) {
NewCoord = 0;
} else if (NewCoord > Context->MaxY) {
@@ -103,8 +97,6 @@ InternalAppleEventNotification (
}
Context->CurState.Y = (UINT32) NewCoord;
- }
-
Context->RawY = NewY;
}
|
Tweak timing of enabling transport parameters | @@ -2575,6 +2575,8 @@ static size_t conn_required_num_new_connection_id(ngtcp2_conn *conn) {
return 0;
}
+ assert(conn->remote.transport_params.active_connection_id_limit);
+
/* len includes retired CID. We don't provide extra CID if doing so
exceeds NGTCP2_MAX_SCID_POOL_SIZE. */
@@ -9123,6 +9125,12 @@ int ngtcp2_conn_install_rx_key(ngtcp2_conn *conn, const uint8_t *secret,
pktns->crypto.rx.hp_ctx = *hp_ctx;
+ if (!conn->server) {
+ conn->remote.transport_params = conn->remote.pending_transport_params;
+ conn_sync_stream_id_limit(conn);
+ conn->tx.max_offset = conn->remote.transport_params.initial_max_data;
+ }
+
return 0;
}
@@ -9145,9 +9153,11 @@ int ngtcp2_conn_install_tx_key(ngtcp2_conn *conn, const uint8_t *secret,
pktns->crypto.tx.hp_ctx = *hp_ctx;
+ if (conn->server) {
conn->remote.transport_params = conn->remote.pending_transport_params;
conn_sync_stream_id_limit(conn);
conn->tx.max_offset = conn->remote.transport_params.initial_max_data;
+ }
return 0;
}
@@ -9379,7 +9389,8 @@ int ngtcp2_conn_set_remote_transport_params(
ngtcp2_qlog_parameters_set_transport_params(&conn->qlog, params, conn->server,
NGTCP2_QLOG_SIDE_REMOTE);
- if (conn->pktns.crypto.tx.ckm) {
+ if ((conn->server && conn->pktns.crypto.tx.ckm) ||
+ (!conn->server && conn->pktns.crypto.rx.ckm)) {
conn->remote.transport_params = *params;
conn_sync_stream_id_limit(conn);
conn->tx.max_offset = conn->remote.transport_params.initial_max_data;
|
SVE-enabled ARM64 targets in DYNAMIC_ARCH require a recent compiler | @@ -44,7 +44,10 @@ endif ()
if (DYNAMIC_ARCH)
if (ARM64)
- set(DYNAMIC_CORE ARMV8 CORTEXA53 CORTEXA55 CORTEXA57 CORTEXA72 CORTEXA73 FALKOR THUNDERX THUNDERX2T99 TSV110 EMAG8180 NEOVERSEN1 NEOVERSEV1 NEOVERSEN2 THUNDERX3T110)
+ set(DYNAMIC_CORE ARMV8 CORTEXA53 CORTEXA55 CORTEXA57 CORTEXA72 CORTEXA73 FALKOR THUNDERX THUNDERX2T99 TSV110 EMAG8180 NEOVERSEN1 THUNDERX3T110)
+ if (${CMAKE_C_COMPILER_VERSION} VERSION_GREATER 9.99)
+ set(DYNAMIC_CORE "${DYNAMIC_CORE} NEOVERSEV1 NEOVERSEN2"
+ endif ()
if (DYNAMIC_LIST)
set(DYNAMIC_CORE ARMV8 ${DYNAMIC_LIST})
endif ()
|
Fixes enable hash cap memory leak | @@ -281,6 +281,7 @@ ACVP_RESULT acvp_free_test_session(ACVP_CTX *ctx)
cap_entry = cap_e2;
break;
case ACVP_HASH_TYPE:
+ free(cap_entry->cap.hash_cap);
free(cap_entry);
cap_entry = cap_e2;
break;
@@ -294,6 +295,7 @@ ACVP_RESULT acvp_free_test_session(ACVP_CTX *ctx)
acvp_free_prereqs(cap_entry);
}
acvp_cap_free_sl(cap_entry->cap.hmac_cap->mac_len);
+ free(cap_entry->cap.hmac_cap);
free(cap_entry);
cap_entry = cap_e2;
break;
@@ -302,6 +304,7 @@ ACVP_RESULT acvp_free_test_session(ACVP_CTX *ctx)
acvp_free_prereqs(cap_entry);
}
acvp_cap_free_sl(cap_entry->cap.cmac_cap->mac_len);
+ free(cap_entry->cap.cmac_cap);
free(cap_entry);
cap_entry = cap_e2;
break;
|
flash_ec: Always define ACTIVE_DEVICE.
This will be used in CL:2441395.
BRANCH=none
TEST=With servo_v4 Type-A + servo_micro + ampton DUT:
$ util/flash_ec --board=ampton --verbose --read="$HOME"/ampton-ec-read0.bin | @@ -399,12 +399,18 @@ case "${CHIP}" in
esac
SERVO_TYPE="$(dut_control_get servo_type || :)"
-if [[ ${SERVO_TYPE} =~ servo_v4_with_.*_and_.* ]] ; then
+
+if [[ "${SERVO_TYPE}" =~ ^servo_v4_with_.*$ ]]; then
+ ACTIVE_DEVICE="$(dut_control_get active_v4_device)"
+else
+ ACTIVE_DEVICE="${SERVO_TYPE}"
+fi
+
+if [[ "${SERVO_TYPE}" =~ ^servo_v4_with_.*_and_.*$ ]]; then
# If there are two devices, servo v4 type will show both devices. The
# default device is first. The other device is second.
# servo_type:servo_v4_with_servo_micro_and_ccd_cr50
SECOND_DEVICE="${SERVO_TYPE#*_and_}"
- ACTIVE_DEVICE="$(dut_control_get active_v4_device || :)"
SERVO_TYPE="servo_v4_with_${ACTIVE_DEVICE}"
# Controls sent through the default device don't have a prefix. The
# second device controls do. If the default device isn't active, we
|
peview: Fix Microsoft reparse tag check | @@ -107,7 +107,10 @@ PPH_STRING PvResolveReparsePointTarget(
reparseLength
)))
{
- if (reparseBuffer->ReparseTag == IO_REPARSE_TAG_APPEXECLINK)
+ if (
+ IsReparseTagMicrosoft(reparseBuffer->ReparseTag) &&
+ reparseBuffer->ReparseTag == IO_REPARSE_TAG_APPEXECLINK
+ )
{
typedef struct _AppExecLinkReparseBuffer
{
|
drivers/mbox: Don't reference the nonexistent CONFIG_MBOX | #ifndef __INCLUDE_NUTTX_MBOX_MBOX_H
#define __INCLUDE_NUTTX_MBOX_MBOX_H
-#ifdef CONFIG_MBOX
-
/****************************************************************************
* Included Files
****************************************************************************/
-#include <nuttx/config.h>
+#include <nuttx/compiler.h>
+
#include <stdbool.h>
+#include <stdint.h>
/****************************************************************************
* Pre-processor Definitions
@@ -127,5 +127,4 @@ extern "C"
}
#endif
-#endif /* CONFIG_MBOX */
#endif /* __INCLUDE_NUTTX_MBOX_MBOX_H */
|
arping: coverity woe on COPY_PASTE_ERROR
coverity is trying to outsmart human by guessing on COPY_PASTE_ERROR.
Have it your way.
Type: fix | @@ -178,7 +178,7 @@ VLIB_NODE_FN (arping_input_node)
aif1->recv.from4.ip4.as_u32 =
arp1->ip4_over_ethernet[0].ip4.as_u32;
clib_memcpy_fast (&aif1->recv.from4.mac,
- &arp0->ip4_over_ethernet[0].mac, 6);
+ &arp1->ip4_over_ethernet[0].mac, 6);
aif1->reply_count++;
}
}
|
SOVERSION bump to version 1.1.5 | @@ -54,7 +54,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 1)
-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})
|
ViewProfile: restore nickname calmengine | @@ -18,10 +18,14 @@ import {GroupSummary} from "~/views/landscape/components/GroupSummary";
import {MetadataUpdatePreview} from "~/types";
import {GroupLink} from "~/views/components/GroupLink";
import {lengthOrder} from "~/logic/lib/util";
+import useLocalState from "~/logic/state/local";
export function ViewProfile(props: any) {
const history = useHistory();
+ const { hideNicknames } = useLocalState(({ hideNicknames }) => ({
+ hideNicknames
+ }));
const { api, contact, nacked, isPublic, ship, associations, groups } = props;
return (
@@ -32,7 +36,7 @@ export function ViewProfile(props: any) {
width="100%">
<Center width="100%">
<Text>
- {(contact?.nickname ? contact.nickname : "")}
+ {((!hideNicknames && contact?.nickname) ? contact.nickname : "")}
</Text>
</Center>
</Row>
|
naive: double-spawn is no-op, not crash | =/ marbud-sproxy [marbud-own %set-spawn-proxy (addr %marbud-skey)]
=/ lt-spawn-0 [marbud-own %spawn ~linnup-torsyx (addr %lt-key-0)]
=/ lt-spawn-1 [marbud-spn %spawn ~linnup-torsyx (addr %lt-key-1)]
- ::
- %- expect-fail
- |.
=| =^state:naive
=^ f state (init-marbud state)
=^ f state (n state %bat q:(gen-tx 0 marbud-sproxy %marbud-key-0))
=^ f state (n state %bat q:(gen-tx 1 lt-spawn-0 %marbud-key-0))
+ =/ marbud-point (~(got by points.state) ~marbud)
+ =/ new-marbud marbud-point(nonce.spawn-proxy.own 1)
+ =/ no-op-state state(points (~(put by points.state) ~marbud new-marbud))
+ ::
+ %+ expect-eq
+ !> no-op-state
+ ::
+ !>
=^ f state (n state %bat q:(gen-tx 0 lt-spawn-1 %marbud-skey))
state
::
-::
++ test-marbud-l2-change-keys ^- tang
=/ new-keys [%configure-keys encr auth suit |]
=/ marbud-mproxy [marbud-own %set-management-proxy (addr %marbud-mkey)]
[escape.net sponsor.net]:(~(got by points.state) ~linnup-torsyx)
::
++ test-linnup-torsyx-l2-adopt-reject ^- tang
- :: TODO: at the moment the default sponsor is always ~zod, but it should probably
- :: be ~marbud here
=/ lt-spawn [marbud-own %spawn ~linnup-torsyx (addr %lt-key-0)]
=/ lt-transfer-yes-breach [lt-xfr %transfer-point (addr %lt-key-0) &]
::
|
VERSION bump to version 2.0.191 | @@ -61,7 +61,7 @@ set (CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR})
# set version of the project
set(LIBYANG_MAJOR_VERSION 2)
set(LIBYANG_MINOR_VERSION 0)
-set(LIBYANG_MICRO_VERSION 190)
+set(LIBYANG_MICRO_VERSION 191)
set(LIBYANG_VERSION ${LIBYANG_MAJOR_VERSION}.${LIBYANG_MINOR_VERSION}.${LIBYANG_MICRO_VERSION})
# set version of the library
set(LIBYANG_MAJOR_SOVERSION 2)
|
gpperfmon: remove unused variable to quiet warnings | @@ -1509,7 +1509,7 @@ apr_status_t gpdb_check_partitions(mmon_options_t *opt)
{
// health is not a full table and needs to be added to the list
- apr_status_t r1, r2, r3, r4;
+ apr_status_t r1, r3, r4;
// open a connection
PGconn* conn = NULL;
|
chip/mt_scp: enable mt8195 cache on shared DRAM
BRANCH=none
TEST=make BOARD=cherry_scp | @@ -23,7 +23,11 @@ struct mpu_entry mpu_entries[NR_MPU_ENTRIES] = {
#endif
/* For SCP sys */
{0x70000000, 0x80000000, MPU_ATTR_W | MPU_ATTR_R},
+#ifdef CHIP_VARIANT_MT8195
+ {0x10000000, 0x11400000, MPU_ATTR_C | MPU_ATTR_W | MPU_ATTR_R},
+#else
{0x10000000, 0x11400000, MPU_ATTR_W | MPU_ATTR_R},
+#endif
};
#include "gpio_list.h"
|
corrected travis file | @@ -36,7 +36,7 @@ script:
- make coverage
after_success:
- # - if [ "$TRAVIS_BRANCH" = "master" ]; then source .ci/build-docs.sh; fi
+ - if [ "$TRAVIS_BRANCH" = "master" ]; then source .ci/build-docs.sh; fi
- if [ "$TRAVIS_BRANCH" = "master" ]; then bash <(curl -s https://codecov.io/bash); fi
- - source .ci/build-docs.sh
+ # source .ci/build-docs.sh
# bash <(curl -s https://codecov.io/bash);
|
Docs: Clarify Vault config setting documentation | @@ -4066,10 +4066,11 @@ rm vault.pub
can be found in the \href{https://habr.com/post/273497/}{Taming UEFI SecureBoot}
paper (in Russian).
- \emph{Note 2}: \texttt{vault.plist} and \texttt{vault.sig} are used regardless of
- this option when \texttt{vault.plist} is present or a public key is embedded into
- \texttt{OpenCore.efi}. Setting this option will only ensure configuration sanity,
- and abort the boot process otherwise.
+ \emph{Note 2}: Regardless of this option, \texttt{vault.plist} is always used when
+ present, and both \texttt{vault.plist} and \texttt{vault.sig} are used and required
+ when a public key is embedded into \texttt{OpenCore.efi}, and errors will abort the
+ boot process in either case. Setting this option allows OpenCore to warn the user if
+ the configuration is not as required to achieve an expected higher security level.
\item
\texttt{ScanPolicy}\\
|
Add MIDI CC to opers guide message | @@ -2160,7 +2160,7 @@ void push_opers_guide_msg(void) {
{'#', "comment", "Halts line."},
// {'*', "self", "Sends ORCA command."},
{':', "midi", "Sends MIDI note."},
- // {'!', "cc", "Sends MIDI control change."},
+ {'!', "cc", "Sends MIDI control change."},
// {'?', "pb", "Sends MIDI pitch bend."},
// {'%', "mono", "Sends MIDI monophonic note."},
{'=', "osc", "Sends OSC message."},
|
doc: improved next_release documentation for the path plugin | @@ -105,7 +105,15 @@ The following section lists news about the [modules](https://www.libelektra.org/
### path
-Enhanced the plugin to also check for concrete file or directory permissions such as `rwx`. *(Michael Zronek)*
+Enhanced the plugin to also check for concrete file or directory permissions such as `rwx`.
+It is now possible to check for a user if he has all necessary rights for a certain
+file or directory. Simply add `check/permission/user <user>` and `check/permission/mode <modes>` as metadata
+and be assured that you can safely set a path value to the key. A more detailed explanation can be found
+[here](/src/plugins/path/README.md)
+
+
+
+*(Michael Zronek)*
### YAy PEG
|
Fix the name of basic-build-test.sh within the file | #!/bin/sh
-# basic-build-tests.sh
+# basic-build-test.sh
#
# Copyright The Mbed TLS Contributors
# SPDX-License-Identifier: Apache-2.0
#
# This script has been written to be generic and should work on any shell.
#
-# Usage: basic-build-tests.sh
+# Usage: basic-build-test.sh
#
# Abort on errors (and uninitiliased variables)
|
Fix speed gauge | @@ -140,7 +140,7 @@ while True:
elif mode == SPEED:
speed += count
speed = min(100, max(0, speed))
- speed_gauge(brightness, 100)
+ speed_gauge(speed, 100)
sw_pressed = user_sw.read()
a_pressed = button_a.read()
|
libflash/mbox-flash: only wait for MBOX_DEFAULT_POLL_MS if busy
This makes the mbox unit test run 300x quicker and seems to
shave about 6 seconds from boot time on Witherspoon. | @@ -348,8 +348,9 @@ static int wait_for_bmc(struct mbox_flash_data *mbox_flash, unsigned int timeout
* Both functions are important.
* Well time_wait_ms() relaxes the spin... so... its nice
*/
- time_wait_ms(MBOX_DEFAULT_POLL_MS);
check_timers(false);
+ if (mbox_flash->busy)
+ time_wait_ms(MBOX_DEFAULT_POLL_MS);
asm volatile ("" ::: "memory");
}
|
porting/linux: Fix ble_npl_time_delay implementation
Previous implementation was inaccurate due to use
of sleep() function which uses seconds as a time parameter. | @@ -68,5 +68,13 @@ uint32_t ble_npl_time_ticks_to_ms32(ble_npl_time_t ticks)
void
ble_npl_time_delay(ble_npl_time_t ticks)
{
- sleep(ble_npl_time_ticks_to_ms32(ticks)/1000);
+ struct timespec sleep_time;
+ long ms = ble_npl_time_ticks_to_ms32(ticks);
+ uint32_t s = ms / 1000;
+
+ ms -= s * 1000;
+ sleep_time.tv_sec = s;
+ sleep_time.tv_nsec = ms * 1000000;
+
+ nanosleep(&sleep_time, NULL);
}
|
Add CPUIDs for Alder Lake and other recent Intel cpus | @@ -624,7 +624,7 @@ static gotoblas_t *get_coretype(void){
return &gotoblas_NEHALEM;
}
}
- if (model == 10) {
+ if (model == 10 || model == 12){
// Ice Lake SP
if(support_avx512_bf16())
return &gotoblas_COOPERLAKE;
@@ -644,7 +644,7 @@ static gotoblas_t *get_coretype(void){
case 7:
if (model == 10) // Goldmont Plus
return &gotoblas_NEHALEM;
- if (model == 14) {
+ if (model == 13 || model == 14) {
// Ice Lake
if (support_avx512())
return &gotoblas_SKYLAKEX;
@@ -661,7 +661,6 @@ static gotoblas_t *get_coretype(void){
}
}
return NULL;
- case 9:
case 8:
if (model == 12 || model == 13) { // Tiger Lake
if (support_avx512())
@@ -689,6 +688,50 @@ static gotoblas_t *get_coretype(void){
return &gotoblas_NEHALEM; //OS doesn't support AVX. Use old kernels.
}
}
+ if (model == 15){ // Sapphire Rapids
+ if(support_avx512_bf16())
+ return &gotoblas_COOPERLAKE;
+ if (support_avx512())
+ return &gotoblas_SKYLAKEX;
+ if(support_avx2())
+ return &gotoblas_HASWELL;
+ if(support_avx()) {
+ openblas_warning(FALLBACK_VERBOSE, SANDYBRIDGE_FALLBACK);
+ return &gotoblas_SANDYBRIDGE;
+ } else {
+ openblas_warning(FALLBACK_VERBOSE, NEHALEM_FALLBACK);
+ return &gotoblas_NEHALEM;
+ }
+ }
+ return NULL;
+
+
+ case 9:
+ if (model == 7 || model == 10) { // Alder Lake
+ if(support_avx2()){
+ openblas_warning(FALLBACK_VERBOSE, HASWELL_FALLBACK);
+ return &gotoblas_HASWELL;
+ }
+ if(support_avx()) {
+ openblas_warning(FALLBACK_VERBOSE, SANDYBRIDGE_FALLBACK);
+ return &gotoblas_SANDYBRIDGE;
+ } else {
+ openblas_warning(FALLBACK_VERBOSE, NEHALEM_FALLBACK);
+ return &gotoblas_NEHALEM;
+ }
+ }
+ if (model == 14 ) { // Kaby Lake, Coffee Lake
+ if(support_avx2())
+ return &gotoblas_HASWELL;
+ if(support_avx()) {
+ openblas_warning(FALLBACK_VERBOSE, SANDYBRIDGE_FALLBACK);
+ return &gotoblas_SANDYBRIDGE;
+ } else {
+ openblas_warning(FALLBACK_VERBOSE, NEHALEM_FALLBACK);
+ return &gotoblas_NEHALEM; //OS doesn't support AVX. Use old kernels.
+ }
+ }
+ return NULL;
case 10:
if (model == 5 || model == 6) {
if(support_avx2())
|
board/poppy/base_detect_poppy.c: Format with clang-format
BRANCH=none
TEST=none | @@ -101,7 +101,6 @@ static void base_detect_change(enum base_status status)
acpi_dptf_set_profile_num(DPTF_PROFILE_BASE_ATTACHED);
else
acpi_dptf_set_profile_num(DPTF_PROFILE_BASE_DETACHED);
-
}
/* Measure detection pin pulse duration (used to wake AP from deep S3). */
@@ -110,8 +109,8 @@ static uint32_t pulse_width;
static void print_base_detect_value(int v, int tmp_pulse_width)
{
- CPRINTS("%s = %d (pulse %d)", adc_channels[ADC_BASE_DET].name,
- v, tmp_pulse_width);
+ CPRINTS("%s = %d (pulse %d)", adc_channels[ADC_BASE_DET].name, v,
+ tmp_pulse_width);
}
static void base_detect_deferred(void)
|
conn_get_loss_time_and_pktns: Do not consider num_pto_eliciting | @@ -12603,8 +12603,7 @@ static void conn_get_loss_time_and_pktns(ngtcp2_conn *conn,
size_t i;
for (i = 0; i < sizeof(ns) / sizeof(ns[0]); ++i) {
- if (ns[i] == NULL || ns[i]->rtb.num_pto_eliciting == 0 ||
- loss_time[i] >= earliest_loss_time) {
+ if (ns[i] == NULL || loss_time[i] >= earliest_loss_time) {
continue;
}
|
Remove session checks from SSL_clear()
We now allow a different protocol version when reusing a session so we can
unconditionally reset the SSL_METHOD if it has changed. | @@ -566,12 +566,9 @@ int SSL_clear(SSL *s)
/*
* Check to see if we were changed into a different method, if so, revert
- * back. We always do this in TLSv1.3. Below that we only do it if we are
- * not doing session-id reuse.
+ * back.
*/
- if (s->method != s->ctx->method
- && (SSL_IS_TLS13(s)
- || (!ossl_statem_get_in_handshake(s) && s->session == NULL))) {
+ if (s->method != s->ctx->method) {
s->method->ssl_free(s);
s->method = s->ctx->method;
if (!s->method->ssl_new(s))
|
BugID:18712794:xr871 codesize overlap bugfix | @@ -17,6 +17,8 @@ GLOBAL_DEFINES += CONFIG_AOS_FATFS_SUPPORT_MMC
GLOBAL_DEFINES += CONFIG_AOS_FATFS_SUPPORT
GLOBAL_DEFINES += RHINO_CONFIG_TICKS_PER_SECOND=1000
+GLOBAL_DEFINES += DEBUG_CONFIG_ERRDUMP=0
+
$(NAME)_SOURCES += config/k_config.c \
config/partition_conf.c \
drivers/oled.c \
|
software keyboard fix | @@ -757,7 +757,11 @@ static bool isKbdVisible()
SDL_Rect rect;
calcTextureRect(&rect);
- return h - rect.h - KBD_ROWS * w / KBD_COLS >= 0 && !SDL_IsTextInputActive();
+ return h - rect.h - KBD_ROWS * w / KBD_COLS >= 0
+#if defined(__TIC_ANDROID__)
+ && !SDL_IsTextInputActive()
+#endif
+ ;
}
static const tic_key KbdLayout[] =
|
fix din port in shift_register.v | @@ -8,7 +8,7 @@ module shift_register #
(
input wire aclk,
- inout wire [DATA_WIDTH-1:0] din,
+ input wire [DATA_WIDTH-1:0] din,
output wire [DATA_WIDTH-1:0] dout
);
|
Update ethereum_pool.json
Minor example config typo for ethereum_pool.json | "perPoolLogFile": false
},
"banning": {
- "manager": "integrated",
+ "manager": "Integrated",
"banOnJunkReceive": false,
"banOnInvalidShares": false
},
|
in_systemd: do extra validation on sql query result | @@ -115,6 +115,9 @@ char *flb_systemd_db_get_cursor(struct flb_systemd_config *ctx)
memset(&qs, '\0', sizeof(qs));
ret = flb_sqldb_query(ctx->db,
SQL_GET_CURSOR, cb_cursor_check, &qs);
+ if (ret != FLB_OK) {
+ return NULL;
+ }
if (qs.rows > 0) {
/* cursor must be freed by the caller */
|
le_tc/sched: Modify wrong param for pid in waitpid
Line 399 in tc_sched.c is for checking wrong pid, so change to -1 which is not valid for pid | @@ -396,8 +396,7 @@ static void tc_sched_waitpid(void)
int status;
/* Check for The TCB corresponding to this PID is not our child. */
-
- ret_chk = waitpid(0, &status, 0);
+ ret_chk = waitpid(-1, &status, 0);
TC_ASSERT_EQ("waitpid", ret_chk, ERROR);
TC_ASSERT_EQ("waitpid", errno, ECHILD);
|
build: Raise timeout
gen-html for coverage generation needs more than 2 minutes to finish
running and does not generate any logging output. | @@ -445,7 +445,7 @@ def dockerize(test_name, image, cl) {
return [(test_name): {
stage(test_name) {
node(docker_node_label) {
- timeout(activity: true, time: 2, unit: 'MINUTES') {
+ timeout(activity: true, time: 5, unit: 'MINUTES') {
def cpu_count = cpuCount()
withEnv(["MAKEFLAGS='-j${cpu_count+2} -l${cpu_count*2}'",
"CTEST_PARALLEL_LEVEL='${cpu_count+2}'"]) {
|
Release: Fix old news entry | @@ -139,8 +139,6 @@ We updated the behavior, since otherwise the plugin will report memory leaks at
### Yan LR
-A new plugin parsing YAML files using Yan LR.
-
- The plugin does not modify the (original) parent key. As a consequence, setting values at the root of a mountpoint:
```sh
|
Fix location of test log. | @@ -64,4 +64,4 @@ jobs:
- name: msbuild
run: cd vcnet; msbuild pappl.sln
- name: test
- run: cd vcnet; ./copy-dlls.bat x64\Debug; cd x64\Debug; ./testpappl -c -l testpappl.log -L debug -o testpappl.output -t all || type ..\..\testsuite\testpappl.log
+ run: cd vcnet; ./copy-dlls.bat x64\Debug; cd x64\Debug; ./testpappl -c -l testpappl.log -L debug -o testpappl.output -t all || type ..\..\..\testsuite\testpappl.log
|
src/CMakeLists: extend list of removed symbols for device tests
Based on device tests compilation error.
We still don't understand really what this is, but it only affects
device tests. | @@ -540,7 +540,7 @@ foreach(type ${RUST_LIBS})
# Linking C executable ../../bin/fw_test_usb_cmd_process.elf
# /usr/local/bin/../lib/gcc/arm-none-eabi/8.2.1/../../../../arm-none-eabi/bin/ld: /usr/local/bin/../lib/gcc/arm-none-eabi/8.2.1/thumb/v7e-m+fp/softfp/libgcc.a(_arm_addsubdf3.o): in function `__aeabi_dsub':
# (.text+0x8): multiple definition of `__aeabi_dsub'; ../../lib/libfirmware_rust_c.a(compiler_builtins-5829be534503bd8e.compiler_builtins.cthmhl66-cgu.175.rcgu.o):/cargo/registry/src/github.com-1ecc6299db9ec823/compiler_builtins-0.1.27/src/macros.rs:226: first defined here
- if test "x${RUST_TARGET_ARCH}" = "xthumbv7em-none-eabi" \; then ${CMAKE_OBJCOPY} -W __aeabi_dsub -W __aeabi_dadd -W__aeabi_i2d -W __aeabi_f2d -W __aeabi_dmul ${lib} \; fi
+ if test "x${RUST_TARGET_ARCH}" = "xthumbv7em-none-eabi" \; then ${CMAKE_OBJCOPY} -W __aeabi_dsub -W __aeabi_dadd -W__aeabi_i2d -W __aeabi_f2d -W __aeabi_dmul -W __aeabi_ul2d ${lib} \; fi
COMMAND
${CMAKE_COMMAND} -E copy_if_different ${lib} ${CMAKE_ARCHIVE_OUTPUT_DIRECTORY}/lib${type}_rust_c.a
# DEPFILES are only supported with the Ninja build tool
|
apps/netutils/dhcpd/dhcpd.c: Correct backward conditional logic in dhcpd_leaseexpired(). Noted by surya prakash | @@ -336,7 +336,7 @@ static time_t dhcpd_time(void)
#ifdef HAVE_LEASE_TIME
static inline bool dhcpd_leaseexpired(struct lease_s *lease)
{
- if (lease->expiry < dhcpd_time())
+ if (lease->expiry > dhcpd_time())
{
return false;
}
|
Support mesh / raytracing shaders | --
--
rule("utils.glsl2spv")
- set_extensions(".vert", ".frag", ".tesc", ".tese", ".geom", ".comp", ".glsl")
+ set_extensions(".vert", ".tesc", ".tese", ".geom", ".comp", ".frag", ".comp", ".mesh", ".task", ".rgen", ".rint", ".rahit", ".rchit", ".rmiss", ".rcall", ".glsl")
on_load(function (target)
local is_bin2c = target:extraconf("rules", "utils.glsl2spv", "bin2c")
if is_bin2c then
@@ -57,14 +57,15 @@ rule("utils.glsl2spv")
assert(glslangValidator or glslc, "glslangValidator or glslc not found!")
-- glsl to spv
+ local targetenv = target:extraconf("rules", "utils.glsl2spv", "env") or "vulkan1.0"
local outputdir = target:extraconf("rules", "utils.glsl2spv", "outputdir") or path.join(target:autogendir(), "rules", "utils", "glsl2spv")
local spvfilepath = path.join(outputdir, path.filename(sourcefile_glsl) .. ".spv")
batchcmds:show_progress(opt.progress, "${color.build.object}generating.glsl2spv %s", sourcefile_glsl)
batchcmds:mkdir(outputdir)
if glslangValidator then
- batchcmds:vrunv(glslangValidator.program, {"-V", "-o", spvfilepath, sourcefile_glsl})
+ batchcmds:vrunv(glslangValidator.program, {"--target-env", targetenv, "-o", spvfilepath, sourcefile_glsl})
else
- batchcmds:vrunv(glslc.program, {"-o", spvfilepath, sourcefile_glsl})
+ batchcmds:vrunv(glslc.program, {"--target-env", targetenv, "-o", spvfilepath, sourcefile_glsl})
end
-- do bin2c
|
TestsUser: Allow injecting passed Info.plist | @@ -310,6 +310,7 @@ ApplyKextPatches (
PRELINKED_CONTEXT *Context
)
{
+#if 0
EFI_STATUS Status;
PATCHER_CONTEXT Patcher;
@@ -380,6 +381,7 @@ ApplyKextPatches (
} else {
DEBUG ((DEBUG_WARN, "Failed to find com.apple.driver.AppleHDAController - %r\n", Status));
}
+#endif
}
VOID
@@ -456,11 +458,21 @@ int main(int argc, char** argv) {
UINT8 *TestData = LiluKextData;
UINT32 TestDataSize = LiluKextDataSize;
+ CHAR8 *TestPlist = LiluKextInfoPlistData;
+ UINT32 TestPlistSize = LiluKextInfoPlistDataSize;
if (argc > 2) {
TestData = readFile(argv[2], &TestDataSize);
if (TestData == NULL) {
- printf("Read fail\n");
+ printf("Read data fail\n");
+ return -1;
+ }
+ }
+
+ if (argc > 3) {
+ TestPlist = (CHAR8*) readFile(argv[3], &TestPlistSize);
+ if (TestPlist == NULL) {
+ printf("Read plist fail\n");
return -1;
}
}
@@ -468,14 +480,14 @@ int main(int argc, char** argv) {
Status = PrelinkedInjectKext (
&Context,
"/Library/Extensions/Lilu.kext",
- LiluKextInfoPlistData,
- LiluKextInfoPlistDataSize,
+ TestPlist,
+ TestPlistSize,
"Contents/MacOS/Lilu",
TestData,
TestDataSize
);
- DEBUG ((DEBUG_WARN, "Lilu.kext injected - %r\n", Status));
+ DEBUG ((DEBUG_WARN, "%s injected - %r\n", argc > 2 ? "Passed.kext" : "Lilu.kext", Status));
Status = PrelinkedInjectKext (
&Context,
|
Fix unsiggned typo introduced in commit
Fix unsiggned typo introduced in tp_frontend_action.cc | @@ -114,7 +114,7 @@ static inline field_kind_t _get_field_kind(string const& line,
if (field_type == "char" || field_type == "short" ||
field_type == "int8_t" || field_type == "int16_t")
field_type = "s32";
- if (field_type == "unsigned char" || field_type == "unsiggned short" ||
+ if (field_type == "unsigned char" || field_type == "unsigned short" ||
field_type == "uint8_t" || field_type == "uint16_t")
field_type = "u32";
} else if (size == 8) {
@@ -122,7 +122,7 @@ static inline field_kind_t _get_field_kind(string const& line,
field_type == "int8_t" || field_type == "int16_t" ||
field_type == "int32_t")
field_type = "s64";
- if (field_type == "unsigned char" || field_type == "unsiggned short" ||
+ if (field_type == "unsigned char" || field_type == "unsigned short" ||
field_type == "unsigned int" || field_type == "uint8_t" ||
field_type == "uint16_t" || field_type == "uint32_t")
field_type = "u64";
|
api: avoid sigpipe for unruly api client
if the api client didn't wait for the last message, we'd get a SIGPIPE
from Unix and VPP would crash.
Type: fix | @@ -220,6 +220,12 @@ static void
socket_cleanup_pending_remove_registration_cb (u32 *preg_index)
{
vl_api_registration_t *rp = vl_socket_get_registration (*preg_index);
+ if (!rp)
+ {
+ /* Might already have gone */
+ return;
+ }
+
clib_file_main_t *fm = &file_main;
u32 pending_remove_file_index = vl_api_registration_file_index (rp);
@@ -402,7 +408,7 @@ vl_socket_write_ready (clib_file_t * uf)
while (remaining_bytes > 0)
{
bytes_to_send = remaining_bytes > 4096 ? 4096 : remaining_bytes;
- n = write (uf->file_descriptor, p, bytes_to_send);
+ n = send (uf->file_descriptor, p, bytes_to_send, MSG_NOSIGNAL);
if (n < 0)
{
if (errno == EAGAIN)
|
Restore J2M cursor speed up method to hold R button, and Add speed up ratio setting 2 | @@ -142,7 +142,7 @@ Switch Joy2Mouse mode in config.
D-UP/DOWN/LEFT/RIGHT: mouse move
B button: left click
A button: right click
-R button: toggle mouse speed
+R button: mouse speed up durling hold
Keyboard is able to control with joypad when Joy2Key mode.
Switch Joy2Key mode in config.
|
Add comments to u32_from_BE in header file | @@ -31,7 +31,8 @@ int local_strchr(char* string, char ch);
// `itoa` for uint32_t.
void u32_to_str(char* dest, uint8_t dest_size, uint32_t in);
-// Converts a list of bytes (in BE) of length `size` to a uint32_t.
+// Converts a list of bytes (in BE) of length `size` to a uint32_t. `strict` will make the function
+// throw if the size is > 4.
uint32_t u32_from_BE(uint8_t* in, uint8_t size, bool strict);
void amountToString(uint8_t* amount,
|
[firesim] generate rocket-chip based artefacts | @@ -9,7 +9,7 @@ import chisel3.internal.firrtl.{Circuit, Port}
import freechips.rocketchip.diplomacy.{ValName, AutoBundle}
import freechips.rocketchip.devices.debug.DebugIO
-import midas.rocketchip.util.{HasGeneratorUtilities, ParsedInputNames, ElaborationArtefacts}
+import freechips.rocketchip.util.{ElaborationArtefacts}
import freechips.rocketchip.system.DefaultTestSuites._
import freechips.rocketchip.system.{TestGeneration, RegressionTestSuite}
import freechips.rocketchip.config.Parameters
@@ -54,6 +54,7 @@ trait IsFireSimGeneratorLike extends HasFireSimGeneratorUtilities with HasTestSu
// Output miscellaneous files produced as a side-effect of elaboration
def generateArtefacts {
+ // generate RC's artefacts
ElaborationArtefacts.files.foreach { case (extension, contents) =>
writeOutputFile(s"${longName}.${extension}", contents ())
}
|
userland: RPROVIDES is missing libegl
userland package is the Raspberry Pi provider for the openGL stack.
If selected, it shall provide the gles2 and egl stacks in conjunction
with mesa-gl.
libegl was missing in the RPROVIDES variable, thus some run-time
dependencies were not met when using userland as provider. | @@ -10,7 +10,7 @@ PR = "r5"
PROVIDES = "virtual/libgles2 \
virtual/egl"
-RPROVIDES_${PN} += "libgles2 egl"
+RPROVIDES_${PN} += "libgles2 egl libegl"
COMPATIBLE_MACHINE = "^rpi$"
|
Fix CID 168611 | @@ -145,12 +145,24 @@ struct rtcweb_datachannel_ack {
#undef SCTP_PACKED
+static void
+lock_peer_connection(struct peer_connection *);
+
+static void
+unlock_peer_connection(struct peer_connection *);
+
static void
init_peer_connection(struct peer_connection *pc)
{
uint32_t i;
struct channel *channel;
+#ifdef _WIN32
+ InitializeCriticalSection(&(pc->mutex));
+#else
+ pthread_mutex_init(&pc->mutex, NULL);
+#endif
+ lock_peer_connection(pc);
for (i = 0; i < NUMBER_OF_CHANNELS; i++) {
channel = &(pc->channels[i]);
channel->id = i;
@@ -169,11 +181,7 @@ init_peer_connection(struct peer_connection *pc)
}
pc->o_stream_buffer_counter = 0;
pc->sock = NULL;
-#ifdef _WIN32
- InitializeCriticalSection(&(pc->mutex));
-#else
- pthread_mutex_init(&pc->mutex, NULL);
-#endif
+ unlock_peer_connection(pc);
}
static void
|
firpfbch/example: using root-Nyquist filter for flat noise response | @@ -10,7 +10,6 @@ int main() {
// options
unsigned int M = 5; // number of channels
unsigned int m = 12; // filter delay
- float As = 60; // stop-band attenuation
unsigned int num_samples= 512000; // number of samples to generate
unsigned int nfft = 1200; // FFT size for analysis
@@ -20,7 +19,8 @@ int main() {
float complex buf_1[M]; // channelized output
// create filterbank channelizer object using external filter coefficients
- firpfbch_crcf q = firpfbch_crcf_create_kaiser(LIQUID_ANALYZER, M, m, As);
+ firpfbch_crcf q = firpfbch_crcf_create_rnyquist(LIQUID_ANALYZER, M, m, 0.5f,
+ LIQUID_FIRFILT_ARKAISER);
// create multi-signal source generator
msourcecf gen = msourcecf_create_default();
|
Documentation change only: Doxygen tidy in u_ringbuffer.h. | @@ -218,7 +218,7 @@ size_t uRingBufferDataSize(const uRingBuffer_t *pRingBuffer);
/** Get the free space available in a ring buffer, that is what uRingBufferAdd()
* would be able to store; see also uRingBufferAvailableSizeMax() for
- * what uRingBufferForcedAdd() would be able to store.
+ * what uRingBufferForceAdd() would be able to store.
*
* @param[in] pRingBuffer a pointer to the ring buffer, cannot be NULL.
* @return the number of bytes available for storing.
@@ -254,7 +254,7 @@ void uRingBufferFlushValue(uRingBuffer_t *pRingBuffer, char value,
*/
void uRingBufferReset(uRingBuffer_t *pRingBuffer);
-/** Get the number of bytes lost due to uRingBufferForcedAdd() pushing
+/** Get the number of bytes lost due to uRingBufferForceAdd() pushing
* data out from under uRingBufferRead().
*
* @param[in] pRingBuffer a pointer to the ring buffer, cannot be NULL.
@@ -263,7 +263,7 @@ void uRingBufferReset(uRingBuffer_t *pRingBuffer);
size_t uRingBufferStatReadLoss(uRingBuffer_t *pRingBuffer);
/** Get the number of bytes lost due to uRingBufferAdd() or
- * uRingBufferForcedAdd() being unable to write data into the
+ * uRingBufferForceAdd() being unable to write data into the
* ring buffer.
*
* @param[in] pRingBuffer a pointer to the ring buffer, cannot be NULL.
@@ -276,7 +276,7 @@ size_t uRingBufferStatAddLoss(uRingBuffer_t *pRingBuffer);
* -------------------------------------------------------------- */
/** Create a new ring buffer from a linear buffer that allows
- * multiple read handles. allowing the "handle" API functions
+ * multiple read handles, allowing the "handle" API functions
* here to be used. If you don't need/want this overhead, i.e. you
* only have one consumer of data from the buffer that will call
* uRingBufferRead(), then you should create your ring buffer using
@@ -443,7 +443,7 @@ size_t uRingBufferAvailableSizeMax(const uRingBuffer_t *pRingBuffer);
*/
void uRingBufferFlushHandle(uRingBuffer_t *pRingBuffer, int32_t handle);
-/** Get the number of bytes lost due to uRingBufferForcedAdd()() pushing
+/** Get the number of bytes lost due to uRingBufferForceAdd() pushing
* data out from under the given uRingBufferReadHandle().
*
* @param[in] pRingBuffer a pointer to the ring buffer, cannot be NULL.
|
sdl/mouse: add SDL_GetGlobalMouseState() | @@ -43,6 +43,16 @@ static int SDL_WarpMouseGlobal(int x, int y)
{
return -1;
}
+
+#if defined(WARN_OUTDATED)
+#pragma message("SDL_GetGlobalMouseState is not supported before SDL 2.0.4")
+#endif
+
+static Uint32 SDL_GetGlobalMouseState(int *x, int *y)
+{
+ return 0;
+}
+
#endif
*/
import "C"
@@ -100,6 +110,14 @@ func GetMouseFocus() *Window {
return (*Window)(unsafe.Pointer(C.SDL_GetMouseFocus()))
}
+// GetGlobalMouseState returns the current state of the mouse.
+// (https://wiki.libsdl.org/SDL_GetGlobalMouseState)
+func GetGlobalMouseState() (x, y int32, state uint32) {
+ var _x, _y C.int
+ _state := uint32(C.SDL_GetGlobalMouseState(&_x, &_y))
+ return int32(_x), int32(_y), _state
+}
+
// GetMouseState returns the current state of the mouse.
// (https://wiki.libsdl.org/SDL_GetMouseState)
func GetMouseState() (x, y int32, state uint32) {
|
filter_modify: check if key exists for not conditions | @@ -681,6 +681,9 @@ bool evaluate_condition_KEY_VALUE_DOES_NOT_EQUAL(struct filter_modify_ctx *ctx,
modify_condition
*condition)
{
+ if (!evaluate_condition_KEY_EXISTS(map, condition)) {
+ return false;
+ }
return !evaluate_condition_KEY_VALUE_EQUALS(ctx, map, condition);
}
@@ -715,6 +718,9 @@ bool evaluate_condition_KEY_VALUE_DOES_NOT_MATCH(struct filter_modify_ctx *ctx,
modify_condition
*condition)
{
+ if (!evaluate_condition_KEY_EXISTS(map, condition)) {
+ return false;
+ }
return !evaluate_condition_KEY_VALUE_MATCHES(ctx, map, condition);
}
|
open: fix inadverent breakage of opening directories | @@ -472,6 +472,11 @@ static boolean file_check(file f, u32 eventmask, u32 * last, event_handler eh)
return true;
}
+static boolean is_dir(tuple n)
+{
+ return children(n) ? true : false;
+}
+
sysreturn open_internal(tuple root, char *name, int flags, int mode)
{
tuple n;
@@ -483,7 +488,7 @@ sysreturn open_internal(tuple root, char *name, int flags, int mode)
return set_syscall_error(current, ENOENT);
}
fsfile fsf = fsfile_from_node(current->p->fs, n);
- if (!fsf) {
+ if (!fsf && !is_dir(n)) {
msg_err("can't find fsfile\n");
return set_syscall_error(current, ENOENT);
}
@@ -502,7 +507,7 @@ sysreturn open_internal(tuple root, char *name, int flags, int mode)
f->read = closure(h, file_read, f);
f->close = closure(h, file_close, f);
f->check = closure(h, file_check, f);
- f->length = fsfile_get_length(fsf);
+ f->length = is_dir(n) ? 0 : fsfile_get_length(fsf);
f->offset = 0;
thread_log(current, " fd %d, file length %d\n", fd, f->length);
return fd;
|
vxlan:decap caching error | @@ -91,7 +91,7 @@ vxlan4_find_tunnel (vxlan_main_t * vxm, last_tunnel_cache4 * cache,
};
if (PREDICT_TRUE
- (key4.key[0] == cache->key[0] || key4.key[1] == cache->key[1]))
+ (key4.key[0] == cache->key[0] && key4.key[1] == cache->key[1]))
{
/* cache hit */
vxlan_decap_info_t di = {.as_u64 = cache->value };
|
fs/procfs: Add missing conditional check
Adds missed conditional check and config dependency | @@ -477,8 +477,10 @@ static ssize_t proc_cmdline(FAR struct proc_file_s *procfile, FAR struct tcb_s *
buffer += copysize;
remaining -= copysize;
+ if (totalsize >= buflen) {
return totalsize;
}
+ }
#endif
/* Show the task argument list (skipping over the name) */
@@ -576,10 +578,11 @@ static ssize_t proc_stack(FAR struct proc_file_s *procfile, FAR struct tcb_s *tc
copysize = procfs_memcpy(procfile->line, linesize, buffer, remaining, &offset);
totalsize += copysize;
+
+#ifdef CONFIG_STACK_COLORATION
buffer += copysize;
remaining -= copysize;
-#ifdef CONFIG_DEBUG_COLORATION
if (totalsize >= buflen) {
return totalsize;
}
|
Replaced variable-time GCD with consttime inversion to avoid side-channel attacks on RSA key generation | @@ -71,6 +71,7 @@ static int rsa_builtin_keygen(RSA *rsa, int bits, int primes, BIGNUM *e_value,
STACK_OF(RSA_PRIME_INFO) *prime_infos = NULL;
BN_CTX *ctx = NULL;
BN_ULONG bitst = 0;
+ unsigned long error = 0;
if (bits < RSA_MIN_MODULUS_BITS) {
ok = 0; /* we set our own err */
@@ -186,10 +187,20 @@ static int rsa_builtin_keygen(RSA *rsa, int bits, int primes, BIGNUM *e_value,
}
if (!BN_sub(r2, prime, BN_value_one()))
goto err;
- if (!BN_gcd(r1, r2, rsa->e, ctx))
- goto err;
- if (BN_is_one(r1))
+ ERR_set_mark();
+ BN_set_flags(r2, BN_FLG_CONSTTIME);
+ if (BN_mod_inverse(r1, r2, rsa->e, ctx) != NULL) {
+ /* GCD == 1 since inverse exists */
break;
+ }
+ error = ERR_peek_last_error();
+ if (ERR_GET_LIB(error) == ERR_LIB_BN
+ && ERR_GET_REASON(error) == BN_R_NO_INVERSE) {
+ /* GCD != 1 */
+ ERR_pop_to_mark();
+ } else {
+ goto err;
+ }
if (!BN_GENCB_call(cb, 2, n++))
goto err;
}
|
UT for Markbits bits allocation. | @@ -70,6 +70,7 @@ func (mc *MarkBitsManager) AvailableMarkBitCount() int {
// Allocate a block of bits given a requested size.
// Return allocated mark and how many bits allocated.
+// It is up to the caller to check the result.
func (mc *MarkBitsManager) NextBlockBitsMark(size int) (uint32, int) {
mark := uint32(0)
numBitsFound := 0
@@ -121,7 +122,10 @@ func (mc *MarkBitsManager) nthMark(n int) (uint32, error) {
// Return how many free position number left.
func (mc *MarkBitsManager) CurrentFreeNumberOfMark() int {
- return int(uint32(1) << uint32(mc.numFreeBits))
+ if mc.numFreeBits > 0 {
+ return int(uint64(1) << uint64(mc.numFreeBits))
+ }
+ return 0
}
// Return a mark given a position number.
|
[sbp] add Trie Root information to logger | @@ -11,6 +11,7 @@ import (
"github.com/aergoio/aergo/consensus"
"github.com/aergoio/aergo/consensus/chain"
"github.com/aergoio/aergo/contract"
+ "github.com/aergoio/aergo/internal/enc"
"github.com/aergoio/aergo/pkg/component"
"github.com/aergoio/aergo/state"
"github.com/aergoio/aergo/types"
@@ -179,6 +180,7 @@ func (s *SimpleBlockFactory) Start() {
continue
}
logger.Info().Uint64("no", block.GetHeader().GetBlockNo()).Str("hash", block.ID()).
+ Str("TrieRoot", enc.ToString(block.GetHeader().GetBlocksRootHash())).
Err(err).Msg("block produced")
chain.ConnectBlock(s, block, blockState)
|
Fixed minor crash in calibrate app | @@ -413,7 +413,6 @@ void * SurviveThread(void *jnk)
//Do stuff.
}
- survive_close( ctx );
return 0;
}
@@ -436,6 +435,9 @@ int main( int argc, char ** argv )
// Run the GUI in the main thread
GuiThread(0);
+
+ survive_close(ctx);
+
printf( "Returned\n" );
return 0;
}
|
docs/pyboard: Emphasize the instructions for making a USB mouse.
It wasn't clear why that element was `10` instead of `0`. Also bumped the
`10` to `100` to make the mouse movement more obvious. | @@ -39,14 +39,15 @@ Sending mouse events by hand
To get the py-mouse to do anything we need to send mouse events to the PC.
We will first do this manually using the REPL prompt. Connect to your
-pyboard using your serial program and type the following::
+pyboard using your serial program and type the following (no need to type
+the ``#`` and text following it)::
>>> hid = pyb.USB_HID()
- >>> hid.send((0, 10, 0, 0))
+ >>> hid.send((0, 100, 0, 0)) # (button status, x-direction, y-direction, scroll)
-Your mouse should move 10 pixels to the right! In the command above you
-are sending 4 pieces of information: button status, x, y and scroll. The
-number 10 is telling the PC that the mouse moved 10 pixels in the x direction.
+Your mouse should move 100 pixels to the right! In the command above you
+are sending 4 pieces of information: **button status**, **x-direction**, **y-direction**, and **scroll**. The
+number 100 is telling the PC that the mouse moved 100 pixels in the x direction.
Let's make the mouse oscillate left and right::
|
Standard shader: Tonemap by default; | @@ -212,7 +212,7 @@ const char* lovrStandardFragmentShader = ""
"#endif \n"
// Tonemap
-"#ifdef FLAG_tonemap \n"
+"#ifndef FLAG_skipTonemap \n"
" result = tonemap_ACES(result * lovrExposure); \n"
"#endif \n"
|
[CUDA] Implement device to device copy | @@ -78,7 +78,7 @@ pocl_cuda_init_device_ops(struct pocl_device_ops *ops)
//ops->read_rect = pocl_basic_read_rect;
ops->write = pocl_cuda_write;
//ops->write_rect = pocl_basic_write_rect;
- //ops->copy = pocl_cuda_copy;
+ ops->copy = pocl_cuda_copy;
//ops->copy_rect = pocl_basic_copy_rect;
//ops->get_timer_value = pocl_cuda_get_timer_value;
}
@@ -270,6 +270,18 @@ pocl_cuda_write(void *data, const void *host_ptr, void *device_ptr,
cuMemcpyHtoD((CUdeviceptr)(device_ptr+offset), host_ptr, cb);
}
+void
+pocl_cuda_copy(void *data, const void *src_ptr, size_t src_offset,
+ void *__restrict__ dst_ptr, size_t dst_offset, size_t cb)
+{
+ if (src_ptr == dst_ptr)
+ return;
+
+ cuMemcpyDtoD((CUdeviceptr)(dst_ptr+dst_offset),
+ (CUdeviceptr)(src_ptr+src_offset),
+ cb);
+}
+
void
pocl_cuda_compile_submitted_kernels(_cl_command_node *cmd)
{
|
nimble/ll: Remove unused adv_sm member
This is leftover after some code was removed in | @@ -110,7 +110,6 @@ struct ble_ll_adv_sm
uint32_t adv_event_start_time;
uint32_t adv_pdu_start_time;
uint32_t adv_end_time;
- uint32_t adv_rpa_timer;
uint8_t adva[BLE_DEV_ADDR_LEN];
uint8_t adv_rpa[BLE_DEV_ADDR_LEN];
uint8_t peer_addr[BLE_DEV_ADDR_LEN];
|
Initialise status_message to prevent weird artifacts from appearing | @@ -146,6 +146,7 @@ ccl_cosmology * ccl_cosmology_create(ccl_parameters params, ccl_configuration co
cosmo->computed_sigma = false;
cosmo->computed_hmfparams = false;
cosmo->status = 0;
+ strcpy(cosmo->status_message, "");
return cosmo;
}
|
thread-safe to write oecert_enc_pubkey.h | # Copyright (c) Open Enclave SDK contributors.
# Licensed under the MIT License.
+lock="/var/tmp/oecert_lock"
destfile="$1"
pubkey_file="$2"
+# Check if the lock exists
+if [ -f "$lock" ]; then
+ echo "oecert_enc_pubkey.h is being written"
+ exit 1
+fi
+
+# Create the lock
+touch "$lock"
cat > "$destfile" << EOF
// Copyright (c) Open Enclave SDK contributors.
// Licensed under the MIT License.
@@ -29,3 +38,6 @@ cat >> "$destfile" << EOF
#endif /* OECERT_ENC_PUBLIC_KEY */
EOF
+
+# Remove the lock
+rm "$lock"
|
Remove the FIELD_OFFSET macro and use the offsetof() operator instead.
The FIELD_OFFSET was dereferencing a null pointer in order to compute the offset of a field within the structure, but dereferencing a null pointer is considered undefined behavior in C and triggers the undefined behavior sanitizer (UBSAN). | @@ -67,9 +67,6 @@ typedef int32_t LONG;
typedef uint32_t ULONG;
typedef uint64_t ULONGLONG;
-
-#define FIELD_OFFSET(type, field) ((size_t)&(((type *)0)->field))
-
#ifndef _MAC
#define IMAGE_DOS_SIGNATURE 0x5A4D // MZ
@@ -318,7 +315,7 @@ typedef struct _IMAGE_NT_HEADERS64 {
#define IMAGE_FIRST_SECTION( ntheader ) ((PIMAGE_SECTION_HEADER) \
((BYTE*) ntheader + \
- FIELD_OFFSET( IMAGE_NT_HEADERS32, OptionalHeader ) + \
+ offsetof(IMAGE_NT_HEADERS32, OptionalHeader) + \
yr_le16toh(((PIMAGE_NT_HEADERS32)(ntheader))->FileHeader.SizeOfOptionalHeader) \
))
|
dpdk plugin depends on numactl-libs
dpdk_plugin.so depends on libnuma.so.1 | @@ -91,7 +91,7 @@ vppinfra
%package plugins
Summary: Vector Packet Processing--runtime plugins
Group: System Environment/Libraries
-Requires: vpp = %{_version}-%{_release}
+Requires: vpp = %{_version}-%{_release} numactl-libs
%description plugins
This package contains VPP plugins
|
Fix image tile caching when switching to/from Logo scene type | @@ -44,16 +44,19 @@ const compileImages = async (
const imageModifiedTime = await getFileModifiedTime(filename);
+ const is360 = generate360Ids.includes(img.id);
+ const cacheKey = `${img.id}${is360 ? "_360" : ""}`;
+
if (
- imageBuildCache[img.id] &&
- imageBuildCache[img.id].timestamp >= imageModifiedTime
+ imageBuildCache[cacheKey] &&
+ imageBuildCache[cacheKey].timestamp >= imageModifiedTime
) {
- tilesetLookup = imageBuildCache[img.id].data;
- imgTiles.push(imageBuildCache[img.id].tileData);
+ tilesetLookup = imageBuildCache[cacheKey].data;
+ imgTiles.push(imageBuildCache[cacheKey].tileData);
} else {
const tileData = await readFileToTilesDataArray(filename);
tilesetLookup = toTileLookup(tileData);
- imageBuildCache[img.id] = {
+ imageBuildCache[cacheKey] = {
data: tilesetLookup,
tileData,
timestamp: imageModifiedTime,
@@ -67,7 +70,7 @@ const compileImages = async (
const backgroundInfo = await getBackgroundInfo(
img,
- generate360Ids.includes(img.id),
+ is360,
projectPath,
tilesetLength
);
@@ -78,7 +81,7 @@ const compileImages = async (
});
}
- if (generate360Ids.includes(img.id)) {
+ if (is360) {
// Skip lookups for 360 images (generated later)
tilesetLookups.push(null);
continue;
|
OpenCoreNvram: Initialize version array with constant expressions
Closes | @@ -39,25 +39,13 @@ OC_GLOBAL_STATIC_ASSERT (
);
STATIC CHAR8 mOpenCoreVersion[] = {
- /* [0] = */ OPEN_CORE_TARGET[0],
- /* [1] = */ OPEN_CORE_TARGET[1],
- /* [2] = */ OPEN_CORE_TARGET[2],
- /* [3] = */ '-',
- /* [4] = */ OPEN_CORE_VERSION[0],
- /* [5] = */ OPEN_CORE_VERSION[2],
- /* [6] = */ OPEN_CORE_VERSION[4],
- /* [7] = */ '-',
- /* [8] = */ __DATE__[7],
- /* [9] = */ __DATE__[8],
- /* [10] = */ __DATE__[9],
- /* [11] = */ __DATE__[10],
- /* [12] = */ '-',
- /* [13] = */ 'M',
- /* [14] = */ 'M',
- /* [15] = */ '-',
- /* [16] = */ 'D',
- /* [17] = */ 'D',
- /* [18] = */ '\0'
+ /* [2]:[0] = */ OPEN_CORE_TARGET
+ /* [3] = */ "-"
+ /* [6]:[4] = */ OPEN_CORE_VERSION
+ /* [7] = */ "-"
+ /* [12]:[8] = */ "YYYY-"
+ /* [15]:[13] = */ "MM-"
+ /* [17]:[16] = */ "DD"
};
STATIC
@@ -68,6 +56,11 @@ OcReportVersion (
{
UINT32 Month;
+ mOpenCoreVersion[8] = __DATE__[7];
+ mOpenCoreVersion[9] = __DATE__[8];
+ mOpenCoreVersion[10] = __DATE__[9];
+ mOpenCoreVersion[11] = __DATE__[10];
+
Month =
(__DATE__[0] == 'J' && __DATE__[1] == 'a' && __DATE__[2] == 'n') ? 1 :
(__DATE__[0] == 'F' && __DATE__[2] == 'e' && __DATE__[2] == 'b') ? 2 :
|
Correct AddonActionMenuReplaceList address | @@ -5217,7 +5217,7 @@ classes:
0x1410CDDF0: _SetAddonScale
Client::UI::AddonActionMenuReplaceList:
vtbls:
- - ea: 0x14105EBB6
+ - ea: 0x1419E1B58
base: Component::GUI::AtkUnitBase
Client::Game::Fate::FateDirector:
vtbls:
|
fix attackbackwards | @@ -2351,7 +2351,7 @@ typedef struct
u64 newkeys;
u64 playkeys;
u64 releasekeys;
- u64 combokey[MAX_SPECIAL_INPUTS];
+ u32 combokey[MAX_SPECIAL_INPUTS];
u32 inputtime[MAX_SPECIAL_INPUTS];
u64 disablekeys;
u64 prevkeys; // used for play/rec mode
|
SOVERSION bump to version 3.5.4 | @@ -67,7 +67,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 3)
set(LIBNETCONF2_MINOR_SOVERSION 5)
-set(LIBNETCONF2_MICRO_SOVERSION 3)
+set(LIBNETCONF2_MICRO_SOVERSION 4)
set(LIBNETCONF2_SOVERSION_FULL ${LIBNETCONF2_MAJOR_SOVERSION}.${LIBNETCONF2_MINOR_SOVERSION}.${LIBNETCONF2_MICRO_SOVERSION})
set(LIBNETCONF2_SOVERSION ${LIBNETCONF2_MAJOR_SOVERSION})
|
Add back the CI badge to our README
To advertise that we are a fancy project that takes our test suite seriously :) | # Pallene
+[](https://github.com/pallene-lang/pallene/actions)
Pallene is a statically typed, ahead-of-time-compiled sister language to
[Lua](https://www.lua.org), with a focus on performance. It is also a
|
Mesh:setVertices accepts VertexData; | @@ -88,19 +88,36 @@ int l_lovrMeshSetVertexAttribute(lua_State* L) {
int l_lovrMeshSetVertices(lua_State* L) {
Mesh* mesh = luax_checktype(L, 1, Mesh);
VertexFormat* format = lovrMeshGetVertexFormat(mesh);
- luaL_checktype(L, 2, LUA_TTABLE);
- int vertexCount = lua_objlen(L, 2);
- int start = luaL_optnumber(L, 3, 1) - 1;
- int maxVertices = lovrMeshGetVertexCount(mesh);
- lovrAssert(start + vertexCount <= maxVertices, "Overflow in Mesh:setVertices: Mesh can only hold %d vertices", maxVertices);
- VertexPointer vertices = lovrMeshMap(mesh, start, vertexCount, false, true);
+ uint32_t capacity = lovrMeshGetVertexCount(mesh);
+
+ VertexData* vertexData = NULL;
+ uint32_t sourceSize;
+ if (lua_istable(L, 2)) {
+ sourceSize = lua_objlen(L, 2);
+ } else {
+ vertexData = luax_checktype(L, 2, VertexData);
+ sourceSize = vertexData->count;
+ bool sameFormat = !memcmp(&vertexData->format, format, sizeof(VertexFormat));
+ lovrAssert(sameFormat, "Mesh and VertexData must have the same format to copy vertices");
+ }
- for (int i = 0; i < vertexCount; i++) {
+ uint32_t start = luaL_optnumber(L, 3, 1) - 1;
+ uint32_t count = luaL_optinteger(L, 4, sourceSize);
+ lovrAssert(start + count <= capacity, "Overflow in Mesh:setVertices: Mesh can only hold %d vertices", capacity);
+ lovrAssert(count <= sourceSize, "Cannot set %d vertices on Mesh: source only has %d vertices", count, sourceSize);
+
+ VertexPointer vertices = lovrMeshMap(mesh, start, count, false, true);
+
+ if (vertexData) {
+ memcpy(vertices.raw, vertexData->blob.data, count * format->stride);
+ } else {
+ for (uint32_t i = 0; i < count; i++) {
lua_rawgeti(L, 2, i + 1);
luaL_checktype(L, -1, LUA_TTABLE);
luax_setvertex(L, -1, &vertices, format);
lua_pop(L, 1);
}
+ }
return 0;
}
|
hv:Fix violation "Cyclomatic complexity greater than 20" in instr_emul.c
Split decode_prefixes() to 2 small APIs
v1-->v2:
split decode_prefixes to 2 APIs
Acked-by: Eddie Dong | @@ -1698,6 +1698,35 @@ static bool segment_override(uint8_t x, enum cpu_reg_name *seg)
return override;
}
+static void decode_op_and_addr_size(struct instr_emul_vie *vie, enum vm_cpu_mode cpu_mode, bool cs_d)
+{
+ /*
+ * Section "Operand-Size And Address-Size Attributes", Intel SDM, Vol 1
+ */
+ if (cpu_mode == CPU_MODE_64BIT) {
+ /*
+ * Default address size is 64-bits and default operand size
+ * is 32-bits.
+ */
+ vie->addrsize = ((vie->addrsize_override != 0U) ? 4U : 8U);
+ if (vie->rex_w != 0U) {
+ vie->opsize = 8U;
+ } else if (vie->opsize_override != 0U) {
+ vie->opsize = 2U;
+ } else {
+ vie->opsize = 4U;
+ }
+ } else if (cs_d) {
+ /* Default address and operand sizes are 32-bits */
+ vie->addrsize = ((vie->addrsize_override != 0U) ? 2U : 4U);
+ vie->opsize = ((vie->opsize_override != 0U) ? 2U : 4U);
+ } else {
+ /* Default address and operand sizes are 16-bits */
+ vie->addrsize = ((vie->addrsize_override != 0U) ? 4U : 2U);
+ vie->opsize = ((vie->opsize_override != 0U) ? 4U : 2U);
+ }
+
+}
static int32_t decode_prefixes(struct instr_emul_vie *vie, enum vm_cpu_mode cpu_mode, bool cs_d)
{
uint8_t x, i;
@@ -1743,32 +1772,7 @@ static int32_t decode_prefixes(struct instr_emul_vie *vie, enum vm_cpu_mode cpu_
vie->rex_b = (x >> 0x0U) & 1U;
vie_advance(vie);
}
-
- /*
- * Section "Operand-Size And Address-Size Attributes", Intel SDM, Vol 1
- */
- if (cpu_mode == CPU_MODE_64BIT) {
- /*
- * Default address size is 64-bits and default operand size
- * is 32-bits.
- */
- vie->addrsize = (vie->addrsize_override != 0U)? 4U : 8U;
- if (vie->rex_w != 0U) {
- vie->opsize = 8U;
- } else if (vie->opsize_override != 0U) {
- vie->opsize = 2U;
- } else {
- vie->opsize = 4U;
- }
- } else if (cs_d) {
- /* Default address and operand sizes are 32-bits */
- vie->addrsize = vie->addrsize_override != 0U ? 2U : 4U;
- vie->opsize = vie->opsize_override != 0U ? 2U : 4U;
- } else {
- /* Default address and operand sizes are 16-bits */
- vie->addrsize = vie->addrsize_override != 0U ? 4U : 2U;
- vie->opsize = vie->opsize_override != 0U ? 4U : 2U;
- }
+ decode_op_and_addr_size(vie, cpu_mode, cs_d);
}
return ret;
|
sa subs/intro update. | @@ -789,20 +789,31 @@ void VideoPlayerShowHook() {
pvVideoWindow->get_Width(&r);
pvVideoWindow->get_Height(&b);
- float w, h;
- if (*CDraw::pfScreenAspectRatio < (float)(r) / b) {
- w = RsGlobal->MaximumWidth;
- h = RsGlobal->MaximumHeight * *CDraw::pfScreenAspectRatio / ((float)(r) / b);
+ float fMiddleScrCoord = (float)RsGlobal->MaximumWidth / 2.0f;
+
+ float w = r;
+ float h = b;
+
+ if (FrontendAspectRatioWidth && FrontendAspectRatioHeight)
+ {
+ w = (float)FrontendAspectRatioWidth;
+ h = (float)FrontendAspectRatioHeight;
}
- else {
- w = RsGlobal->MaximumWidth * ((float)(r) / b) / *CDraw::pfScreenAspectRatio;
- h = RsGlobal->MaximumHeight;
+ else
+ {
+ if (w == h && w > 0 && h > 0)
+ {
+ w = 4.0f;
+ h = 3.0f;
}
+ }
+
+ fFrontendDefaultWidth = ((((float)RsGlobal->MaximumHeight * (w / h))));
- long Left = (RsGlobal->MaximumWidth - w) / 2;
- long Bottom = (RsGlobal->MaximumHeight + h) / 2;
- long Right = (RsGlobal->MaximumWidth + w) / 2;
- long Top = (RsGlobal->MaximumHeight - h) / 2;
+ long Top = 0.0f;
+ long Left = fMiddleScrCoord - ((((float)RsGlobal->MaximumHeight * (w / h))) / 2.0f);
+ long Bottom = (float)RsGlobal->MaximumHeight;
+ long Right = fMiddleScrCoord + ((((float)RsGlobal->MaximumHeight * (w / h))) / 2.0f);
HRESULT wPos = pvVideoWindow->SetWindowPosition(Left, Top, Right - Left, Bottom);
if (wPos >= 0) {
@@ -1386,6 +1397,9 @@ void InstallHUDFixes() {
hbSetCentreSize.fun = injector::MakeCALL(0x58C603, SetCentreSizeHook).get();
injector::MakeCALL(0x58C603, &SetCentreSizeHook);
+ hbSetCentreSize.fun = injector::MakeCALL(0x58C45C, SetCentreSizeHook).get();
+ injector::MakeCALL(0x58C45C, &SetCentreSizeHook);
+
// Second player fix.
injector::WriteMemory<const void*>(0x58F9A0 + 0x2, &fHUDWidth[110], true); // Weapon icon X
injector::WriteMemory<const void*>(0x58F993 + 0x2, &fHUDWidth[16], true); // Weapon icon X
|
integrationtest/TestAuditSeccomp: Validate json output | @@ -27,6 +27,7 @@ import (
"time"
. "github.com/inspektor-gadget/inspektor-gadget/integration"
+ seccompauditTypes "github.com/inspektor-gadget/inspektor-gadget/pkg/gadgets/audit/seccomp/types"
bioprofileTypes "github.com/inspektor-gadget/inspektor-gadget/pkg/gadgets/profile/block-io/types"
cpuprofileTypes "github.com/inspektor-gadget/inspektor-gadget/pkg/gadgets/profile/cpu/types"
processCollectorTypes "github.com/inspektor-gadget/inspektor-gadget/pkg/gadgets/snapshot/process/types"
@@ -305,7 +306,7 @@ spec:
restartPolicy: Never
terminationGracePeriodSeconds: 0
containers:
- - name: test-pod-container
+ - name: test-pod
image: busybox
command: ["sh"]
args: ["-c", "while true; do unshare -i; sleep 1; done"]
@@ -316,8 +317,23 @@ EOF
WaitUntilTestPodReadyCommand(ns),
{
Name: "RunAuditSeccompGadget",
- Cmd: fmt.Sprintf("$KUBECTL_GADGET audit seccomp -n %s --timeout 15", ns),
- ExpectedRegexp: fmt.Sprintf(`%s\s+test-pod\s+test-pod-container\s+\d+\s+unshare\s+unshare\s+kill_thread`, ns),
+ Cmd: fmt.Sprintf("$KUBECTL_GADGET audit seccomp -n %s --timeout 15 -o json", ns),
+ ExpectedOutputFn: func(output string) error {
+ expectedEntry := &seccompauditTypes.Event{
+ Event: BuildBaseEvent(ns),
+ Syscall: "unshare",
+ Code: "kill_thread",
+ Comm: "unshare",
+ }
+
+ normalize := func(e *seccompauditTypes.Event) {
+ e.Node = ""
+ e.Pid = 0
+ e.MountNsID = 0
+ }
+
+ return ExpectEntriesToMatch(output, normalize, expectedEntry)
+ },
},
DeleteTestNamespaceCommand(ns),
}
|
remove double chdir twice in doc | @@ -237,14 +237,6 @@ Changes the current working directory to the given path.
System.chdir("/usr/local/share");
```
-### System.chdir(string)
-
-Changes the current working directory to the given path.
-
-```cs
-System.chdir("/usr/local/share");
-```
-
### System.chmod(string, string)
Set the permissions on a file or directory.
|
Consistent header capitalization. | @@ -24,7 +24,7 @@ Windows, then install the x64-mingw32 gem or build it yourself using
Devkit (http://rubyinstaller.org/add-ons/devkit/) or
msys2 (https://msys2.github.io/).
-== INSTALLATION
+== Installation
The easiest way to install libxml-ruby is via Ruby Gems. To install:
<tt>gem install libxml-ruby</tt>
|
Use new OpenSSL v1.1+ initialization API | @@ -371,6 +371,11 @@ static apr_status_t ssl_init_cleanup(void *data)
#endif
free_dh_params();
+#if OPENSSL_VERSION_NUMBER >= 0x10100000L && !defined(LIBRESSL_VERSION_NUMBER)
+ /* Openssl v1.1+ handles all termination automatically. Do
+ * nothing in this case.
+ */
+#else
/*
* Try to kill the internals of the SSL library.
*/
@@ -393,6 +398,7 @@ static apr_status_t ssl_init_cleanup(void *data)
#if OPENSSL_VERSION_NUMBER < 0x10100000L || defined(LIBRESSL_VERSION_NUMBER)
ERR_remove_thread_state(NULL);
#endif
+#endif
#ifdef HAVE_KEYLOG_CALLBACK
if (key_log_file) {
@@ -783,7 +789,14 @@ TCN_IMPLEMENT_CALL(jint, SSL, initialize)(TCN_STDARGS, jstring engine)
TCN_FREE_CSTRING(engine);
return (jint)APR_SUCCESS;
}
-
+#if OPENSSL_VERSION_NUMBER >= 0x10100000L && !defined(LIBRESSL_VERSION_NUMBER)
+ /* Openssl v1.1+ handles all initialisation automatically, apart
+ * from hints as to how we want to use the library.
+ *
+ * We tell openssl we want to include engine support.
+ */
+ OPENSSL_init_ssl(OPENSSL_INIT_ENGINE_ALL_BUILTIN, NULL);
+#else
/* We must register the library in full, to ensure our configuration
* code can successfully test the SSL environment.
*/
@@ -797,7 +810,6 @@ TCN_IMPLEMENT_CALL(jint, SSL, initialize)(TCN_STDARGS, jstring engine)
#endif
OPENSSL_load_builtin_modules();
-#if OPENSSL_VERSION_NUMBER < 0x10100000L
#if ! (defined(WIN32) || defined(WIN64))
err = apr_threadkey_private_create(&thread_exit_key, _ssl_thread_exit,
tcn_global_pool);
|
enforce -max when generating bedgraph output. | @@ -476,6 +476,10 @@ void BedGenomeCoverage::ReportChromCoverageBedGraph(const vector<DEPTH> &chromCo
// (1) depth>0 (the default running mode),
// (2) depth==0 and the user requested to print zero covered regions (_bedGraphAll)
if ( (lastDepth != -1) && (lastDepth > 0 || _bedGraphAll) ) {
+
+ if (lastDepth >= _max) {
+ lastDepth = _max;
+ }
cout << chrom << "\t" << lastStart << "\t" << pos << "\t" << lastDepth * _scale << endl;
}
//Set current position as the new interval start + depth
|
psa_generate_key(): return PSA_ERROR_INVALID_ARGUMENT for public key | @@ -5703,6 +5703,10 @@ psa_status_t psa_generate_key( const psa_key_attributes_t *attributes,
if( psa_get_key_bits( attributes ) == 0 )
return( PSA_ERROR_INVALID_ARGUMENT );
+ /* Reject any attempt to create a public key. */
+ if( PSA_KEY_TYPE_IS_PUBLIC_KEY(attributes->core.type) )
+ return( PSA_ERROR_INVALID_ARGUMENT );
+
status = psa_start_key_creation( PSA_KEY_CREATION_GENERATE, attributes,
&slot, &driver );
if( status != PSA_SUCCESS )
|
Disabled chunked transfer encoding for 304 responses as well.
According to RFC 7232:
| A 304 response cannot contain a message-body; it is always terminated
| by the first empty line after the header fields. | @@ -969,7 +969,7 @@ nxt_h1p_request_header_send(nxt_task_t *task, nxt_http_request_t *r)
if (r->resp.content_length == NULL || r->resp.content_length->skip) {
if (http11) {
- if (n != NXT_HTTP_NO_CONTENT) {
+ if (n != NXT_HTTP_NOT_MODIFIED && n != NXT_HTTP_NO_CONTENT) {
h1p->chunked = 1;
size += nxt_length(chunked);
/* Trailing CRLF will be added by the first chunk header. */
|
gsettings: do not force sync | @@ -441,14 +441,14 @@ static void elektra_settings_key_changed (GDBusConnection * connection G_GNUC_UN
g_variant_unref (variant);
- g_mutex_lock (&elektra_settings_kdb_lock);
- // TODO: mpranj check if sync needed here
- esb->gks = gelektra_keyset_new (0, GELEKTRA_KEYSET_END);
- if (gelektra_kdb_get (esb->gkdb, esb->gks, esb->gkey) == -1)
- {
- g_log (G_LOG_DOMAIN, G_LOG_LEVEL_DEBUG, "%s\n", "Error on sync!");
- }
- g_mutex_unlock (&elektra_settings_kdb_lock);
+// g_mutex_lock (&elektra_settings_kdb_lock);
+// // TODO: mpranj check if sync needed here
+// esb->gks = gelektra_keyset_new (0, GELEKTRA_KEYSET_END);
+// if (gelektra_kdb_get (esb->gkdb, esb->gks, esb->gkey) == -1)
+// {
+// g_log (G_LOG_DOMAIN, G_LOG_LEVEL_DEBUG, "%s\n", "Error on sync!");
+// }
+// g_mutex_unlock (&elektra_settings_kdb_lock);
}
static void elektra_settings_bus_connected (GObject * source_object G_GNUC_UNUSED, GAsyncResult * res, gpointer user_data)
|
Added additional date minute specificity to the CLI help. | @@ -239,7 +239,7 @@ cmd_help (void)
" --anonymize-ip - Anonymize IP addresses before outputting to report.\n"
" --anonymize-level=<1|2|3> - Anonymization levels: 1 => default, 2 => strong, 3 => pedantic.\n"
" --crawlers-only - Parse and display only crawlers.\n"
- " --date-spec=<date|hr> - Date specificity. Possible values: `date` (default), or `hr`.\n"
+ " --date-spec=<date|hr|min> - Date specificity. Possible values: `date` (default), `hr` or `min`.\n"
" --double-decode - Decode double-encoded values.\n"
" --enable-panel=<PANEL> - Enable parsing/displaying the given panel.\n"
" --hide-referrer=<NEEDLE> - Hide a referrer but still count it. Wild cards are allowed.\n"
|
add sitemap creation | @@ -130,6 +130,7 @@ module APP
# Converts templates to static pages and saves the pages to the static location.
def self.bake_all
+ @sitemap.clear
# things that need to be rendered
@extensions.keys.each do |k|
Dir[File.join SOURCE_ROOT, '**', "*#{k}"].each do |pt|
@@ -138,6 +139,7 @@ module APP
env = {PATH_INFO => pt[SOURCE_ROOT.length..(-1-k.length)]}
APP.call(env)
puts "INFO: pre-baked: #{env[PATH_INFO]}"
+ @sitemap << env[PATH_INFO]
rescue => e
puts "WARN: couldn't pre-bake #{pt}: #{e.message}"
raise e
@@ -152,11 +154,17 @@ module APP
target = pt[SOURCE_ROOT.length..-1]
bake target, IO.binread(pt)
puts "INFO: copied #{pt} to #{target}"
+ # @sitemap << target
rescue => e
puts "WARN: bake copy failed at #{pt}: #{e.message}"
end
end
end
+ # output sitemap
+ out = "<html><body><ul><li><a href=\"/index\">/</a></li>".dup
+ @sitemap.each {|url| out << "<li><a href=\"#{url[0...-5]}\">#{url[0...-5]}</a></li>\r\n" if File.extname(url) == ".html" }
+ out << "</ul></body></html>"
+ IO.binwrite File.join(STATIC_ROOT, "sitemap.html"), out
end
# define different Rack application methods, depending on the environment.
|
enable prometheus middleware in the mruby example | @@ -17,6 +17,11 @@ hosts:
/:
file.dir: examples/doc_root
mruby.handler-file: examples/h2o_mruby/hello.rb
+ /status:
+ - mruby.handler: |
+ require 'prometheus.rb'
+ H2O::Prometheus.new(H2O.next)
+ - status: ON
access-log: /dev/stdout
"alternate.127.0.0.1.xip.io:8081":
listen:
|
fix(docs) consider an example to be visible over a wider area | @@ -70,7 +70,7 @@ document.addEventListener('DOMContentLoaded', (event) => {
});
}
const config = {
- rootMargin: '50px 0px',
+ rootMargin: '600px 0px',
threshold: 0.01
};
let observer = new IntersectionObserver(onIntersection, config);
|
libc: abort should always call exit not pthread_exit
since pthread_exit just exit the calling thread not the whole process | @@ -63,21 +63,8 @@ void abort(void)
* a conformant version of abort() at this time. This version does not
* signal the calling thread all.
*
- * Note that pthread_exit() is called instead of exit(). That is because
- * we do no know if abort was called from a pthread or a normal thread
- * (we could find out, of course). If abort() is called from a
- * non-pthread, then pthread_exit() should fail and fall back to call
- * exit() anyway.
- *
- * If exit() is called (either below or via pthread_exit()), then exit()
- * will flush and close all open files and terminate the thread. If this
- * function was called from a pthread, then pthread_exit() will complete
- * any joins, but will not flush or close any streams.
+ * exit() will flush and close all open files and terminate the thread.
*/
-#ifdef CONFIG_DISABLE_PTHREAD
exit(EXIT_FAILURE);
-#else
- pthread_exit(NULL);
-#endif
}
|
Add full console example to console documentation
Added example of event queue handling for full console. | @@ -256,6 +256,9 @@ is received. The two event queues are used as follows:
pointers to the callback and the :c:data:`console_input` buffer, must be
added to the avail_queue.
+Minimal Console Example
+"""""""""""""""""""""""
+
Here is a code excerpt that shows how to use the
:c:func:`console_set_queues()` function. The example adds one event to the
avail_queue and uses the OS default event queue for the lines_queue.
@@ -300,6 +303,49 @@ avail_queue and uses the OS default event queue for the lines_queue.
console_set_queues(&avail_queue, os_eventq_dflt_get());
}
+Full Console Example
+""""""""""""""""""""
+
+For the full console, setting the queue is done via
+:c:func:`console_line_queue_set()`. This example uses the OS default event
+queue for calling the line received callback.
+
+.. code-block:: c
+
+ static void myapp_process_input(struct os_event *ev);
+
+ static struct console_input myapp_console_buf;
+
+ static struct os_event myapp_console_event = {
+ .ev_cb = myapp_process_input,
+ .ev_arg = &myapp_console_buf
+ };
+
+ /* Event callback to process a line of input from console. */
+ static void
+ myapp_process_input(struct os_event *ev)
+ {
+ char *line;
+ struct console_input *input;
+
+ input = ev->ev_arg;
+ assert (input != NULL);
+
+ line = input->line;
+ /* Do some work with line */
+ ....
+ /* Done processing line. Add the event back to the avail_queue */
+ console_line_event_put(ev);
+ return;
+ }
+
+ static void
+ myapp_init(void)
+ {
+ console_line_event_put(&myapp_console_event);
+ console_line_queue_set(os_eventq_dflt_get());
+ }
+
API
~~~
|
fixed parameter names documentation | @@ -737,7 +737,7 @@ typedef void * MessageBufferHandle_t;
* message_buffer.h
*
* <pre>
- * BaseType_t xMessageBufferSendCompletedFromISR( MessageBufferHandle_t xStreamBuffer, BaseType_t *pxHigherPriorityTaskWoken );
+ * BaseType_t xMessageBufferSendCompletedFromISR( MessageBufferHandle_t xMessageBuffer, BaseType_t *pxHigherPriorityTaskWoken );
* </pre>
*
* For advanced users only.
@@ -753,7 +753,7 @@ typedef void * MessageBufferHandle_t;
* See the example implemented in FreeRTOS/Demo/Minimal/MessageBufferAMP.c for
* additional information.
*
- * @param xStreamBuffer The handle of the stream buffer to which data was
+ * @param xMessageBuffer The handle of the stream buffer to which data was
* written.
*
* @param pxHigherPriorityTaskWoken *pxHigherPriorityTaskWoken should be
@@ -777,7 +777,7 @@ typedef void * MessageBufferHandle_t;
* message_buffer.h
*
* <pre>
- * BaseType_t xMessageBufferReceiveCompletedFromISR( MessageBufferHandle_t xStreamBuffer, BaseType_t *pxHigherPriorityTaskWoken );
+ * BaseType_t xMessageBufferReceiveCompletedFromISR( MessageBufferHandle_t xMessageBuffer, BaseType_t *pxHigherPriorityTaskWoken );
* </pre>
*
* For advanced users only.
@@ -794,7 +794,7 @@ typedef void * MessageBufferHandle_t;
* See the example implemented in FreeRTOS/Demo/Minimal/MessageBufferAMP.c for
* additional information.
*
- * @param xStreamBuffer The handle of the stream buffer from which data was
+ * @param xMessageBuffer The handle of the stream buffer from which data was
* read.
*
* @param pxHigherPriorityTaskWoken *pxHigherPriorityTaskWoken should be
|
Update OpenSSL to v1.1.1h | Param(
[string]$GitURL = 'https://github.com/git-for-windows/git/releases/download/v2.19.1.windows.1/Git-2.19.1-64-bit.exe',
[string]$GitHash = '5E11205840937DD4DFA4A2A7943D08DA7443FAA41D92CCC5DAFBB4F82E724793',
- [string]$OpenSSLURL = 'https://slproweb.com/download/Win64OpenSSL-1_1_1g.exe',
- [string]$OpenSSLHash = 'c85a21661e6596e2a22799b7b56ba49ce8193a4fd89945b77086074ddad6065f',
+ [string]$OpenSSLURL = 'https://slproweb.com/download/Win64OpenSSL-1_1_1h.exe',
+ [string]$OpenSSLHash = 'C98DCF06D700DFFBC5EB3B10520BE77C44C176B4C1B990543FF72FFA643FEB5F',
[string]$SevenZipURL = 'https://www.7-zip.org/a/7z1806-x64.msi',
[string]$SevenZipHash = 'F00E1588ED54DDF633D8652EB89D0A8F95BD80CCCFC3EED362D81927BEC05AA5',
# We skip the hash check for the vs_buildtools.exe file because it is regularly updated without a change to the URL, unfortunately.
|
Fix missing merge on report utility | @@ -235,9 +235,9 @@ def print_result_set(imageSet, quality, encoders, results, printHeader):
dr = DeltaRecord(imageSet, quality, encoders, recordSet)
- if first:
+ if printHeader:
print(dr.get_full_row_header_csv())
- first = False
+ printHeader = False
print(dr.get_full_row_csv())
@@ -260,7 +260,7 @@ def main():
qualitySet = sorted(qualityTree.keys())
for qual in qualitySet:
- encoderTree = qualityTree[quality]
+ encoderTree = qualityTree[qual]
encoderSet = sorted(encoderTree.keys())
if len(encoderSet) > 1:
|
gzipread: consider output on end of stream | @@ -171,7 +171,7 @@ gzipread(void *strm, void *buf, size_t sze)
}
break;
case Z_STREAM_END: /* everything uncompressed, nothing pending */
- iret = 0;
+ iret = sze - zstrm->avail_out;
break;
case Z_DATA_ERROR: /* corrupt input */
inflateSync(zstrm);
|
Denoting package names and global variable names as code
This restores consistency, as it's also done like this in line 119 | @@ -224,15 +224,15 @@ You can find the generated packages in the `package` directory of the build dire
#### Debian/Ubuntu
-First make sure you have debhelper and d-shlibs installed:
+First make sure you have `debhelper` and `d-shlibs` installed:
```sh
apt-get install debhelper d-shlibs
```
-(Otherwise you'll see an error file utility is not available, breaking CPACK_DEBIAN_PACKAGE_SHLIBDEPS and CPACK_DEBIAN_PACKAGE_GENERATE_SHLIBS.)
+(Otherwise you'll see an error file utility is not available, breaking `CPACK_DEBIAN_PACKAGE_SHLIBDEPS` and `CPACK_DEBIAN_PACKAGE_GENERATE_SHLIBS`.)
-On Debian-based distributions you will need to set LD_LIBRARY_PATH before generating the package.
+On Debian-based distributions you will need to set `LD_LIBRARY_PATH` before generating the package.
Simply `cd` into the build directory and run following command:
```sh
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.