message
stringlengths
6
474
diff
stringlengths
8
5.22k
Update readme.md Added link to the 2048 game
@@ -140,6 +140,7 @@ Xeno Crisis by the [Bitmap Bureau](https://www.bitmapbureau.com/) ### Random list of SGDK-powered games and demos +* [2048](https://github.com/atamurad/sega-2048) by atamurad * [Abbaye des Morts (l')](https://playonretro.itch.io/labbaye-des-morts-megadrivegenesis-por-002) unofficial MD port by Moon-Watcher * [Art of LeonBli (the)](https://www.pouet.net/prod.php?which=72272) by Resistance * [Barbarian](https://www.youtube.com/watch?v=e8IIfNLXzAU) unofficial MD port by Z-Team
[P2P] Fix nil pointer panic
@@ -138,16 +138,17 @@ func init() { // NewPeerManager creates a peer manager object. func NewPeerManager(iServ ActorService, cfg *cfg.Config, logger *log.Logger) PeerManager { + p2pConf := cfg.P2P //logger.SetLevel("debug") hl := &peerManager{ iServ: iServ, - conf: cfg.P2P, + conf: p2pConf, log: logger, mutex: &sync.Mutex{}, - remotePeers: make(map[peer.ID]*RemotePeer, 100), - peerPool: make(map[peer.ID]PeerMeta, 100), - peerCache: make([]*RemotePeer, 100), + remotePeers: make(map[peer.ID]*RemotePeer, p2pConf.NPMaxPeers), + peerPool: make(map[peer.ID]PeerMeta, p2pConf.NPPeerPool), + peerCache: make([]*RemotePeer, 0, p2pConf.NPMaxPeers), subProtocols: make([]subProtocol, 0, 4), status: component.StoppedStatus,
Add ksceDisplaySetFrameBufInternal
@@ -77,6 +77,19 @@ typedef struct SceDisplayFrameBufInfo { */ int ksceDisplaySetFrameBuf(const SceDisplayFrameBuf *pParam, int sync); +/** + * Set/Update framebuffer parameters for display + * + * @param[in] head - Use 0 for OLED/LCD and 1 for HDMI + * @param[in] index - Can be 0 or 1 + * @param[in] pParam - Pointer to a ::SceDisplayFrameBuf structure. + * @param[in] sync - One of ::DisplaySetBufSync + * + * @return 0 on success, < 0 on error. + * @note - If NULL is provided as pParam pointer, output is blacked out. +*/ +int ksceDisplaySetFrameBufInternal(int head, int index, const SceDisplayFrameBuf *pParam, int sync); + /** * Get current framebuffer parameters *
More lint pleasing
@@ -642,7 +642,7 @@ int config_set_option(struct config_file* cfg, const char* opt, else S_POW2("ratelimit-slabs:", ratelimit_slabs) else S_NUMBER_OR_ZERO("ip-ratelimit-factor:", ip_ratelimit_factor) else S_NUMBER_OR_ZERO("ratelimit-factor:", ratelimit_factor) - else S_NUMBER_NONZERO("fast-server-num:", fast_server_num) + else S_SIZET_NONZERO("fast-server-num:", fast_server_num) else S_NUMBER_OR_ZERO("fast-server-permil:", fast_server_permil) else S_YNO("qname-minimisation:", qname_minimisation) else S_YNO("qname-minimisation-strict:", qname_minimisation_strict)
Fix case of Mbed TLS in assemble_changelog.py
@@ -122,7 +122,7 @@ class ChangelogFormat: class TextChangelogFormat(ChangelogFormat): """The traditional Mbed TLS changelog format.""" - _unreleased_version_text = '= mbed TLS x.x.x branch released xxxx-xx-xx' + _unreleased_version_text = '= Mbed TLS x.x.x branch released xxxx-xx-xx' @classmethod def is_released_version(cls, title): # Look for an incomplete release date
pairing: move pairing code formatting to its own function Reason: need this function to test the pairing code when unit testing the noise protocol in a later commit. We also stop using ArrayString, we are using normal String basically everywhere else.
use crate::workflow::confirm; pub use confirm::UserAbort; -use arrayvec::ArrayString; -use core::fmt::Write; +use alloc::string::String; -pub async fn confirm(hash: &[u8; 32]) -> Result<(), UserAbort> { +/// Format a pairing hash to a format that is easy for humans to visually compare. +pub fn format_hash(hash: &[u8; 32]) -> String { let mut encoded = [0u8; 60]; let encoded = binascii::b32encode(&hash[..], &mut encoded).unwrap(); - // Base32 contains only utf-8 valid chars. unwrap is safe let encoded = core::str::from_utf8(encoded).expect("invalid utf-8"); - let mut formatted = ArrayString::<[_; 23]>::new(); - - write!( - formatted, + format!( "{} {}\n{} {}", &encoded[0..5], &encoded[5..10], &encoded[10..15], &encoded[15..20] ) - .expect("failed to format"); +} +pub async fn confirm(hash: &[u8; 32]) -> Result<(), UserAbort> { let params = confirm::Params { title: "Pairing code", - body: &formatted, + body: &format_hash(hash), font: confirm::Font::Monogram5X9, ..Default::default() };
remove no-needed codes in openserial_inhibitStart function.
@@ -486,17 +486,15 @@ void openserial_flush(void) { } void openserial_inhibitStart(void) { - INTERRUPT_DECLARATION(); + // this function needs to run in non-interrupt mode + // since the inhibitStart is always called in an interrupt mode, + // DISABLE_INTERRUPT is not necessary here. - //<<<<<<<<<<<<<<<<<<<<<<< - DISABLE_INTERRUPTS(); openserial_vars.fInhibited = TRUE; #ifdef FASTSIM #else openserial_vars.ctsStateChanged = TRUE; #endif - ENABLE_INTERRUPTS(); - //>>>>>>>>>>>>>>>>>>>>>>> // it's openserial_flush() which will set CTS openserial_flush();
emit error message if out-of-memory in C++
@@ -802,7 +802,10 @@ static bool mi_try_new_handler(bool nothrow) { std::set_new_handler(h); #endif if (h==NULL) { - if (!nothrow) throw std::bad_alloc(); + _mi_error_message(ENOMEM, "out of memory in 'new'"); + if (!nothrow) { + throw std::bad_alloc(); + } return false; } else { @@ -830,9 +833,9 @@ static std_new_handler_t mi_get_new_handler() { static bool mi_try_new_handler(bool nothrow) { std_new_handler_t h = mi_get_new_handler(); if (h==NULL) { + _mi_error_message(ENOMEM, "out of memory in 'new'"); if (!nothrow) { - _mi_error_message(EFAULT, "out of memory in 'new' call"); // cannot throw in plain C, use EFAULT to abort - abort(); + abort(); // cannot throw in plain C, use abort } return false; }
awm draws a gap between a window and its title bar
@@ -48,6 +48,7 @@ typedef struct user_window { #define WINDOW_BORDER_MARGIN 0 #define WINDOW_TITLE_BAR_HEIGHT 30 +#define WINDOW_TITLE_BAR_VISIBLE_HEIGHT (WINDOW_TITLE_BAR_HEIGHT - 2) // Sorted by Z-index #define MAX_WINDOW_COUNT 64 @@ -761,7 +762,7 @@ int main(int argc, char** argv) { // We're out of messages to process - composite everything together and redraw // First draw the background - blit_layer(_screen.vmem, background, screen_frame, screen_frame); + blit_layer(_screen.vmem, _g_background, screen_frame, screen_frame); // Then each window (without copying in the window's current shared framebuffer) // Draw the bottom-most windows first // TODO(PT): Replace with a loop that draws the topmost window and @@ -793,9 +794,45 @@ int main(int argc, char** argv) { if (!fully_occluded) { // TODO(PT): As per the above comment, we should only copy the window layer // once if it's requested a redraw at least once on this pass through the event loop - blit_layer(_screen.vmem, window->layer, window->frame, rect_make(point_zero(), window->frame.size)); + blit_layer( + _screen.vmem, + window->layer, + window->frame, + rect_make( + point_zero(), + size_make( + window->frame.size.width, + WINDOW_TITLE_BAR_VISIBLE_HEIGHT + ) + ) + ); + blit_layer( + _screen.vmem, + window->layer, + rect_make( + point_make( + window->frame.origin.x, + window->frame.origin.y + WINDOW_TITLE_BAR_HEIGHT + ), + size_make( + window->frame.size.width, + window->frame.size.height - WINDOW_TITLE_BAR_HEIGHT + ) + ), + rect_make( + point_make( + 0, + WINDOW_TITLE_BAR_HEIGHT + ), + size_make( + window->frame.size.width, + window->frame.size.height - WINDOW_TITLE_BAR_HEIGHT + ) + ) + ); } } + // And finally the cursor _draw_cursor();
docs(codes): Use LSHIFT/RSHIFT in keymap upgrader
@@ -56,9 +56,9 @@ export const Codes = { ATSN: "AT", BANG: "EXCL", LCTL: "LCTRL", - LSFT: "LSHFT", + LSFT: "LSHIFT", RCTL: "RCTRL", - RSFT: "RSHFT", + RSFT: "RSHIFT", M_NEXT: "C_NEXT", M_PREV: "C_PREV", M_STOP: "C_STOP", @@ -69,11 +69,11 @@ export const Codes = { M_VOLD: "C_VOL_DN", GUI: "K_CMENU", MOD_LCTL: "LCTRL", - MOD_LSFT: "LSHFT", + MOD_LSFT: "LSHIFT", MOD_LALT: "LALT", MOD_LGUI: "LGUI", MOD_RCTL: "RCTRL", - MOD_RSFT: "RSHFT", + MOD_RSFT: "RSHIFT", MOD_RALT: "RALT", MOD_RGUI: "RGUI", };
rune/libenclave/pal: automatically detect enclave type in the pal_attest method
@@ -6,7 +6,6 @@ import ( "github.com/alibaba/inclavare-containers/epm/pkg/epm-api/v1alpha1" "github.com/go-restruct/restruct" "github.com/inclavare-containers/rune/libenclave/attestation" - "github.com/inclavare-containers/rune/libenclave/attestation/sgx" _ "github.com/inclavare-containers/rune/libenclave/attestation/sgx/ias" "github.com/inclavare-containers/rune/libenclave/epm" "github.com/inclavare-containers/rune/libenclave/intelsgx" @@ -97,21 +96,20 @@ func (pal *enclaveRuntimePal) GetLocalReport(targetInfo []byte) ([]byte, error) return nil, fmt.Errorf("unsupported pal api version %d", pal.version) } -func parseAttestParameters(spid string, subscriptionKey string, product uint32) map[string]string { +func parseAttestParameters(spid string, subscriptionKey string, product bool) map[string]string { p := make(map[string]string) p["spid"] = spid p["subscription-key"] = subscriptionKey - if product == sgx.ProductEnclave { - p["service-class"] = "product" - } else if product == sgx.DebugEnclave { p["service-class"] = "dev" + if product { + p["service-class"] = "product" } return p } -func (pal *enclaveRuntimePal) Attest(isRA bool, spid string, subscriptionKey string, product uint32, quoteType uint32) ([]byte, error) { +func (pal *enclaveRuntimePal) Attest(isRA bool, spid string, subscriptionKey string, isProduct uint32, quoteType uint32) ([]byte, error) { if pal.GetLocalReport == nil { return nil, nil } @@ -154,6 +152,11 @@ func (pal *enclaveRuntimePal) Attest(isRA bool, spid string, subscriptionKey str return nil, err } + product, err := intelsgx.IsProductEnclave(q.ReportBody) + if err != nil { + return nil, err + } + // get IAS remote attestation report p := parseAttestParameters(spid, subscriptionKey, product) challenger, err := attestation.NewChallenger("sgx-epid", p)
VERSION bump to version 1.3.33
@@ -30,7 +30,7 @@ endif() # micro version is changed with a set of small changes or bugfixes anywhere in the project. set(SYSREPO_MAJOR_VERSION 1) set(SYSREPO_MINOR_VERSION 3) -set(SYSREPO_MICRO_VERSION 32) +set(SYSREPO_MICRO_VERSION 33) set(SYSREPO_VERSION ${SYSREPO_MAJOR_VERSION}.${SYSREPO_MINOR_VERSION}.${SYSREPO_MICRO_VERSION}) # Version of the library
Improve sync progress reporting
@@ -249,11 +249,8 @@ namespace Miningcore.Blockchain.Ergo logger.Info(() => $"Daemon has downloaded {percent:0.00}% of blockchain from {info.PeersCount} peers"); } - else if(!string.IsNullOrEmpty(info?.BestFullHeaderId)) - logger.Info(() => $"Daemon is downloading headers ..."); - else - logger.Info(() => $"Waiting for daemon to resume syncing ..."); + logger.Info(() => $"Daemon is downloading headers ..."); } private async Task UpdateNetworkStatsAsync()
Fix Windows 10 bug showing TEB/PEB sub-VAD segments on the memory tab
@@ -316,7 +316,8 @@ NTSTATUS PhpUpdateMemoryRegionTypes( if (NT_SUCCESS(PhGetProcessBasicInformation(ProcessHandle, &basicInfo)) && basicInfo.PebBaseAddress != 0) { - PhpSetMemoryRegionType(List, basicInfo.PebBaseAddress, TRUE, PebRegion); + // HACK: Windows 10 RS2 and above 'added TEB/PEB sub-VAD segments' and we need to tag individual sections. + PhpSetMemoryRegionType(List, basicInfo.PebBaseAddress, WindowsVersion < WINDOWS_10_RS2 ? TRUE : FALSE, PebRegion); if (NT_SUCCESS(NtReadVirtualMemory(ProcessHandle, PTR_ADD_OFFSET(basicInfo.PebBaseAddress, FIELD_OFFSET(PEB, NumberOfHeaps)), @@ -408,7 +409,8 @@ NTSTATUS PhpUpdateMemoryRegionTypes( NT_TIB ntTib; SIZE_T bytesRead; - if (memoryItem = PhpSetMemoryRegionType(List, thread->TebBase, TRUE, TebRegion)) + // HACK: Windows 10 RS2 and above 'added TEB/PEB sub-VAD segments' and we need to tag individual sections. + if (memoryItem = PhpSetMemoryRegionType(List, thread->TebBase, WindowsVersion < WINDOWS_10_RS2 ? TRUE : FALSE, TebRegion)) memoryItem->u.Teb.ThreadId = thread->ThreadInfo.ClientId.UniqueThread; if (NT_SUCCESS(NtReadVirtualMemory(ProcessHandle, thread->TebBase, &ntTib, sizeof(NT_TIB), &bytesRead)) &&
VERSION bump to version 0.9.18
@@ -28,7 +28,7 @@ set(CMAKE_C_FLAGS_DEBUG "-g -O0") # set version set(LIBNETCONF2_MAJOR_VERSION 0) set(LIBNETCONF2_MINOR_VERSION 9) -set(LIBNETCONF2_MICRO_VERSION 17) +set(LIBNETCONF2_MICRO_VERSION 18) set(LIBNETCONF2_VERSION ${LIBNETCONF2_MAJOR_VERSION}.${LIBNETCONF2_MINOR_VERSION}.${LIBNETCONF2_MICRO_VERSION}) set(LIBNETCONF2_SOVERSION ${LIBNETCONF2_MAJOR_VERSION}.${LIBNETCONF2_MINOR_VERSION})
build MAINTENANCE rename callgrind include dir var
@@ -252,7 +252,7 @@ if(ENABLE_TESTS) endif() if(ENABLE_PERF_TESTS) - find_path(CALLGRIND_INCLUDE_DIR + find_path(VALGRIND_INCLUDE_DIR NAMES valgrind/callgrind.h PATHS @@ -262,10 +262,10 @@ if(ENABLE_PERF_TESTS) /sw/include ${CMAKE_INCLUDE_PATH} ${CMAKE_INSTALL_PREFIX}/include) - if(CALLGRIND_INCLUDE_DIR) + if(VALGRIND_INCLUDE_DIR) set(HAVE_CALLGRIND 1) else() - message(STATUS "Disabling callgrind macros in performance tests because of missing headers") + message(STATUS "Disabling callgrind macros in performance tests because of missing valgrind headers") endif() endif()
[Fix No assert if Tx tasks are empty
@@ -1698,6 +1698,8 @@ error_return_t MsgAlloc_SetTxTask(ll_service_t *ll_service_pt, uint8_t *data, ui * @param None ******************************************************************************/ void MsgAlloc_PullMsgFromTxTask(void) +{ + if (tx_tasks_stack_id != 0) { LUOS_ASSERT((tx_tasks_stack_id > 0) && (tx_tasks_stack_id <= MAX_MSG_NB)); // @@ -1735,6 +1737,7 @@ void MsgAlloc_PullMsgFromTxTask(void) LuosHAL_SetIrqState(true); MsgAlloc_FindNewOldestMsg(); } +} /****************************************************************************** * @brief remove all transmit task of a specific service * @param None
OpenEXR/IlmImfTest/testHuf.cpp: Do the compressVerify() on deterministic data sets. Updated to run compressVerify() on the fill4() and fill5() data sets which are deterministic across platforms. Added a comment to explain how these DEK hash are determined aprior for code defines.
@@ -176,6 +176,15 @@ compressUncompressSubset(const unsigned short raw[], int n) // This check is intended to test for regressions // in the hufCompress() result or difference results across OSes. // +// The platform agnostic DEK hash of the huf compressed data for +// the set of numbers generated by fill4() and fill5(). +// This DEK hash is determined from an aprior initial run of this +// test noting its value from the assert message compressVerify(). +// +#define HUF_COMPRESS_DEK_HASH_FOR_FILL4_USHRT_MAX_PLUS_ONE 2956869585U +#define HUF_COMPRESS_DEK_HASH_FOR_FILL4_N 3414126535U +#define HUF_COMPRESS_DEK_HASH_FOR_FILL5_N 169791374U + void compressVerify (const unsigned short raw[], int n, @@ -221,7 +230,6 @@ testHuf (const std::string&) Array <unsigned short> raw (N); fill1 (raw, N, 1, rand48); // test various symbol distributions - compressVerify(raw, N, 3762495704U); compressUncompress (raw, N); compressUncompressSubset (raw, N); fill1 (raw, N, 10, rand48); @@ -261,9 +269,11 @@ testHuf (const std::string&) compressUncompressSubset (raw, N); fill4 (raw, USHRT_MAX + 1); + compressVerify(raw, USHRT_MAX + 1, HUF_COMPRESS_DEK_HASH_FOR_FILL4_USHRT_MAX_PLUS_ONE); compressUncompress (raw, USHRT_MAX + 1); compressUncompressSubset (raw, USHRT_MAX + 1); fill4 (raw, N); + compressVerify(raw, N, HUF_COMPRESS_DEK_HASH_FOR_FILL4_N); compressUncompress (raw, N); compressUncompressSubset (raw, N); @@ -277,6 +287,7 @@ testHuf (const std::string&) compressUncompress (raw, 3); fill5 (raw, N); // test run-length coding of code table + compressVerify(raw, N, HUF_COMPRESS_DEK_HASH_FOR_FILL5_N); compressUncompress (raw, N); compressUncompressSubset (raw, N);
Fix Bindings Input tab printing "Cyber Engine Tweaks"
@@ -139,6 +139,7 @@ bool Bindings::DrawBindings(bool aDrawHotkeys) : ("This mod has no inputs, but it should have some hotkeys in other tab...") }; + std::string activeModName; std::string_view prevMod { "" }; size_t modBindsForType { 0 }; for (auto& vkBindInfo : m_vkBindInfos) @@ -147,8 +148,14 @@ bool Bindings::DrawBindings(bool aDrawHotkeys) curMod = curMod.substr(0, curMod.find('.')); if (prevMod != curMod) { - // make it writable (also checks for "cet" modname) - std::string activeModName { (curMod == "cet") ? ("Cyber Engine Tweaks") : (curMod) }; + if (curMod == "cet") + { + if (!aDrawHotkeys) + continue; // skip in this instance + activeModName = "Cyber Engine Tweaks"; + } + else + activeModName = curMod; // transform to nicer format till modinfo is in bool capitalize = true; @@ -169,7 +176,7 @@ bool Bindings::DrawBindings(bool aDrawHotkeys) // add vertical spacing when this is not first iteration and check if we drawn anything if (!prevMod.empty()) { - if (!modBindsForType && (prevMod != "cet")) + if (!modBindsForType) { // we did not draw anything, write appropriate message so it is not empty ImGui::SetCursorPosX(ImGui::GetCursorPosX() + 10.0f);
replaced calls to tests with direct calls to linear_hash_init and linear_hash_destroy to isolate failure point
@@ -452,9 +452,13 @@ test_linear_hash_create_destroy( planck_unit_test_t *tc ) { linear_hash_table_t *linear_hash = malloc(sizeof(linear_hash_table_t)); + ion_err_t err = linear_hash_init(0, 4, key_type_numeric_unsigned, (int) sizeof(int), (int) sizeof(int), 5, 85, 4, linear_hash); + linear_hash_destroy(linear_hash); + free(linear_hash); + PLANCK_UNIT_ASSERT_TRUE(tc, 1 == 1); - test_linear_hash_setup(tc, linear_hash); - test_linear_hash_takedown(tc, linear_hash); +// test_linear_hash_setup(tc, linear_hash); +// test_linear_hash_takedown(tc, linear_hash); } planck_unit_suite_t *
Add whitelist of DYNAMIC_ARCH kernels for which -msse3 needs to be enabled
@@ -41,6 +41,9 @@ ifdef NO_AVX2 endif ifdef TARGET_CORE + ifeq ($(TARGET_CORE), $(filter $(TARGET_CORE),PRESCOTT CORE2 PENRYN DUNNINGTON ATOM NANO NEHALEM BARCELONA BOBCAT BULLDOZER PILEDRIVER EXCAVATOR STEAMROLLER OPTERON_SSE3)) + override CFLAGS += -msse3 +endif ifeq ($(TARGET_CORE), COOPERLAKE) override CFLAGS += -DBUILD_KERNEL -DTABLE_NAME=gotoblas_$(TARGET_CORE) ifeq ($(GCCVERSIONGTEQ10), 1)
Update platform-tools (28.0.1) for Windows Include the latest version of adb in Windows releases.
@@ -35,6 +35,6 @@ prepare-sdl2: SDL2-2.0.8 prepare-adb: - @./prepare-dep https://dl.google.com/android/repository/platform-tools_r28.0.0-windows.zip \ - e2c1ec7c8e9b71cf1c8befd3bff91d06b26dd334c3f32b3817e9d46ba260b0e8 \ + @./prepare-dep https://dl.google.com/android/repository/platform-tools_r28.0.1-windows.zip \ + db78f726d5dc653706dcd15a462ab1b946c643f598df76906c4c1858411c54df \ platform-tools
Split the states to have a more precise state machine
@@ -29,10 +29,11 @@ type State = [5] (serverFinishedSent : State) = 15 (applicationDataTransmission : State) = 16 (serverNewSessionTicketSent : State) = 17 -(serverChangeCipherSpecWithTicketSent : State) = 18 -(serverFinishedWithTicketSent : State) = 19 -(clientChangeCipherSpecWithTicketSent : State) = 20 -(clientFinishedWithTicketSent : State) = 21 +(serverRenewSessionTicketSent : State) = 18 +(serverChangeCipherSpecWithTicketSent : State) = 19 +(serverFinishedWithTicketSent : State) = 20 +(clientChangeCipherSpecWithTicketSent : State) = 21 +(clientFinishedWithTicketSent : State) = 22 // TLS protocol types type Protocol = [2] @@ -90,6 +91,8 @@ handshakeTransition old new = \/ (old == certificateVerifySent /\ new == clientChangeCipherSpecSent) \/ (old == clientChangeCipherSpecSent /\ new == clientFinishedSent) \/ (old == clientFinishedSent /\ new == serverChangeCipherSpecSent) + \/ (old == clientFinishedSent /\ new == serverNewSessionTicketSent) + \/ (old == serverNewSessionTicketSent /\ new == serverChangeCipherSpecSent) \/ (old == serverChangeCipherSpecSent /\ new == serverFinishedSent) \/ (old == serverFinishedSent /\ new == applicationDataTransmission) \/ (old == serverHelloSent /\ new == serverNewSessionTicketSent)
zephyr/shim/chip/it8xxx2/clock.c: Format with clang-format BRANCH=none TEST=none
@@ -21,16 +21,8 @@ LOG_MODULE_REGISTER(shim_clock, LOG_LEVEL_ERR); ((struct ecpm_reg *)DT_REG_ADDR_BY_IDX(ECPM_NODE, 0)) #define PLLFREQ_MASK 0xf -static const int pll_reg_to_freq[8] = { - MHZ(8), - MHZ(16), - MHZ(24), - MHZ(32), - MHZ(48), - MHZ(64), - MHZ(72), - MHZ(96) -}; +static const int pll_reg_to_freq[8] = { MHZ(8), MHZ(16), MHZ(24), MHZ(32), + MHZ(48), MHZ(64), MHZ(72), MHZ(96) }; int clock_get_freq(void) {
Use driverInfo for driver name/version instead
@@ -1505,15 +1505,9 @@ static VkResult overlay_CreateSwapchainKHR( #endif else { ss << " " << VK_VERSION_MAJOR(prop.driverVersion); - if (VK_VERSION_PATCH(prop.driverVersion) >= 99){ - ss << "." << VK_VERSION_MINOR(prop.driverVersion) + 1; - ss << "." << "0"; - } else { ss << "." << VK_VERSION_MINOR(prop.driverVersion); ss << "." << VK_VERSION_PATCH(prop.driverVersion); } - - } std::string driverVersion = ss.str(); std::string deviceName = prop.deviceName; @@ -1523,25 +1517,7 @@ static VkResult overlay_CreateSwapchainKHR( init_system_info(); #endif } - if(driverProps.driverID == VK_DRIVER_ID_NVIDIA_PROPRIETARY){ - swapchain_data->sw_stats.driverName = "NVIDIA"; - } - if(driverProps.driverID == VK_DRIVER_ID_AMD_PROPRIETARY) - swapchain_data->sw_stats.driverName = "AMDGPU-PRO"; - if(driverProps.driverID == VK_DRIVER_ID_AMD_OPEN_SOURCE) - swapchain_data->sw_stats.driverName = "AMDVLK"; - if(driverProps.driverID == VK_DRIVER_ID_MESA_RADV){ - if(deviceName.find("ACO") != std::string::npos){ - swapchain_data->sw_stats.driverName = "RADV/ACO"; - } else { - swapchain_data->sw_stats.driverName = "RADV"; - } - } - - if (!swapchain_data->sw_stats.driverName.empty()) - swapchain_data->sw_stats.driverName += driverVersion; - else - swapchain_data->sw_stats.driverName = prop.deviceName + driverVersion; + swapchain_data->sw_stats.driverName = driverProps.driverInfo; return result; }
hv: minor coding style fix in list.h To add brakets for '(char *)(ptr)' in MACRO container_of(), which may be used recursively.
@@ -119,7 +119,7 @@ static inline void list_splice_init(struct list_head *list, } #define container_of(ptr, type, member) \ - ((type *)((char *)(ptr)-offsetof(type, member))) + ((type *)(((char *)(ptr)) - offsetof(type, member))) #define list_for_each(pos, head) \ for ((pos) = (head)->next; (pos) != (head); (pos) = (pos)->next)
A small fix in the "escape_flag"
@@ -37190,7 +37190,7 @@ int selectplayer(int *players, char *filename, int useSavedGame) if (bothnewkeys & FLAG_ESC || escape_flag == 11) //Kratus (20-04-21) Added the new "escape" flag in the select screen by using the "gotomainmenu" function and the flag "11" { escape = 1; - escape_flag == 0 + escape_flag = 0; } }
Permit symbolic links in lovr.filesystem; If needed, it can be made configurable later.
@@ -48,6 +48,7 @@ bool lovrFilesystemInit(const char* argExe, const char* argGame, const char* arg lovrThrow("Could not initialize filesystem: %s", PHYSFS_getErrorByCode(PHYSFS_getLastErrorCode())); } + PHYSFS_permitSymbolicLinks(1); state.source = malloc(LOVR_PATH_MAX * sizeof(char)); lovrAssert(state.source, "Out of memory"); state.identity = NULL;
YAML CPP: Fix position of parentheses in comment
@@ -51,7 +51,7 @@ KeySet splitArrayParents (KeySet const & keys) /** * @brief This function splits `keys` into two key sets, one for array parents and elements, and the other one for all other keys. * - * @param arrayParents This key set contains a (copy) of all array parents of `keys`. + * @param arrayParents This key set contains (a copy of) all array parents of `keys`. * @param keys This parameter contains the key set this function splits. * * @return A pair of key sets, where the first key set contains all array parents and elements,
Add emulator test to validate oversize messages Ensure it doesn't crash
@@ -478,6 +478,18 @@ def gdb_invalid_command(_): conn.expect('@', '') +@test_harness.test +def gdb_big_command(_): + """ Check for buffer overflows by sending a very large command""" + hexfile = test_harness.build_program(['count.S'], image_type='raw') + with EmulatorProcess(hexfile), DebugConnection() as conn: + # Big, invalid command. this should return an error (empty response) + conn.expect('x' * 0x10000, '') + + # Now send a valid request to ensure it is still alive. + conn.expect('qC', 'QC01') + + @test_harness.test def gdb_queries(_): """Miscellaneous query commands not covered in other tests"""
Handle cases where the number of pixels is not divisible by 32
@@ -1076,7 +1076,7 @@ static double pixel_var_avx2_largebuf(const kvz_pixel *buf, const uint32_t len) size_t i; __m256i sums = zero; - for (i = 0; i < len; i += 32) { + for (i = 0; i + 31 < len; i += 32) { __m256i curr = _mm256_loadu_si256((const __m256i *)(buf + i)); __m256i curr_sum = _mm256_sad_epu8(curr, zero); sums = _mm256_add_epi64(sums, curr_sum); @@ -1088,11 +1088,17 @@ static double pixel_var_avx2_largebuf(const kvz_pixel *buf, const uint32_t len) __m128i sum_5 = _mm_add_epi64 (sum_3, sum_4); int64_t sum = _mm_cvtsi128_si64(sum_5); + + // Remaining len mod 32 pixels + for (; i < len; ++i) { + sum += buf[i]; + } + float mean_f = (float)sum / len_f; __m256 mean = _mm256_set1_ps(mean_f); __m256 accum = _mm256_setzero_ps(); - for (i = 0; i < len; i += 32) { + for (i = 0; i + 31 < len; i += 32) { __m128i curr0 = _mm_loadl_epi64((const __m128i *)(buf + i + 0)); __m128i curr1 = _mm_loadl_epi64((const __m128i *)(buf + i + 8)); __m128i curr2 = _mm_loadl_epi64((const __m128i *)(buf + i + 16)); @@ -1134,6 +1140,13 @@ static double pixel_var_avx2_largebuf(const kvz_pixel *buf, const uint32_t len) __m256 accum7 = _mm256_add_ps (accum5, accum6); float var_sum = _mm256_cvtss_f32 (accum7); + + // Remaining len mod 32 pixels + for (; i < len; ++i) { + float diff = buf[i] - mean_f; + var_sum += diff * diff; + } + return var_sum / len_f; }
hoon: doccords cleanup %note tag for +boog
=+ e=(glom a c) ?~ boy.e [b d] - [b [%note [%help ~ [p.u.boy.e q.u.boy.e]] d]] + [b [%note help+`[u.boy.e] d]] ;~ pose ;~ plug apex:docs
Add CriticalSection handling instead of mutexes for Windows
@@ -515,7 +515,12 @@ static int gemm_driver(blas_arg_t *args, BLASLONG *range_m, BLASLONG BLASLONG nthreads_m, BLASLONG nthreads_n) { #ifndef USE_OPENMP +#ifndef OS_WINDOWS static pthread_mutex_t level3_lock = PTHREAD_MUTEX_INITIALIZER; +#else +CRITICAL_SECTION level3_lock; +InitializeCriticalSection((PCRITICAL_SECTION)&level3_lock; +#endif #endif blas_arg_t newarg; @@ -559,7 +564,11 @@ static pthread_mutex_t level3_lock = PTHREAD_MUTEX_INITIALIZER; #endif #ifndef USE_OPENMP +#ifndef OS_WINDOWS pthread_mutex_lock(&level3_lock); +#else +EnterCriticalSection((PCRITICAL_SECTION)&level3_lock); +#endif #endif #ifdef USE_ALLOC_HEAP @@ -680,7 +689,11 @@ pthread_mutex_lock(&level3_lock); #endif #ifndef USE_OPENMP +#ifndef OS_WINDOWS pthread_mutex_unlock(&level3_lock); +#else + LeaveCriticalSection((PCRITICAL_SECTION)&level3_lock); +#endif #endif return 0;
basebackup: correctly terminate readlink() buffer Buffer corruption was caused by not correctly terminating the readlink(), as of commit We restored a previous line of code that allows correct termination.
@@ -1251,6 +1251,7 @@ sendDir(char *path, int basepathlen, bool sizeonly, List *tablespaces, ereport(ERROR, (errmsg("symbolic link \"%s\" target is too long", pathbuf))); + linkpath[rllen] = '\0'; /* Lop off the dbid before sending the link target. */ char *file_sep_before_dbid_in_link_path = strrchr(linkpath, '/');
kernel: caps_mark_revoke: fix marking of cap copies for revoke Also add some comments explaining what the function is doing.
@@ -465,8 +465,14 @@ errval_t caps_mark_revoke(struct capability *base, struct cte *revoked) assert(base); assert(!revoked || revoked->mdbnode.owner == my_core_id); + // SG: In the following code, 'prev' is kind of a misnomer, this is all + // just contortions to iterate through all copies and descendants of a + // given capability. We update prev to be able to iterate through the tree + // even when we're going up and down the tree structure to find the next + // predecessor/successor. -2017-08-29. + // to avoid multiple mdb_find_greater, we store the predecessor of the - // current position + // current position. struct cte *prev = mdb_find_greater(base, true), *next = NULL; if (!prev || !(is_copy(base, &prev->cap) || is_ancestor(&prev->cap, base))) @@ -474,6 +480,24 @@ errval_t caps_mark_revoke(struct capability *base, struct cte *revoked) return SYS_ERR_CAP_NOT_FOUND; } + // Mark copies (backwards): we will never find descendants earlier in the + // ordering. However we might find copies! + for (next = mdb_predecessor(prev); + next && is_copy(base, &next->cap); + next = mdb_predecessor(prev)) + { + if (next == revoked) { + // do not delete the revoked capability, use it as the new prev + // instead, and delete the old prev. + next = prev; + prev = revoked; + } + assert(revoked || next->mdbnode.owner != my_core_id); + caps_mark_revoke_copy(next); + } + // Mark copies (forward), use updated "prev". When we're done with this + // step next should be == revoked(?), and succ(next) should be the first + // descendant. for (next = mdb_successor(prev); next && is_copy(base, &next->cap); next = mdb_successor(prev)) @@ -489,6 +513,9 @@ errval_t caps_mark_revoke(struct capability *base, struct cte *revoked) caps_mark_revoke_copy(next); } + assert(prev == revoked); + + // Mark descendants for (next = mdb_successor(prev); next && is_ancestor(&next->cap, base); next = mdb_successor(prev))
docs: update lustre version in manifest
% <-- begin entry for lustre-client-ohpc \multirow{2}{*}{lustre-client-ohpc} & -\multirow{2}{*}{2.12.5} & +\multirow{2}{*}{2.12.6} & Lustre File System. \newline { \color{logoblue} \url{https://wiki.whamcloud.com}} \\ \hline % <-- end entry for lustre-client-ohpc
tools: fix resuming vm issue in acrnd This patch resolves vm state mismatch between vm and acrnd which causes vm resuming failure
@@ -141,7 +141,7 @@ static void _scan_alive_vm(void) case VM_SUSPEND_NONE: vm->state = VM_STARTED; break; - case VM_SUSPEND_HALT: + case VM_SUSPEND_SUSPEND: vm->state = VM_PAUSED; break; default:
VERSION bump to version 0.11.13
@@ -32,7 +32,7 @@ set(CMAKE_C_FLAGS_DEBUG "-g -O0") # set version set(LIBNETCONF2_MAJOR_VERSION 0) set(LIBNETCONF2_MINOR_VERSION 11) -set(LIBNETCONF2_MICRO_VERSION 12) +set(LIBNETCONF2_MICRO_VERSION 13) set(LIBNETCONF2_VERSION ${LIBNETCONF2_MAJOR_VERSION}.${LIBNETCONF2_MINOR_VERSION}.${LIBNETCONF2_MICRO_VERSION}) set(LIBNETCONF2_SOVERSION ${LIBNETCONF2_MAJOR_VERSION}.${LIBNETCONF2_MINOR_VERSION})
test: fix is_not_rw_storage add release notes
@@ -152,6 +152,8 @@ you up to date with the multi-language support provided by Elektra. ## Tests +- Fixed the `is_not_rw_storage` function. _(Lukas Kilian)_ +- We now ensure that the `check_import` and `check_export` tests run for at least one plugin. _(Lukas Kilian)_ - <<TODO>> - <<TODO>> - <<TODO>>
Fast-path for drawing a filled circle
@@ -412,6 +412,18 @@ void draw_circle(ca_layer* layer, Circle circ, Color color, int thickness) { //make sure they don't set one too big thickness = MIN(thickness, max_thickness); + // Filled circle? + if (thickness == max_thickness) { + for (int32_t y = -circ.radius; y <= circ.radius; y++) { + for (int32_t x = -circ.radius; x <= circ.radius; x++) { + if ((x*x) + (y*y) <= (circ.radius * circ.radius)) { + putpixel(layer, circ.center.x + x, circ.center.y + y, color); + } + } + } + return; + } + Circle c = circle_make(circ.center, circ.radius); for (int i = 0; i <= thickness; i++) {
analysis workflow, add libevent test, clang macos test.
@@ -24,11 +24,22 @@ jobs: # config: "CC=clang --enable-debug --disable-flto" # make_test: "yes" # clang_analysis: "yes" - - name: GCC on OS X + - name: Clang on Linux, libevent, clang-analysis + os: ubuntu-latest + config: "CC=clang --enable-debug --disable-flto --with-libevent" + make_test: "yes" + clang_analysis: "yes" +# - name: GCC on OS X +# os: macos-latest +# install_expat: "yes" +# config: "--enable-debug --disable-flto --with-ssl=/usr/local/opt/openssl --with-libexpat=/usr/local/opt/expat" +# make_test: "yes" + - name: Clang on OS X os: macos-latest install_expat: "yes" - config: "--enable-debug --disable-flto --with-ssl=/usr/local/opt/openssl --with-libexpat=/usr/local/opt/expat" + config: "CC=clang --enable-debug --disable-flto --with-ssl=/usr/local/opt/openssl --with-libexpat=/usr/local/opt/expat" make_test: "yes" + clang_analysis: "yes" steps: - uses: actions/checkout@v2
Yan LR: Add comment banners
@@ -20,6 +20,11 @@ using namespace antlr4; extern "C" { +// ==================== +// = Plugin Interface = +// ==================== + +/** @see elektraDocGet */ int elektraYanlrGet (Plugin * handle ELEKTRA_UNUSED, KeySet * returned, Key * parentKey) { if (!elektraStrCmp (keyName (parentKey), "system/elektra/modules/yanlr")) @@ -39,6 +44,7 @@ int elektraYanlrGet (Plugin * handle ELEKTRA_UNUSED, KeySet * returned, Key * pa return ELEKTRA_PLUGIN_STATUS_NO_UPDATE; } +/** @see elektraDocSet */ int elektraYanlrSet (Plugin * handle ELEKTRA_UNUSED, KeySet * returned ELEKTRA_UNUSED, Key * parentKey ELEKTRA_UNUSED) { return ELEKTRA_PLUGIN_STATUS_NO_UPDATE;
rmt_legacy: fix undetermined idle level Closes
@@ -769,16 +769,19 @@ static void IRAM_ATTR rmt_driver_isr_default(void *arg) } const rmt_item32_t *pdata = p_rmt->tx_data; size_t len_rem = p_rmt->tx_len_rem; + rmt_idle_level_t idle_level = rmt_ll_tx_get_idle_level(hal->regs, channel); + rmt_item32_t stop_data = (rmt_item32_t) { + .level0 = idle_level, + .duration0 = 0, + }; if (len_rem >= p_rmt->tx_sub_len) { rmt_fill_memory(channel, pdata, p_rmt->tx_sub_len, p_rmt->tx_offset); p_rmt->tx_data += p_rmt->tx_sub_len; p_rmt->tx_len_rem -= p_rmt->tx_sub_len; } else if (len_rem == 0) { - rmt_item32_t stop_data = {0}; rmt_fill_memory(channel, &stop_data, 1, p_rmt->tx_offset); } else { rmt_fill_memory(channel, pdata, len_rem, p_rmt->tx_offset); - rmt_item32_t stop_data = {0}; rmt_fill_memory(channel, &stop_data, 1, p_rmt->tx_offset + len_rem); p_rmt->tx_data += len_rem; p_rmt->tx_len_rem -= len_rem; @@ -1113,7 +1116,11 @@ esp_err_t rmt_write_items(rmt_channel_t channel, const rmt_item32_t *rmt_item, i p_rmt->tx_sub_len = item_sub_len; } else { rmt_fill_memory(channel, rmt_item, len_rem, 0); - rmt_item32_t stop_data = {0}; + rmt_idle_level_t idle_level = rmt_ll_tx_get_idle_level(rmt_contex.hal.regs, channel); + rmt_item32_t stop_data = (rmt_item32_t) { + .level0 = idle_level, + .duration0 = 0, + }; rmt_fill_memory(channel, &stop_data, 1, len_rem); p_rmt->tx_len_rem = 0; } @@ -1252,7 +1259,11 @@ esp_err_t rmt_write_sample(rmt_channel_t channel, const uint8_t *src, size_t src p_rmt->tx_sub_len = item_sub_len; p_rmt->translator = true; } else { - rmt_item32_t stop_data = {0}; + rmt_idle_level_t idle_level = rmt_ll_tx_get_idle_level(rmt_contex.hal.regs, channel); + rmt_item32_t stop_data = (rmt_item32_t) { + .level0 = idle_level, + .duration0 = 0, + }; rmt_fill_memory(channel, &stop_data, 1, p_rmt->tx_len_rem); p_rmt->tx_len_rem = 0; p_rmt->sample_cur = NULL;
Fixed a couple of issues with the Custom Rules docs
@@ -20,7 +20,7 @@ rule "MyCustomRule" buildmessage 'Compiling %(Filename) with MyCustomCC' buildcommands 'MyCustomCC.exe -c "%(FullPath)" -o "%(IntDir)/%(Filename).obj"' - buildoutputs '%(IntDir)/%(Filename).obj"' + buildoutputs '%(IntDir)/%(Filename).obj' ``` This rule will pass all files in project with the ".xyz" file extension through the specified build command. At export time, the files `MyCustomRule.props`, `MyCustomRule.targets`, and `MyCustomRule.xml` will be generated in the sample directory. Like workspaces and projects, this can be changed with [`location`](location.md) and [`filename`](filename.md). @@ -45,7 +45,7 @@ rule "MyCustomRule" propertydefinition { name = "StripDebugInfo", - ind = "boole + kind = "boolean", display = "Strip Debug Info", description = "Remove debug information from the generated object files" value = false,
Use pwgMediaForSize to get standard PWG media size name.
@@ -985,7 +985,7 @@ _papplPrinterWebMedia( } else { - pwg_media_t *pwg; // PWG media info + pwg_media_t *pwg = NULL; // PWG media info pappl_media_col_t *ready; // Current ready media const char *value, // Value of form variable *custom_width, // Custom media width @@ -1001,21 +1001,26 @@ _papplPrinterWebMedia( if (!strcmp(value, "custom")) { + // Custom size... snprintf(name, sizeof(name), "ready%d-custom-width", i); custom_width = cupsGetOption(name, num_form, form); snprintf(name, sizeof(name), "ready%d-custom-length", i); custom_length = cupsGetOption(name, num_form, form); if (custom_width && custom_length) - { - snprintf(ready->size_name, sizeof(ready->size_name), "custom_%s_%.2fx%.2fin", data.source[i], atof(custom_width), atof(custom_length)); - ready->size_width = (int)(2540.0 * atof(custom_width)); - ready->size_length = (int)(2540.0 * atof(custom_length)); + pwg = pwgMediaForSize((int)(2540.0 * atof(custom_width)), (int)(2540.0 * atof(custom_length))); } + else + { + // Standard size... + pwg = pwgMediaForPWG(value); } - else if ((pwg = pwgMediaForPWG(value)) != NULL) + + papplLogClient(client, PAPPL_LOGLEVEL_DEBUG, "%s='%s',%d,%d", name, pwg ? pwg->pwg : "unknown", pwg ? pwg->width : 0, pwg ? pwg->length : 0); + + if (pwg) { - strlcpy(ready->size_name, value, sizeof(ready->size_name)); + strlcpy(ready->size_name, pwg->pwg, sizeof(ready->size_name)); ready->size_width = pwg->width; ready->size_length = pwg->length; } @@ -1036,7 +1041,6 @@ _papplPrinterWebMedia( ready->left_margin = ready->right_margin = data.left_right; } - // top-offset snprintf(name, sizeof(name), "ready%d-top-offset", i); if ((value = cupsGetOption(name, num_form, form)) != NULL)
add m3_wasi_unstable_clock_res_get
#include <errno.h> #include <stdio.h> +//TODO +#define PREOPEN_CNT 3 +#define NANOS_PER_SEC 1000000000 + typedef uint32_t __wasi_size_t; struct wasi_iovec @@ -40,9 +44,6 @@ typedef struct Preopen { unsigned path_len; } Preopen; -//TODO -#define PREOPEN_CNT 3 - Preopen preopen[PREOPEN_CNT] = { { .path = "<stdin>", .path_len = 7, }, { .path = "<stdout>", .path_len = 8, }, @@ -267,21 +268,33 @@ uint32_t m3_wasi_unstable_random_get(void* buf, __wasi_size_t buflen) return errno_to_wasi(errno); } if (retlen == buflen) { return __WASI_ESUCCESS; } - buf = (void *)((unsigned char *)buf + retlen); + buf = (void *)((uint8_t *)buf + retlen); buflen -= retlen; } } +uint32_t m3_wasi_unstable_clock_res_get(IM3Runtime runtime, + __wasi_clockid_t clock_id, + __wasi_timestamp_t* resolution) +{ + struct timespec tp; + if (clock_getres(clock_id, &tp) != 0) + *resolution = 1000000; + else + *resolution = (tp.tv_sec * NANOS_PER_SEC) + tp.tv_nsec; + return __WASI_ESUCCESS; +} + uint32_t m3_wasi_unstable_clock_time_get(IM3Runtime runtime, __wasi_clockid_t clock_id, __wasi_timestamp_t precision, __wasi_timestamp_t* time) { struct timespec tp; - clock_gettime(clock_id, &tp); + if (clock_gettime(clock_id, &tp) != 0) { return errno_to_wasi(errno); } //printf("=== time: %lu.%09u\n", tp.tv_sec, tp.tv_nsec); - *time = (uint64_t)tp.tv_sec * 1000000000 + tp.tv_nsec; + *time = (uint64_t)tp.tv_sec * NANOS_PER_SEC + tp.tv_nsec; return __WASI_ESUCCESS; } @@ -325,6 +338,7 @@ _ (SuppressLookupFailure (m3_LinkFunction (module, "fd_close", "i(i)", _ (SuppressLookupFailure (m3_LinkFunction (module, "random_get", "v(*i)", &m3_wasi_unstable_random_get))); +_ (SuppressLookupFailure (m3_LinkFunction (module, "clock_res_get", "v(Mi*)", &m3_wasi_unstable_clock_res_get))); _ (SuppressLookupFailure (m3_LinkFunction (module, "clock_time_get", "v(MiI*)", &m3_wasi_unstable_clock_time_get))); _ (SuppressLookupFailure (m3_LinkFunction (module, "proc_exit", "v(i)", &m3_wasi_unstable_proc_exit)));
more elegant way of restoring the SYNC flag
@@ -1255,22 +1255,15 @@ static elektraCursor backendsDivideInternal (KeySet * backends, elektraCursor * Key * k = ksAtCursor (ks, cur); Key * nextBackendKey = *curBackend >= ksGetSize (backends) - 1 ? defaultBackendKey : ksAtCursor (backends, *curBackend + 1); - bool originalKeyNeedsSync = keyNeedSync (k) == 1; - if (keyIsBelowOrSame (defaultBackendKey, k) == 1) { - Key * newKey = keyDup (k, KEY_CP_ALL); + Key * d = keyDup (k, KEY_CP_ALL); - if (originalKeyNeedsSync) - { - set_bit (newKey->flags, KEY_FLAG_SYNC); - } - else - { - clear_bit (newKey->flags, KEY_FLAG_SYNC); - } + // set the value of the sync flag to the same value as the original key + clear_bit (d->flags, KEY_FLAG_SYNC); + d->flags |= k->flags & KEY_FLAG_SYNC; - ksAppendKey (defaultBackendData->keys, newKey); + ksAppendKey (defaultBackendData->keys, d); } // nextBackendKey == NULL happens during bootstrap else if (nextBackendKey != NULL && keyCmp (k, nextBackendKey) >= 0) @@ -1281,20 +1274,15 @@ static elektraCursor backendsDivideInternal (KeySet * backends, elektraCursor * } else if (*curBackend < 0 || keyIsBelowOrSame (backendKey, k) == 1) { - backendData->keyNeedsSync = backendData->keyNeedsSync || originalKeyNeedsSync; + backendData->keyNeedsSync = backendData->keyNeedsSync || keyNeedSync (k) == 1; - Key * newKey = keyDup (k, KEY_CP_ALL); + Key * d = keyDup (k, KEY_CP_ALL); - if (originalKeyNeedsSync) - { - set_bit (newKey->flags, KEY_FLAG_SYNC); - } - else - { - clear_bit (newKey->flags, KEY_FLAG_SYNC); - } + // set the value of the sync flag to the same value as the original key + clear_bit (d->flags, KEY_FLAG_SYNC); + d->flags |= k->flags & KEY_FLAG_SYNC; - ksAppendKey (backendData->keys, newKey); + ksAppendKey (backendData->keys, d); } else {
install: fixing dialog width on mobile
@@ -106,7 +106,11 @@ export const AppInfo: FC<AppInfoProps> = ({ docket, vat, className }) => { 'Get App' )} </DialogTrigger> - <DialogContent showClose={false} className="max-w-[400px] space-y-6"> + <DialogContent + showClose={false} + className="space-y-6" + containerClass="w-full max-w-md" + > <h2 className="h4">Install &ldquo;{docket.title}&rdquo;</h2> <p className="text-base tracking-tight pr-6"> This application will be able to view and interact with the contents of your
options/posix: Define struct shminfo
@@ -57,6 +57,15 @@ struct shmid_ds { unsigned long shm_nattch; }; +struct shminfo { + unsigned long shmmax; + unsigned long shmmin; + unsigned long shmmni; + unsigned long shmseg; + unsigned long shmall; + unsigned long __unused[4]; +}; + void *shmat(int, const void *, int); int shmctl(int, int, struct shmid_ds *); int shmdt(const void *);
docs/uerrno: Fix xref-vs-code markup.
@@ -17,7 +17,7 @@ Constants Error codes, based on ANSI C/POSIX standard. All error codes start with "E". As mentioned above, inventory of the codes depends on `MicroPython port`. Errors are usually accessible as ``exc.args[0]`` - where `exc` is an instance of `OSError`. Usage example:: + where ``exc`` is an instance of `OSError`. Usage example:: try: uos.mkdir("my_dir")
Fix document update missed in
@@ -3319,9 +3319,9 @@ static ConfigDefineOptionData configDefineOptionData[] = CFGDEFDATA_OPTION_LIST "This path is used to store acknowledgements from the asynchronous archive-push process. These files are generally " "very small (zero to a few hundred bytes) so not much space is required.\n" "\n" - "The data stored in the spool path is not strictly temporary since it can and should survive a reboot. Loss of the " - "data in the spool path is not an issue. pgBackRest will simply recheck each WAL segment to ensure it is safely " - "archived." + "The data stored in the spool path is not strictly temporary since it can and should survive a reboot. However, loss " + "of the data in the spool path is not a problem. pgBackRest will simply recheck each WAL segment to ensure it is " + "safely archived." ) CFGDEFDATA_OPTION_COMMAND_LIST
Windows: Add type casting in CRYPTO_atomic_add to remove warning CLA: trivial
@@ -155,7 +155,7 @@ int CRYPTO_THREAD_compare_id(CRYPTO_THREAD_ID a, CRYPTO_THREAD_ID b) int CRYPTO_atomic_add(int *val, int amount, int *ret, CRYPTO_RWLOCK *lock) { - *ret = InterlockedExchangeAdd(val, amount) + amount; + *ret = (int)InterlockedExchangeAdd((long volatile *)val, (long)amount) + amount; return 1; }
u3: removes "worker_send_replace" printf
@@ -341,10 +341,6 @@ _worker_send(u3_noun job) static void _worker_send_replace(c3_d evt_d, u3_noun job) { - u3l_log("worker_send_replace %" PRIu64 " %s\r\n", - evt_d, - u3r_string(u3h(u3t(u3t(job))))); - _worker_send(u3nt(c3__work, u3i_chubs(1, &evt_d), u3ke_jam(u3nc(u3V.mug_l, job))));
GetBackgroundColorGIF: promote to uint32_t before << 24 quiets a signed integer overflow warning
@@ -405,7 +405,7 @@ static uint32_t GetBackgroundColorGIF(GifFileType* gif) { return 0xffffffff; // Invalid: assume white. } else { const GifColorType color = color_map->Colors[gif->SBackGroundColor]; - return (0xff << 24) | + return (0xffu << 24) | (color.Red << 16) | (color.Green << 8) | (color.Blue << 0);
Python 2: Fix detection of include folder on macOS
@@ -11,8 +11,14 @@ if (APPLE AND PYTHON2INTERP_FOUND) execute_process (COMMAND ${PYTHON2_EXECUTABLE}-config --prefix OUTPUT_VARIABLE PYTHON2_LIBRARY_PREFIX OUTPUT_STRIP_TRAILING_WHITESPACE) - set (PYTHON2_LIBRARY ${PYTHON2_LIBRARY_PREFIX}/lib/libpython${PYTHON2_VERSION}${CMAKE_SHARED_LIBRARY_SUFFIX}) - set (PYTHON2_INCLUDE_DIR ${PYTHON2_LIBRARY_PREFIX}/include/python${PYTHON2_VERSION}) + set (PYTHON2_LIBRARY + ${PYTHON2_LIBRARY_PREFIX}/lib/libpython${PYTHON2_VERSION}${CMAKE_SHARED_LIBRARY_SUFFIX} + CACHE FILEPATH + "Filepath of the Python 2 library") + set (PYTHON2_INCLUDE_DIR + ${PYTHON2_LIBRARY_PREFIX}/include/python${PYTHON2_VERSION_MAJOR}.${PYTHON2_VERSION_MINOR} + CACHE PATH + "Path to the Python 2 include directory") endif (APPLE AND PYTHON2INTERP_FOUND) find_package (Python2Libs ${PYTHON2_VERSION} QUIET)
Docs : esp_https_server API references corrected
@@ -13,20 +13,19 @@ Used APIs The following API of `esp_http_server` should not be used with `esp_https_server`, as they are used internally to handle secure sessions and to maintain internal state: -- "send", "receive" and "pending" function overrides - secure socket handling - - :cpp:func:`httpd_set_sess_send_override` - - :cpp:func:`httpd_set_sess_recv_override` - - :cpp:func:`httpd_set_sess_pending_override` - - :cpp:func:`httpd_set_send_override` - - :cpp:func:`httpd_set_recv_override` - - :cpp:func:`httpd_set_pending_override` -- "transport context" - both global and session - - :cpp:func:`httpd_sess_get_transport_ctx` - returns SSL used for the session - - :cpp:func:`httpd_sess_set_transport_ctx` - - :cpp:func:`httpd_get_global_transport_ctx` - returns the shared SSL context - - :c:member:`httpd_config_t.global_transport_ctx` - - :c:member:`httpd_config_t.global_transport_ctx_free_fn` - - :c:member:`httpd_config_t.open_fn` - used to set up secure sockets +* "send", "receive" and "pending" function overrides - secure socket handling + + * :cpp:func:`httpd_sess_set_send_override` + * :cpp:func:`httpd_sess_set_recv_override` + * :cpp:func:`httpd_sess_set_pending_override` +* "transport context" - both global and session + + * :cpp:func:`httpd_sess_get_transport_ctx` - returns SSL used for the session + * :cpp:func:`httpd_sess_set_transport_ctx` + * :cpp:func:`httpd_get_global_transport_ctx` - returns the shared SSL context + * :c:member:`httpd_config_t.global_transport_ctx` + * :c:member:`httpd_config_t.global_transport_ctx_free_fn` + * :c:member:`httpd_config_t.open_fn` - used to set up secure sockets Everything else can be used without limitations. @@ -37,7 +36,7 @@ Please see the example :example:`protocols/https_server` to learn how to set up Basically all you need is to generate a certificate, embed it in the firmware, and provide its pointers and lengths to the start function via the init struct. -The server can be started with or without SSL by changing a flag in the init struct. This could be used e.g. for testing or in trusted environments where you prefer speed over security. +The server can be started with or without SSL by changing a flag in the init struct - :c:member:`httpd_ssl_config.transport_mode`. This could be used e.g. for testing or in trusted environments where you prefer speed over security. Performance -----------
unix/coverage: Allow coverage tests to pass with debugging disabled.
@@ -152,7 +152,11 @@ STATIC mp_obj_t extra_coverage(void) { mp_printf(&mp_plat_print, "%.2s %.3s\n", "abc", "abc"); // fixed string precision mp_printf(&mp_plat_print, "%.*s\n", -1, "abc"); // negative string precision mp_printf(&mp_plat_print, "%b %b\n", 0, 1); // bools + #ifndef NDEBUG mp_printf(&mp_plat_print, "%s\n", NULL); // null string + #else + mp_printf(&mp_plat_print, "(null)\n"); // without debugging mp_printf won't check for null + #endif mp_printf(&mp_plat_print, "%d\n", 0x80000000); // should print signed mp_printf(&mp_plat_print, "%u\n", 0x80000000); // should print unsigned mp_printf(&mp_plat_print, "%x\n", 0x80000000); // should print unsigned
Add some pervasive msif NIDs
@@ -5815,6 +5815,11 @@ modules: kscePervasiveDsiResetDisable: 0xFFB43AC2 kscePervasiveDsiClockEnable: 0xBC42C72F kscePervasiveDsiClockDisable: 0x25AE181E + kscePervasiveMsifResetEnable: 0xA3569FF1 + kscePervasiveMsifResetDisable: 0xCB0F15CD + kscePervasiveMsifClockEnable: 0x7704C013 + kscePervasiveMsifClockDisable: 0x2A9778CD + kscePervasiveRemovableMemoryGetCardInsertState: 0x551EEE82 SceGpioForDriver: kernel: true nid: 0xF0EF5743
Fix generated files after adding config option
@@ -2723,6 +2723,14 @@ int query_config( const char *config ) } #endif /* MBEDTLS_ECDH_VARIANT_EVEREST_ENABLED */ +#if defined(MBEDTLS_INTERNAL_CCM_NO_ZEROIZE_ON_TAG_FAIL) + if( strcmp( "MBEDTLS_INTERNAL_CCM_NO_ZEROIZE_ON_TAG_FAIL", config ) == 0 ) + { + MACRO_EXPANSION_TO_STR( MBEDTLS_INTERNAL_CCM_NO_ZEROIZE_ON_TAG_FAIL ); + return( 0 ); + } +#endif /* MBEDTLS_INTERNAL_CCM_NO_ZEROIZE_ON_TAG_FAIL */ + /* If the symbol is not found, return an error */ return( 1 ); }
common/accel_cal.c: Format with clang-format BRANCH=none TEST=none
@@ -27,13 +27,13 @@ static inline int compute_temp_gate(const struct accel_cal *cal, fp_t temp) INT_TO_FP(cal->num_temp_windows)), TEMP_RANGE); - return gate < cal->num_temp_windows - ? gate : (cal->num_temp_windows - 1); + return gate < cal->num_temp_windows ? gate : + (cal->num_temp_windows - 1); } -test_mockable bool accel_cal_accumulate( - struct accel_cal *cal, uint32_t timestamp, fp_t x, fp_t y, fp_t z, - fp_t temp) +test_mockable bool accel_cal_accumulate(struct accel_cal *cal, + uint32_t timestamp, fp_t x, fp_t y, + fp_t z, fp_t temp) { struct accel_cal_algo *algo;
Remove unnecessary loop in pkey_rsa_decrypt. It is not necessary to remove leading zeros here because RSA_padding_check_PKCS1_OAEP_mgf1 appends them again. As this was not done in constant time, this might have leaked timing information.
@@ -316,19 +316,14 @@ static int pkey_rsa_decrypt(EVP_PKEY_CTX *ctx, RSA_PKEY_CTX *rctx = ctx->data; if (rctx->pad_mode == RSA_PKCS1_OAEP_PADDING) { - int i; if (!setup_tbuf(rctx, ctx)) return -1; ret = RSA_private_decrypt(inlen, in, rctx->tbuf, ctx->pkey->pkey.rsa, RSA_NO_PADDING); if (ret <= 0) return ret; - for (i = 0; i < ret; i++) { - if (rctx->tbuf[i]) - break; - } - ret = RSA_padding_check_PKCS1_OAEP_mgf1(out, ret, rctx->tbuf + i, - ret - i, ret, + ret = RSA_padding_check_PKCS1_OAEP_mgf1(out, ret, rctx->tbuf, + ret, ret, rctx->oaep_label, rctx->oaep_labellen, rctx->md, rctx->mgf1md);
vere: fix "queu" command argument parsing
@@ -1474,10 +1474,12 @@ _cw_queu(c3_i argc, c3_c* argv[]) { c3_i ch_i, lid_i; c3_w arg_w; + c3_c* roc_c = 0; static struct option lop_u[] = { { "loom", required_argument, NULL, c3__loom }, { "no-demand", no_argument, NULL, 6 }, + { "replay-from", required_argument, NULL, 'r' }, { NULL, 0, NULL, 0 } }; @@ -1500,6 +1502,10 @@ _cw_queu(c3_i argc, c3_c* argv[]) u3_Host.ops_u.lom_y = lom_w; } break; + case 'r': { + roc_c = strdup(optarg); + } break; + case '?': { fprintf(stderr, "invalid argument\r\n"); exit(1); @@ -1507,9 +1513,13 @@ _cw_queu(c3_i argc, c3_c* argv[]) } } + if ( !roc_c ) { + fprintf(stderr, "invalid command, -r $EVENT required\r\n"); + exit(1); + } + // argv[optind] is always "queu" // - if ( !u3_Host.dir_c ) { if ( optind + 1 < argc ) { u3_Host.dir_c = argv[optind + 1]; @@ -1527,11 +1537,10 @@ _cw_queu(c3_i argc, c3_c* argv[]) exit(1); } - c3_c* eve_c; c3_d eve_d; - if ( 1 != sscanf(eve_c, "%" PRIu64 "", &eve_d) ) { - fprintf(stderr, "urbit: queu: invalid number '%s'\r\n", eve_c); + if ( 1 != sscanf(roc_c, "%" PRIu64 "", &eve_d) ) { + fprintf(stderr, "urbit: queu: invalid number '%s'\r\n", roc_c); exit(1); } else {
Use now shared ECP_PRV_DER_MAX_BYTES define in pk_wrap.c
@@ -861,8 +861,7 @@ static int ecdsa_sign_wrap( void *ctx_arg, mbedtls_md_type_t md_alg, psa_status_t status; mbedtls_pk_context key; size_t key_len; - /* see ECP_PRV_DER_MAX_BYTES in pkwrite.c */ - unsigned char buf[29 + 3 * MBEDTLS_ECP_MAX_BYTES]; + unsigned char buf[MBEDTLS_PK_ECP_PRV_DER_MAX_BYTES]; unsigned char *p; mbedtls_pk_info_t pk_info = mbedtls_eckey_info; psa_algorithm_t psa_sig_md = PSA_ALG_ECDSA( mbedtls_psa_translate_md( md_alg ) );
[kernel] move updateInteractions() call to beginning of projection loop Must be called before updateInput/computeOSNS, otherwise it may leave the graph modified without the OSNS interaction block sizes updated.
@@ -192,6 +192,8 @@ void TimeSteppingDirectProjection::advanceToEvent() _nbProjectionIteration++; DEBUG_PRINTF("TimeSteppingDirectProjection projection step = %d\n", _nbProjectionIteration); + updateInteractions(); + SP::InteractionsGraph indexSet = _nsds->topology()->indexSet(0); InteractionsGraph::VIterator ui, uiend; for (std11::tie(ui, uiend) = indexSet->vertices(); ui != uiend; ++ui) @@ -283,7 +285,6 @@ void TimeSteppingDirectProjection::advanceToEvent() } updateWorldFromDS(); - updateInteractions(); computeCriteria(&runningProjection);
Remove dead c1 journal function to appease bullseye...
@@ -50,14 +50,6 @@ c1_journal_inc_seqno(struct c1_journal *jrnl) jrnl->c1j_gen = 0; } -static inline struct mpool * -c1_journal_get_mp(struct c1_journal *jrnl) -{ - assert(jrnl); - - return jrnl->c1j_mp; -} - merr_t c1_journal_alloc(struct mpool *mp, int mediaclass, u64 capacity, struct c1_journal **out);
[core] buffer_append_string_encoded() uc hex Use uc hex chars in buffer_append_string_encoded(), preferred in RFC3986 Preserve behavior using lc hex chars in buffer_append_string_c_escaped()
#include <string.h> #include <time.h> /* strftime() */ -static const char hex_chars[] = "0123456789abcdef"; static const char hex_chars_lc[] = "0123456789abcdef"; static const char hex_chars_uc[] = "0123456789ABCDEF"; @@ -684,16 +683,16 @@ void buffer_append_string_encoded(buffer *b, const char *s, size_t s_len, buffer case ENCODING_REL_URI: case ENCODING_REL_URI_PART: d[d_len++] = '%'; - d[d_len++] = hex_chars[((*ds) >> 4) & 0x0F]; - d[d_len++] = hex_chars[(*ds) & 0x0F]; + d[d_len++] = hex_chars_uc[((*ds) >> 4) & 0x0F]; + d[d_len++] = hex_chars_uc[(*ds) & 0x0F]; break; case ENCODING_HTML: case ENCODING_MINIMAL_XML: d[d_len++] = '&'; d[d_len++] = '#'; d[d_len++] = 'x'; - d[d_len++] = hex_chars[((*ds) >> 4) & 0x0F]; - d[d_len++] = hex_chars[(*ds) & 0x0F]; + d[d_len++] = hex_chars_uc[((*ds) >> 4) & 0x0F]; + d[d_len++] = hex_chars_uc[(*ds) & 0x0F]; d[d_len++] = ';'; break; case ENCODING_HTTP_HEADER: @@ -755,8 +754,8 @@ void buffer_append_string_c_escaped(buffer *b, const char *s, size_t s_len) { break; default: d[d_len++] = 'x'; - d[d_len++] = hex_chars[((*ds) >> 4) & 0x0F]; - d[d_len++] = hex_chars[(*ds) & 0x0F]; + d[d_len++] = hex_chars_lc[((*ds) >> 4) & 0x0F]; + d[d_len++] = hex_chars_lc[(*ds) & 0x0F]; break; } } else {
common/memory_commands.c: Format with clang-format BRANCH=none TEST=none
#include "util.h" #include "watchdog.h" - enum format { FMT_WORD, FMT_HALF, @@ -106,9 +105,8 @@ static int command_mem_dump(int argc, char **argv) return EC_SUCCESS; } -DECLARE_CONSOLE_COMMAND_FLAGS - (md, command_mem_dump, - "[.b|.h|.s] addr [count]", +DECLARE_CONSOLE_COMMAND_FLAGS( + md, command_mem_dump, "[.b|.h|.s] addr [count]", "dump memory values, optionally specifying the format", CMD_FLAG_RESTRICTED); #endif /* CONFIG_CMD_MD */ @@ -149,12 +147,12 @@ static int command_read_word(int argc, char **argv) if ((argc - argc_offs) < 3) { switch (access_size) { case 1: - ccprintf("read 0x%pP = 0x%02x\n", - address, *((uint8_t *)address)); + ccprintf("read 0x%pP = 0x%02x\n", address, + *((uint8_t *)address)); break; case 2: - ccprintf("read 0x%pP = 0x%04x\n", - address, *((uint16_t *)address)); + ccprintf("read 0x%pP = 0x%04x\n", address, + *((uint16_t *)address)); break; default: @@ -190,9 +188,8 @@ static int command_read_word(int argc, char **argv) return EC_SUCCESS; } -DECLARE_CONSOLE_COMMAND_FLAGS - (rw, command_read_word, - "[.b|.h] addr [value]", +DECLARE_CONSOLE_COMMAND_FLAGS( + rw, command_read_word, "[.b|.h] addr [value]", "Read or write a word in memory optionally specifying the size", CMD_FLAG_RESTRICTED); #endif /* CONFIG_CMD_RW */
outnet_tcp_cb: add assertion and return when write packets done is handled.
@@ -867,6 +867,7 @@ outnet_tcp_cb(struct comm_point* c, void* arg, int error, pend->c->tcp_write_pkt = NULL; pend->c->tcp_write_pkt_len = 0; /* the pend.query is already in tree_by_id */ + log_assert(pend->query->id_node.key); pend->query = NULL; /* setup to write next packet or setup read timeout */ if(pend->reuse.write_wait_first) { @@ -876,6 +877,7 @@ outnet_tcp_cb(struct comm_point* c, void* arg, int error, } else { reuse_tcp_setup_readtimeout(pend); } + return 0; } else if(error != NETEVENT_NOERROR) { verbose(VERB_QUERY, "outnettcp got tcp error %d", error); /* pass error below and exit */
driver/temp_sensor: fix tmp432 compile issue temp sensor tmp432 will compiler fail when board define CONFIG_TEMP_SENSOR_POWER_GPIO. BRANCH=none TEST=make buildall
static int temp_val_local; static int temp_val_remote1; static int temp_val_remote2; +#ifndef CONFIG_TEMP_SENSOR_POWER_GPIO static uint8_t is_sensor_shutdown; +#endif static int fake_temp[TMP432_IDX_COUNT] = {-1, -1, -1}; /** @@ -90,6 +92,7 @@ int tmp432_get_val(int idx, int *temp_ptr) return EC_SUCCESS; } +#ifndef CONFIG_TEMP_SENSOR_POWER_GPIO static int tmp432_shutdown(uint8_t want_shutdown) { int ret, value; @@ -119,6 +122,7 @@ static int tmp432_shutdown(uint8_t want_shutdown) is_sensor_shutdown = want_shutdown; return ret; } +#endif static int tmp432_set_therm_mode(void) {
Test table initializer errors
@@ -276,35 +276,35 @@ describe("Pallene type checker", function() it("forbids wrong type in initializer", function() assert_init_error([[ - local p: Point = { x = 10.0, y = "hello" } + local p: ]].. typ ..[[ = { x = 10.0, y = "hello" } ]], "expected float but found string in table initializer") end) it("forbids wrong field name in initializer", function() assert_init_error([[ - local p: Point = { x = 10.0, y = 20.0, z = 30.0 } + local p: ]].. typ ..[[ = { x = 10.0, y = 20.0, z = 30.0 } ]], - "invalid field 'z' in table initializer for Point") + "invalid field 'z' in table initializer for " .. typ) end) it("forbids array part in initializer", function() assert_init_error([[ - local p: Point = { x = 10.0, y = 20.0, 30.0 } + local p: ]].. typ ..[[ = { x = 10.0, y = 20.0, 30.0 } ]], "table initializer has array part") end) it("forbids initializing a field twice", function() assert_init_error([[ - local p: Point = { x = 10.0, x = 11.0, y = 20.0 } + local p: ]].. typ ..[[ = { x = 10.0, x = 11.0, y = 20.0 } ]], "duplicate field 'x' in table initializer") end) it("forbids missing fields in initializer", function() assert_init_error([[ - local p: Point = { y = 1.0 } + local p: ]].. typ ..[[ = { y = 1.0 } ]], "required field 'x' is missing") end)
Use pip3 instead of pip for ubuntu mock unit tests
@@ -149,7 +149,7 @@ pylint: $(MOCK_BIN): @echo "--- mock for platform $(UBUNTU_PLATFORM)" @if [ "$(UBUNTU_PLATFORM)" = "Ubuntu" ]; then\ - pip install mock;\ + pip3 install mock;\ else\ mkdir -p $(PYTHONSRC_INSTALL_SITE) && \ cd $(PYLIB_SRC_EXT)/ && $(TAR) xzf $(MOCK_DIR).tar.gz && \
Fix LBA to byte calculation. Change SGL type to 10.
@@ -448,10 +448,10 @@ module nvme_host_slave # end else begin // SGL Entry Format automatic logic [31:0] sg_byte_length; - sg_byte_length = action_w_regs[`ACTION_W_LBA_NUM][15:0] << `LBA_BYTE_SHIFT; + sg_byte_length = (action_w_regs[`ACTION_W_LBA_NUM][15:0] + 1) << `LBA_BYTE_SHIFT; unique case (sq_count) // DW3-0: RSV(8 bytes), NSID(4 bytes), 31:16 CMD_ID, 15:14 SGL 13:10 RSV, 9:8 FUSE, 7:0 OPC - 0: tx_wdata <= {64'd0, 32'd0, sq_cid, 2'b01, 4'b0000, 2'b00, sq_opcode}; + 0: tx_wdata <= {64'd0, 32'd0, sq_cid, 2'b10, 4'b0000, 2'b00, sq_opcode}; // DW7-4: SGE Address[7:0](8 bytes), MPTR(8 bytes) 1: tx_wdata <= {{action_w_regs[`ACTION_W_DPTR_HIGH], action_w_regs[`ACTION_W_DPTR_LOW]}, 64'd0}; // DW11-8: Start LBA(8 bytes), SG ID (1 byte), SG RSVD (3 bytes), SG Byte Length (4 bytes)
fix string qoute rule
@@ -4,7 +4,7 @@ local table = require("base/table") local _dump = {} function _dump._string(str, as_key) - local quote = (not as_key) or str:match("%s") + local quote = (not as_key) or (not str:match("^[a-zA-Z_][a-zA-Z0-9_]*$")) if quote then io.write(colors.translate("${cyan}\"")) end
lib: cmetrics: upgrade DEV v0.3.0 (2e315e3)
-cmake_minimum_required(VERSION 2.8) +cmake_minimum_required(VERSION 3.0) project(cmetrics C) set(CMAKE_POSITION_INDEPENDENT_CODE ON) set(CMAKE_EXPORT_COMPILE_COMMANDS ON) @@ -109,8 +109,15 @@ check_c_source_compiles(" return 0; }" CMT_HAVE_MSGPACK) +# Flex and Bison: check if the variables has not been defined before by +# a parent project to avoid conflicts. +if(NOT FLEX_FOUND) find_package(FLEX 2) +endif() + +if(NOT BISON_FOUND) find_package(BISON 3) +endif() if(FLEX_FOUND AND BISON_FOUND) set(CMT_BUILD_PROMETHEUS_DECODER 1)
Delete useless code, fixed Delete useless code in hardware/board/haaseduk1/startup/startup.c
@@ -107,10 +107,6 @@ static void haas_board_init(void) a7_heartbeat_reboot_enable(1); #endif #endif - - if (init == BES_SDK) { - krhino_task_sleep(1000); - } } static void a7_dsp_init(void)
task: creat task_routes by routes_mask
@@ -66,7 +66,6 @@ static inline void map_free_task_id(int id, struct flb_config *config) config->tasks_map[id].task = NULL; } - void flb_task_retry_destroy(struct flb_task_retry *retry) { int ret; @@ -352,6 +351,7 @@ struct flb_task *flb_task_create(uint64_t ref_id, struct flb_task *task; struct flb_task_route *route; struct flb_output_instance *o_ins; + struct flb_input_chunk *task_ic; struct mk_list *o_head; /* No error status */ @@ -376,6 +376,9 @@ struct flb_task *flb_task_create(uint64_t ref_id, task->tag[tag_len] = '\0'; task->tag_len = tag_len; + task_ic = (struct flb_input_chunk *) ic; + task_ic->task = task; + /* Keep track of origins */ task->ref_id = ref_id; task->buf = buf; @@ -388,18 +391,12 @@ struct flb_task *flb_task_create(uint64_t ref_id, task->records = ((struct flb_input_chunk *) ic)->total_records; #endif - /* Find matching routes for the incoming tag */ + /* Find matching routes for the incoming task */ mk_list_foreach(o_head, &config->outputs) { o_ins = mk_list_entry(o_head, struct flb_output_instance, _head); - if (flb_router_match(task->tag, task->tag_len, o_ins->match -#ifdef FLB_HAVE_REGEX - , o_ins->match_regex -#else - , NULL -#endif - )) { + if ((((struct flb_input_chunk *) ic)->routes_mask & o_ins->mask_id) > 0) { route = flb_malloc(sizeof(struct flb_task_route)); if (!route) { flb_errno();
scripts: add missing modprobe for msr (needed by pqos)
@@ -26,6 +26,7 @@ for n in /sys/devices/system/node/node[2-9]; do done # reserve the first LLC to iokernel -sudo pqos -R l3cdp-any -sudo pqos -e "llc:1=0x00001;llc:0=0xffffe;" -sudo pqos -a "llc:1=0" +modprobe msr +pqos -R l3cdp-any +pqos -e "llc:1=0x00001;llc:0=0xffffe;" +pqos -a "llc:1=0"
Add Better Error Message about prlimit for mlock
@@ -40,7 +40,7 @@ struct s2n_error_translation EN[] = { {S2N_ERR_DECRYPT, "error decrypting data"}, {S2N_ERR_MADVISE, "error calling madvise"}, {S2N_ERR_ALLOC, "error allocating memory"}, - {S2N_ERR_MLOCK, "error calling mlock"}, + {S2N_ERR_MLOCK, "error calling mlock (Did you run prlimit?)"}, {S2N_ERR_MUNLOCK, "error calling munlock"}, {S2N_ERR_FSTAT, "error calling fstat"}, {S2N_ERR_OPEN, "error calling open"},
fixing HDF5 resource leak
@@ -1348,14 +1348,15 @@ avtSAMRAIFileFormat::ReadMatSpecFractions(int patch, string mat_name, hsize_t *hdims = new hsize_t[hndims]; hsize_t *max_hdims = new hsize_t[hndims]; H5Sget_simple_extent_dims(h5d_space, hdims, max_hdims); + H5Sclose(h5d_space); hsize_t hsum = 1; for (i = 0; i < hndims; i++) hsum *= hdims[i]; if ((hsize_t) num_data_samples != hsum) { + H5Dclose(h5d_variable); EXCEPTION2(UnexpectedValueException, num_data_samples, hsum); } - H5Sclose(h5d_space); delete [] hdims; delete [] max_hdims;
Fix 2nd help text typo
@@ -5274,7 +5274,7 @@ printf("%s %s (C) %s ZeroBeat\n" "Do not edit, merge or convert this pcapng files, because it will remove optional comment fields!\n" "It is much better to run gzip to compress the files. Wireshark, tshark and hcxpcapngtool will understand this.\n" "If hcxdumptool captured your password from WiFi traffic, you should check all your devices immediately!\n" - "If you use GPS, make sure GPS device is in fix, before you start hcxdumptool\n" + "If you use GPS, make sure GPS device is inserted, before you start hcxdumptool\n" "\n", eigenname, VERSION, VERSION_JAHR, eigenname, eigenname, STAYTIME, EAPOLTIMEOUT /10000, BEACONEXTLIST_MAX, FILTERLIST_MAX, weakcandidate, FILTERLIST_MAX, MCHOST, MCPORT, MCHOST, MCPORT);
sysrepo BUGFIX wrong return value check
@@ -2147,7 +2147,7 @@ sr_validate(sr_session_ctx_t *session, const char *module_name, uint32_t timeout break; } } - if (!ly_mod) { + if (!node) { /* nothing to validate */ goto cleanup; }
better flag variable assignment
@@ -50,7 +50,7 @@ LIBCURRENT=7 # sync LIBREVISION=8 # with LIBAGE=6 # CMakeLists.txt! -AS_VAR_APPEND(CPPFLAGS," -DHAVE_EXPAT_CONFIG_H") +AX_APPEND_FLAG([-DHAVE_EXPAT_CONFIG_H], [CPPFLAGS]) AC_CONFIG_HEADER([expat_config.h]) AM_PROG_AR
Back copying...
@@ -313,14 +313,12 @@ if (libxsmm_target_archid == LIBXSMM_X86_AVX512_MIC || /* Copy the minibatch to a padded version only if no transpose is required -- otherwise we combine the transpose with the copying into the padded buffer */ #ifndef LIBXSMM_WU_TRANSPOSE_OFW_IFM - //for (imgifm1 = copy_thr_end-1; imgifm1 >= copy_thr_begin; imgifm1--) { - for (imgifm1 = copy_thr_begin; imgifm1 < copy_thr_end; imgifm1++) { + for (imgifm1 = copy_thr_end-1; imgifm1 >= copy_thr_begin; imgifm1--) { img = imgifm1/handle->blocksifm; ifm1 = imgifm1%handle->blocksifm; input_ptr = (element_input_type*)&LIBXSMM_VLA_ACCESS(5, input_nopad, img, ifm1, 0, 0, 0, handle->blocksifm, handle->ifhp, handle->ifwp, handle->ifmblock); copy_ptr = (element_input_type*)&LIBXSMM_VLA_ACCESS(5, input_padded, img, ifm1, handle->desc.pad_h, handle->desc.pad_w, 0, handle->blocksifm, padded_h, padded_w, handle->ifmblock); - //prefetch_ptr = (element_input_type*)&LIBXSMM_VLA_ACCESS(5, input_nopad, (imgifm1-1)/handle->blocksifm, (imgifm1-1)%handle->blocksifm, 0, 0, 0, handle->blocksifm, handle->ifhp, handle->ifwp, handle->ifmblock); - prefetch_ptr = (element_input_type*)&LIBXSMM_VLA_ACCESS(5, input_nopad, (imgifm1+1)/handle->blocksifm, (imgifm1+1)%handle->blocksifm, 0, 0, 0, handle->blocksifm, handle->ifhp, handle->ifwp, handle->ifmblock); + prefetch_ptr = (element_input_type*)&LIBXSMM_VLA_ACCESS(5, input_nopad, (imgifm1-1)/handle->blocksifm, (imgifm1-1)%handle->blocksifm, 0, 0, 0, handle->blocksifm, handle->ifhp, handle->ifwp, handle->ifmblock); jitted_matcopy(input_ptr, NULL, copy_ptr, NULL, prefetch_ptr); } libxsmm_barrier_wait(handle->barrier, ltid);
OpenCanopy: Do not draw children outside their parent's bounds
@@ -190,6 +190,14 @@ GuiObjDrawDelegate ( ASSERT (This->Height > OffsetY); ASSERT (DrawContext != NULL); + if (Width > This->Width - OffsetX) { + Width = This->Width - OffsetX; + } + + if (Height > This->Height - OffsetY) { + Height = This->Height - OffsetY; + } + for ( ChildEntry = GetPreviousNode (&This->Children, &This->Children); !IsNull (&This->Children, ChildEntry);
Refactored VmaBlockVector::SortByFreeSize to fix compilation on XCode 13.4 Fixes Thanks !
@@ -12732,7 +12732,7 @@ void VmaBlockVector::IncrementallySortBlocks() void VmaBlockVector::SortByFreeSize() { VMA_SORT(m_Blocks.begin(), m_Blocks.end(), - [](auto* b1, auto* b2) + [](VmaDeviceMemoryBlock* b1, VmaDeviceMemoryBlock* b2) -> bool { return b1->m_pMetadata->GetSumFreeSize() < b2->m_pMetadata->GetSumFreeSize(); });
hw/bus/i2c: Make sure node config is set before init
@@ -209,14 +209,14 @@ bus_i2c_node_init_func(struct os_dev *odev, void *arg) BUS_DEBUG_POISON_NODE(node); + node->freq = cfg->freq; + node->addr = cfg->addr; + node->quirks = cfg->quirks; + rc = bus_node_init_func(odev, node_cfg); if (rc) { return rc; } - node->freq = cfg->freq; - node->addr = cfg->addr; - node->quirks = cfg->quirks; - return 0; }
chat: preserve 0 and auto values in space calculations Fixes urbit/landscape#303
@@ -60,8 +60,8 @@ class OverlaySigil extends PureComponent<OverlaySigilProps, OverlaySigilState> { if (this.containerRef && this.containerRef.current) { const container = this.containerRef.current; const scrollWindow = this.props.scrollWindow; - const bottomSpace = scrollWindow.clientHeight - ((container.getBoundingClientRect().top + OVERLAY_HEIGHT) - scrollWindow.getBoundingClientRect().top); - const topSpace = container.getBoundingClientRect().top - scrollWindow.getBoundingClientRect().top; + const bottomSpace = scrollWindow ? scrollWindow.clientHeight - ((container.getBoundingClientRect().top + OVERLAY_HEIGHT) - scrollWindow.getBoundingClientRect().top) : 'auto'; + const topSpace = scrollWindow ? container.getBoundingClientRect().top - scrollWindow.getBoundingClientRect().top : 0; this.setState({ topSpace, bottomSpace
Optimise unneccesary cf table accesses away Also fix missed bare access of base_64_dec_map
@@ -207,6 +207,7 @@ int mbedtls_base64_decode( unsigned char *dst, size_t dlen, size_t *olen, size_t i, n; uint32_t j, x; unsigned char *p; + unsigned char dec_map_lookup; /* First pass: check for validity and get output length */ for( i = n = j = 0; i < slen; i++ ) @@ -237,11 +238,12 @@ int mbedtls_base64_decode( unsigned char *dst, size_t dlen, size_t *olen, if( src[i] == '=' && ++j > 2 ) return( MBEDTLS_ERR_BASE64_INVALID_CHARACTER ); - if( src[i] > 127 || - mbedtls_base64_table_lookup( base64_dec_map, sizeof( base64_dec_map ), src[i] ) == 127 ) + dec_map_lookup = mbedtls_base64_table_lookup( base64_dec_map, sizeof( base64_dec_map ), src[i] ); + + if( src[i] > 127 || dec_map_lookup == 127 ) return( MBEDTLS_ERR_BASE64_INVALID_CHARACTER ); - if( base64_dec_map[src[i]] < 64 && j != 0 ) + if( dec_map_lookup < 64 && j != 0 ) return( MBEDTLS_ERR_BASE64_INVALID_CHARACTER ); n++; @@ -271,9 +273,10 @@ int mbedtls_base64_decode( unsigned char *dst, size_t dlen, size_t *olen, if( *src == '\r' || *src == '\n' || *src == ' ' ) continue; - j -= ( mbedtls_base64_table_lookup(base64_dec_map, sizeof( base64_dec_map ), *src ) == 64 ); - x = ( x << 6 ) | - ( mbedtls_base64_table_lookup( base64_dec_map, sizeof( base64_dec_map ), *src ) & 0x3F ); + dec_map_lookup = mbedtls_base64_table_lookup(base64_dec_map, sizeof( base64_dec_map ), *src ); + + j -= ( dec_map_lookup == 64 ); + x = ( x << 6 ) | ( dec_map_lookup & 0x3F ); if( ++n == 4 ) {
misc: fix typo in url
@@ -39,7 +39,7 @@ if [[ ${USE_FACTORY} -eq 1 ]]; then fi for os in ${oses}; do - repobase="http://obs.openhpc.community:82/OpenHPC:/%{minor_ver}${colon}/${factory}${os}" + repobase="http://obs.openhpc.community:82/OpenHPC:/${minor_ver}${colon}/${factory}${os}" # repobase="http://build.openhpc.community/OpenHPC:/${minor_ver}${colon}/${factory}${os}" if [[ $micro_ver -gt 0 ]];then #repoupdate="http://build.openhpc.community/OpenHPC:/${minor_ver}:/Update${micro_ver}${colon}/${factory}${os}"
fix extraneous unsigned compare accidentally merged
@@ -2496,7 +2496,7 @@ DwaCompressor::uncompress // start of the data block. // - if ((version < 0) || (version > 2)) + if (version > 2) throw IEX_NAMESPACE::InputExc ("Invalid version of compressed data block"); setupChannelData(minX, minY, maxX, maxY);
powerpc: Fix Makefile rule when linking. The linker script was included in the "$^" inputs, causing the build to fail: LINK build/firmware.elf powerpc64le-linux-gnu-ld: error: linker script file 'powerpc.lds' appears multiple times As a fix the linker script is left as a dependency of the elf, but only the object files are linked.
@@ -55,7 +55,7 @@ $(BUILD)/_frozen_mpy.c: frozentest.mpy $(BUILD)/genhdr/qstrdefs.generated.h $(BUILD)/firmware.elf: $(OBJ) powerpc.lds $(ECHO) "LINK $@" - $(Q)$(LD) $(LDFLAGS) -o $@ $^ $(LIBS) + $(Q)$(LD) $(LDFLAGS) -o $@ $(OBJ) $(LIBS) $(Q)$(SIZE) $@ $(BUILD)/firmware.bin: $(BUILD)/firmware.elf
Add avoidance of 0-item ncurses menus being created
@@ -262,6 +262,13 @@ void qmenu_set_displayed_active(Qmenu* qm, bool active) { set_menu_grey(qm->ncurses_menu, active ? A_DIM : A_DIM); } void qmenu_push_to_nav(Qmenu* qm) { + // new_menu() will get angry if there are no items in the menu. We'll get a + // null pointer back, and our code will get angry. Instead, just add an empty + // spacer item. This will probably only ever occur as a programming error, + // but we should try to avoid having to deal with qmenu_push_to_nav() + // returning a non-ignorable error for now. + if (qm->ncurses_items[0] == NULL) + qmenu_add_spacer(qm); qm->ncurses_menu = new_menu(qm->ncurses_items); set_menu_mark(qm->ncurses_menu, " > "); set_menu_fore(qm->ncurses_menu, A_BOLD);
Updated note about Fractal sound driver module
/** * \brief - * Set it to 1 if you want to use the Fractal sound driver (provided by Aurora Fields).<br> + * Set it to 1 if you want to use the Fractal sound driver from Aurora Fields.<br> + * Note that you need to install the module first before enable it (https://gitlab.com/Natsumi/Fractal-Sound) */ #define MODULE_FRACTAL 0
apps/sysinfo: add Binary version in system information Recently CONFIG_BINARY_VERSION was added. Let's print it in system information.
@@ -79,7 +79,13 @@ void sysinfo(void) /* Print OS version and Build information */ /* just get values defined in version.h */ +#ifdef CONFIG_BINARY_VERSION + printf("\tVersion:\n"); + printf("\t\tPlatform: " CONFIG_VERSION_STRING "\tBinary: %d\n", CONFIG_BINARY_VERSION); + printf("\tCommit Hash: %s\n", CONFIG_VERSION_BUILD); +#else printf("\tVersion: " CONFIG_VERSION_STRING "\n\tCommit Hash: %s\n", CONFIG_VERSION_BUILD); +#endif printf("\tBuild User: " CONFIG_VERSION_BUILD_USER "\n\tBuild Time: %s\n", CONFIG_VERSION_BUILD_TIME); /* Get the current time as specific format in the buffer */
posix: add pthread_mutex_timedlock's declaration, fix [Detail] add pthread_mutex_timedlock's declaration [Verified Cases] Build Pass: <py_engine_demo> Test Pass: <py_engine_demo>
@@ -149,6 +149,7 @@ int pthread_mutex_destroy(pthread_mutex_t *mutex); int pthread_mutex_lock(pthread_mutex_t *mutex); int pthread_mutex_unlock(pthread_mutex_t *mutex); int pthread_mutex_trylock(pthread_mutex_t *mutex); +int pthread_mutex_timedlock(pthread_mutex_t *mutex, const struct timespec *at); int pthread_mutex_getprioceiling(const pthread_mutex_t *__restrict mutex, int *__restrict prioceiling); int pthread_mutex_setprioceiling(pthread_mutex_t *__restrict mutex, int prioceiling, int *__restrict old_ceiling);
shelter: refresh README.md
# shelter Shelter is designed as a remote attestation tool for customer to verify if their workloads are loaded in a specified intel authorized sgx enclaved. + The verifying process is as below: -1. shelter setup a security channel based on mTLS with runE inclavared -2. runE inclavared will generate/retrieve the quote info of workload running enclave -3. runE inclavared will get IAS report by quote info from Intel authorized web server -4. runE inclavared will generate attestation verification report +1. shelter setup a security channel based on mTLS with inclavared +2. inclavared will generate/retrieve the quote info of workload running enclave +3. inclavared will get IAS report by quote info from Intel authorized web server +4. inclavared will generate attestation verification report 5. shelter will verify the attestation verification report and mrenclave value by mTLS security channel 6. shelter will report the verifying result ## Prerequisite + Go 1.13.x or above. ## Build Please follow the command to build Inclavare Containers from the latested source code on your system. + 1. Download the latest source code of Inclavare Containers + ```shell mkdir -p "$WORKSPACE" - cd "$WORKSPACE" - git clone https://github.com/alibaba/inclavare-containers ``` + 2. Prepare the dependence libs required by shelter + ```shell cd $WORKSPACE/inclavare-containers/shelter - make ``` @@ -34,12 +37,13 @@ Please follow the command to build Inclavare Containers from the latested source Before running shelter, make sure inclavared being luanched as server mode successfully in the same machine. You can find the way to run inclavared by: https://github.com/alibaba/inclavare-containers/inclavared + 1. check shelter support feature as below -```shell - ./shelter help +```shell +shelter help NAME: - shelter - shelter as a remote attestation tool for workload runing in runE cloud encalved containers. + shelter - shelter as a remote attestation tool for workload runing in enclave containers. USAGE: shelter [global options] command [command options] [arguments...] @@ -57,16 +61,20 @@ You can find the way to run inclavared by: https://github.com/alibaba/inclavare- --help, -h show help --version, -v print the version ``` + 2. remote attestation for epid-sgx-ra + ```shell - ./shelter remoteattestation +shelter remoteattestation ``` -3. verify workload integrity by launch measurement - the software algorithm refer to [skeleton](https://github.com/alibaba/inclavare-containers/tree/master/rune/libenclave/internal/runtime/pal/skeleton) project + +3. verify workload integrity by launch measurement. + The software algorithm refer to [skeleton](https://github.com/alibaba/inclavare-containers/tree/master/rune/libenclave/internal/runtime/pal/skeleton) project. + ```shell - ./shelter mrverify +shelter mrverify ``` -## Touble shooting - NA +## Touble shooting +TODO
vere: refactors terminal jam-file blits
@@ -1272,16 +1272,17 @@ _term_ef_blit(u3_utty* uty_u, } break; case c3__sav: { - _term_it_save(u3k(u3h(u3t(blt))), u3k(u3t(u3t(blt)))); + u3_noun pax, dat; + u3x_cell(u3t(blt), &pax, &dat); + + _term_it_save(u3k(pax), u3k(dat)); } break; case c3__sag: { - u3_noun pib = u3k(u3t(u3t(blt))); - u3_noun jam; - - jam = u3ke_jam(pib); + u3_noun pax, dat; + u3x_cell(u3t(blt), &pax, &dat); - _term_it_save(u3k(u3h(u3t(blt))), jam); + _term_it_save(u3k(pax), u3qe_jam(dat)); } break; case c3__url: {
INSTALL: Provide better documentation for enable-ec_nistp_64_gcc_128
enable-ec_nistp_64_gcc_128 Enable support for optimised implementations of some commonly - used NIST elliptic curves. This is only supported on some - platforms. + used NIST elliptic curves. + This is only supported on platforms: + - with little-endian storage of non-byte types + - that tolerate misaligned memory references + - where the compiler: + - supports the non-standard type __uint128_t + - defines the built-in macro __SIZEOF_INT128__ enable-egd Build support for gathering entropy from EGD (Entropy
Fix mk_wheel.py
@@ -161,17 +161,23 @@ def build(arc_root, out_root, tail_args): shutil.rmtree('catboost', ignore_errors=True) os.makedirs('catboost/catboost') - + try: + print('Trying to build GPU version', file=sys.stderr) gpu_cmd = py_trait.gen_cmd() + ['-DHAVE_CUDA=yes'] print(' '.join(gpu_cmd), file=sys.stderr) subprocess.check_call(gpu_cmd) + print('Build GPU version: OK', file=sys.stderr) os.makedirs('catboost/catboost/gpu') open('catboost/catboost/gpu/__init__.py', 'w').close() shutil.copy(os.path.join(py_trait.out_root, 'catboost', 'python-package', 'catboost', py_trait.so_name()), 'catboost/catboost/gpu/_catboost' + py_trait.dll_ext()) + except Exception: + print('GPU version build failed', file=sys.stderr) + print('Building CPU version', file=sys.stderr) cpu_cmd = py_trait.gen_cmd() + ['-DHAVE_CUDA=no'] print(' '.join(cpu_cmd), file=sys.stderr) subprocess.check_call(cpu_cmd) + print('Building CPU version: OK', file=sys.stderr) shutil.copy(os.path.join(py_trait.out_root, 'catboost', 'python-package', 'catboost', py_trait.so_name()), 'catboost/catboost/_catboost' + py_trait.dll_ext()) shutil.copy('__init__.py', 'catboost/catboost/__init__.py')
Remove const since gcc4.8 seems to have issues with it
@@ -177,7 +177,7 @@ private: typedef std::vector<CacheEntry> CacheEntries; public: - typedef typename CacheEntries::const_iterator Iterator; + typedef typename CacheEntries::iterator Iterator; Cache() : myAccessCount(0) @@ -185,27 +185,27 @@ public: myCache.reserve(Size); } - bool find(Iterator &iter, const Key &key) const + bool find(Iterator &iter, const Key &key) { CacheEntry key_entry; key_entry.key = key; - iter = std::lower_bound(myCache.cbegin(), myCache.cend(), + iter = std::lower_bound(myCache.begin(), myCache.end(), key_entry); - if(iter == myCache.cend() || iter->key != key) + if(iter == myCache.end() || iter->key != key) return false; iter->access = myAccessCount++; return true; } - void insert(const Iterator &iter, const Key &key, const Value &value) + void insert(Iterator &iter, const Key &key, const Value &value) { auto insert_iter = iter; if(MaxSize && myCache.size() >= MaxSize) { - auto min_iter = std::min_element( - myCache.cbegin(), myCache.cend(), + Iterator min_iter = std::min_element( + myCache.begin(), myCache.end(), [](const CacheEntry &a, const CacheEntry &b) { return a.access < b.access; } ); @@ -504,10 +504,10 @@ public: static void getIteratorValue(Iterator& iter, U &value) { } - bool find(Iterator &iter, const T &key) const + bool find(Iterator &iter, const T &key) { return false; } - void insert(const Iterator &iter, const T &key, const U &value) + void insert(Iterator &iter, const T &key, const U &value) { } }; @@ -520,10 +520,10 @@ public: static void getIteratorValue(Iterator& iter, U &value) { value = iter->value; } - bool find(Iterator &iter, const T &key) const + bool find(Iterator &iter, const T &key) { return myCache.find(iter, key); } - void insert(const Iterator &iter, const T &key, const U &value) + void insert(Iterator &iter, const T &key, const U &value) { myCache.insert(iter, key, value); } private: Cache<T, U> myCache;